-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(i18n): stub locales for public-form
Identify common error messages that a member of the public might see in a form page, and place them in a locale specifically for that. TODO - Move some of the validation messages in common over to this
- Loading branch information
Showing
7 changed files
with
82 additions
and
1 deletion.
There are no files selected for viewing
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,12 +1,14 @@ | ||
import { enSG as common } from './features/common' | ||
import { enSG as login } from './features/login' | ||
import { enSG as publicForm } from './features/public-form' | ||
import Translation from './types' | ||
|
||
export const enSG: Translation = { | ||
translation: { | ||
features: { | ||
common, | ||
login, | ||
publicForm, | ||
}, | ||
}, | ||
} |
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,2 +1,3 @@ | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { PublicForm } from '.' | ||
|
||
export const enSG: PublicForm = { | ||
errors: { | ||
notAvailable: 'This form is not available.', | ||
notFound: 'Form not found', | ||
deleted: 'This form is no longer active', | ||
private: | ||
'If you think this is a mistake, please contact the agency that gave you the form link.', | ||
|
||
submissionSecretKeyInvalid: { | ||
title: 'Invalid form link', | ||
header: 'This form link is no longer valid.', | ||
message: | ||
'A submission may have already been made using this link. If you think this is a mistake, please contact the agency that gave you the form link.', | ||
}, | ||
|
||
myinfo: | ||
'Your Myinfo details could not be retrieved. Refresh your browser and log in, or try again later.', | ||
submitFailure: | ||
'An error occurred whilst processing your submission. Please refresh and try again.', | ||
verifiedFieldExpired_one: | ||
'Your verified field {{count}} has expired. Please verify the {{count}} field again.', | ||
verifiedFieldExpired_other: | ||
'Your verified fields {{count}} have expired. Please verify those {{count}} fields again.', | ||
}, | ||
} |
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,21 @@ | ||
export * from './en-sg' | ||
export * from './zh-sg' | ||
|
||
export interface PublicForm { | ||
errors: { | ||
notAvailable: string | ||
notFound: string | ||
deleted: string | ||
private: string | ||
|
||
submissionSecretKeyInvalid: { | ||
title: string | ||
header: string | ||
message: string | ||
} | ||
myinfo: string | ||
submitFailure: string | ||
verifiedFieldExpired_one: string | ||
verifiedFieldExpired_other: 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { PublicForm } from '.' | ||
|
||
export const zhSG: PublicForm = { | ||
errors: { | ||
notAvailable: 'This form is not available.', | ||
notFound: 'Form not found', | ||
deleted: 'This form is no longer active', | ||
private: | ||
'If you think this is a mistake, please contact the agency that gave you the form link.', | ||
|
||
submissionSecretKeyInvalid: { | ||
title: 'Invalid form link', | ||
header: 'This form link is no longer valid.', | ||
message: | ||
'A submission may have already been made using this link. If you think this is a mistake, please contact the agency that gave you the form link.', | ||
}, | ||
|
||
myinfo: | ||
'Your Myinfo details could not be retrieved. Refresh your browser and log in, or try again later.', | ||
submitFailure: | ||
'An error occurred whilst processing your submission. Please refresh and try again.', | ||
verifiedFieldExpired_one: | ||
'Your verified field {{count}} has expired. Please verify the {{count}} field again.', | ||
verifiedFieldExpired_other: | ||
'Your verified fields {{count}} have expired. Please verify those {{count}} fields again.', | ||
}, | ||
} |
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,12 +1,14 @@ | ||
import { zhSG as common } from './features/common' | ||
import { zhSG as login } from './features/login' | ||
import { zhSG as publicForm } from './features/public-form' | ||
import Translation from './types' | ||
|
||
export const zhSG: Translation = { | ||
translation: { | ||
features: { | ||
common, | ||
login, | ||
publicForm, | ||
}, | ||
}, | ||
} |