Skip to content

Commit

Permalink
feat(i18n): add common strings for translation (#7256)
Browse files Browse the repository at this point in the history
  • Loading branch information
LoneRifle committed Apr 23, 2024
1 parent 0a03210 commit c450041
Show file tree
Hide file tree
Showing 7 changed files with 252 additions and 1 deletion.
2 changes: 2 additions & 0 deletions frontend/src/i18n/locales/en-sg.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { enSG as common } from './features/common'
import { enSG as login } from './features/login'
import Translation from './types'

export const enSG: Translation = {
translation: {
features: {
common,
login,
},
},
Expand Down
81 changes: 81 additions & 0 deletions frontend/src/i18n/locales/features/common/en-sg.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import { Common } from '.'

export const enSG: Common = {
entities: {
form: 'form',
template: 'template',
design: 'design',
link: 'link',
page: 'page',
field: 'field',
changes: 'changes',
step: 'step',
paymentProof: 'proof of payment',
credentials: 'credentials',
product: 'product',
},
save: 'Save',
create: 'Create',
removeReenter: 'Remove and re-enter',
share: 'Share',
cancel: 'Cancel',
title: 'Title',
option: 'Option',
optional: 'optional',
maximum: 'Maximum',
minimum: 'Minimum',
exact: 'Exact',
delete: 'Delete',
back: 'Back',
edit: 'Edit',
loading: 'Loading',
saving: 'Saving',
responses: 'Responses',
feedback: 'Feedback',
verify: 'Verify',
verified: 'Verified',
goToDashboardCta: 'Go to dashboard',
download: 'Download',
default: 'Default',
errors: {
required: 'This field is required',
validValue: 'Please enter a valid {fieldName}',
image: {
notProvided: 'Image not provided',
},
validation: {
mobileNoVerification: 'Please verify your mobile number',
emailVerification: 'Please verify your email address',
homeNo: 'Please enter a valid landline number',
},
pageNotFound: 'This page could not be found.',
},
tooltip: {
deleteField: 'Delete field',
duplicateField: 'Duplicate field',
},
dropdown: {
placeholder: 'Select an option',
},
days: {
Mondays: 'Monday',
Tuesdays: 'Tuesday',
Wednesdays: 'Wednesday',
Thursdays: 'Thursday',
Fridays: 'Friday',
Saturdays: 'Saturday',
Sundays: 'Sunday',
},
today: 'today',
tomorrow: 'tomorrow',
yesterday: 'yesterday',
formStatus: {
closed: 'Closed',
open: 'Open',
},
responseMode: {
email: 'Email mode',
storage: 'Storage mode',
},
formName: 'Form name',
}
82 changes: 82 additions & 0 deletions frontend/src/i18n/locales/features/common/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
export * from './en-sg'
export * from './zh-sg'

export interface Common {
entities: {
form: string
template: string
design: string
link: string
page: string
field: string
changes: string
step: string
paymentProof: string
credentials: string
product: string
}
save: string
create: string
removeReenter: string
share: string
cancel: string
title: string
option: string
optional: string
maximum: string
minimum: string
exact: string
delete: string
back: string
edit: string
loading: string
saving: string
responses: string
feedback: string
verify: string
verified: string
goToDashboardCta: string
download: string
default: string
errors: {
required: string
validValue: string
image: {
notProvided: string
}
validation: {
mobileNoVerification: string
emailVerification: string
homeNo: string
}
pageNotFound: string
}
tooltip: {
deleteField: string
duplicateField: string
}
dropdown: {
placeholder: string
}
days: {
Mondays: string
Tuesdays: string
Wednesdays: string
Thursdays: string
Fridays: string
Saturdays: string
Sundays: string
}
today: string
tomorrow: string
yesterday: string
formStatus: {
closed: string
open: string
}
responseMode: {
email: string
storage: string
}
formName: string
}
81 changes: 81 additions & 0 deletions frontend/src/i18n/locales/features/common/zh-sg.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import { Common } from '.'

export const zhSG: Common = {
entities: {
form: 'form',
template: 'template',
design: 'design',
link: 'link',
page: 'page',
field: 'field',
changes: 'changes',
step: 'step',
paymentProof: 'proof of payment',
credentials: 'credentials',
product: 'product',
},
save: 'Save',
create: 'Create',
removeReenter: 'Remove and re-enter',
share: 'Share',
cancel: 'Cancel',
title: 'Title',
option: 'Option',
optional: 'optional',
maximum: 'Maximum',
minimum: 'Minimum',
exact: 'Exact',
delete: 'Delete',
back: 'Back',
edit: 'Edit',
loading: 'Loading',
saving: 'Saving',
responses: 'Responses',
feedback: 'Feedback',
verify: 'Verify',
verified: 'Verified',
goToDashboardCta: 'Go to dashboard',
download: 'Download',
default: 'Default',
errors: {
required: 'This field is required',
validValue: 'Please enter a valid {fieldName}',
image: {
notProvided: 'Image not provided',
},
validation: {
mobileNoVerification: 'Please verify your mobile number',
emailVerification: 'Please verify your email address',
homeNo: 'Please enter a valid landline number',
},
pageNotFound: 'This page could not be found.',
},
tooltip: {
deleteField: 'Delete field',
duplicateField: 'Duplicate field',
},
dropdown: {
placeholder: 'Select an option',
},
days: {
Mondays: 'Monday',
Tuesdays: 'Tuesday',
Wednesdays: 'Wednesday',
Thursdays: 'Thursday',
Fridays: 'Friday',
Saturdays: 'Saturday',
Sundays: 'Sunday',
},
today: 'today',
tomorrow: 'tomorrow',
yesterday: 'yesterday',
formStatus: {
closed: 'Closed',
open: 'Open',
},
responseMode: {
email: 'Email mode',
storage: 'Storage mode',
},
formName: 'Form name',
}
2 changes: 2 additions & 0 deletions frontend/src/i18n/locales/features/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { type Common } from './common'
export { type Login } from './login'
3 changes: 2 additions & 1 deletion frontend/src/i18n/locales/types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Login } from './features/login'
import { Common, Login } from './features'

interface Translation {
translation: {
features: {
common: Common
login: Login
}
}
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/i18n/locales/zh-sg.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { zhSG as common } from './features/common'
import { zhSG as login } from './features/login'
import Translation from './types'

export const zhSG: Translation = {
translation: {
features: {
common,
login,
},
},
Expand Down

0 comments on commit c450041

Please sign in to comment.