-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(i18n): extract text for form metadata (#7926)
Extract labels for form metadata, namely last modified data and form type [i18n] - Add Meta section to `adminForm` [features] - Replace constants file with i18n equivalent mapping of type labels
- Loading branch information
Showing
9 changed files
with
47 additions
and
19 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
frontend/src/features/admin-form/settings/components/GeneralTabHeader.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import { enSG as meta } from './meta' | ||
import { enSG as navbar } from './navbar' | ||
import { enSG as sidebar } from './sidebar' | ||
|
||
export const enSG = { | ||
navbar, | ||
sidebar, | ||
meta, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
frontend/src/i18n/locales/features/admin-form/meta/en-sg.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { FormResponseMode } from '~shared/types' | ||
|
||
export const enSG = { | ||
prettyLastModified: 'Edited {prettyLastModified}', | ||
responseModeText: { | ||
[FormResponseMode.Multirespondent]: 'Multi-respondent form', | ||
[FormResponseMode.Email]: 'Email mode', | ||
[FormResponseMode.Encrypt]: 'Storage mode', | ||
}, | ||
} |
10 changes: 10 additions & 0 deletions
10
frontend/src/i18n/locales/features/admin-form/meta/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { FormResponseMode } from '~shared/types' | ||
|
||
export * from './en-sg' | ||
|
||
export interface Meta { | ||
prettyLastModified: string | ||
responseModeText: { | ||
[k in FormResponseMode]: string | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
export { type Navbar } from './admin-form' | ||
export { type Fields } from './admin-form' | ||
export { type HeaderAndInstructions } from './admin-form' | ||
export { type Logic } from './admin-form' | ||
export { type ThankYou } from './admin-form' | ||
export { | ||
type Fields, | ||
type HeaderAndInstructions, | ||
type Logic, | ||
type Meta, | ||
type Navbar, | ||
type ThankYou, | ||
} from './admin-form' | ||
export { type Common } from './common' | ||
export { type Login } from './login' | ||
export { type PublicForm } from './public-form' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters