-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: simplify i18n setup and add more type safety (#396)
- Loading branch information
Showing
37 changed files
with
366 additions
and
364 deletions.
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
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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
export { messages } from './messages'; |
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,133 @@ | ||
export const messages = { | ||
common: { | ||
back: 'Back', | ||
cancel: 'Cancel', | ||
next: 'Next', | ||
}, | ||
appConfig: { | ||
networkStateCheck: { | ||
message: | ||
'Please check your internet connection. The app might not work properly without it.', | ||
title: 'No internet connection', | ||
}, | ||
}, | ||
homeScreen: { | ||
formatting: { | ||
content: 'The code is checked with ESLint, Prettier and TypeScript', | ||
title: 'Formatting & type checking', | ||
}, | ||
navigation: { | ||
content: 'Press to navigate', | ||
screenTitle: 'Home', | ||
title: 'Navigate to another page', | ||
}, | ||
sandbox: { | ||
content: 'Access the Sandbox form the Dev Menu with {{command}}', | ||
title: 'Sandbox', | ||
}, | ||
tests: { | ||
content: 'You can run tests with Jest or Maestro', | ||
title: 'Tests', | ||
}, | ||
updateCheck: { | ||
isEmbeddedLaunch: 'The app is running from an OTA update', | ||
}, | ||
}, | ||
miscScreens: { | ||
appUpdate: { | ||
description: | ||
'Please go update the application to access the latest features', | ||
title: 'Your app is outdated', | ||
}, | ||
blogPost: { | ||
screenTitle: 'Blog post', | ||
title: 'Blog post fetched with GraphQL', | ||
}, | ||
codepush: { | ||
cta: 'Install now', | ||
description: | ||
'An app update is mandatory to be able to use the application.', | ||
title: 'Update is required', | ||
}, | ||
dummyForm: { | ||
form: { | ||
email: { | ||
label: 'Email', | ||
placeholder: 'Enter your email', | ||
validation: { | ||
email: 'Please enter a valid email', | ||
}, | ||
}, | ||
firstName: { | ||
label: 'First name', | ||
placeholder: 'John', | ||
validation: { | ||
maxLength: 'First name must be at most 20 characters long', | ||
minLength: 'First name must be at least 2 characters long', | ||
}, | ||
}, | ||
lastName: { | ||
label: 'Last name', | ||
placeholder: 'Doe', | ||
validation: { | ||
maxLength: 'Last name must be at most 30 characters long', | ||
minLength: 'Last name must be at least 2 characters long', | ||
}, | ||
}, | ||
}, | ||
screenTitle: 'Dummy form', | ||
}, | ||
errorBoundary: { | ||
cta: 'Relaunch the app', | ||
description: | ||
'An unknown error occured. If the error persist, contact an administrator.', | ||
title: 'Error', | ||
}, | ||
maintenanceMode: { | ||
description: 'It will be available online as soon as possible', | ||
title: 'The app is in maintenance', | ||
}, | ||
notifications: { | ||
cta: 'Request', | ||
title: 'Request Notification permission', | ||
}, | ||
}, | ||
otherScreen: { | ||
form: { | ||
cta: 'Navigate', | ||
title: 'Form example', | ||
}, | ||
graphql: { | ||
cta: 'Navigate', | ||
title: 'API call example', | ||
}, | ||
navigation: { | ||
title: 'Other screen', | ||
}, | ||
}, | ||
settings: { | ||
changeLocale: { | ||
failure: 'The language could not be changed', | ||
success: 'The language has been changed', | ||
}, | ||
permissions: { | ||
notAvailable: 'This permission is not available on this device', | ||
notGranted: 'You rejected this permission request', | ||
}, | ||
updateAvailable: { | ||
banner: { | ||
compareVersions: | ||
'Version {{storeVersion}} of the app is now available. You are currently on version {{currentVersion}}.', | ||
defaultTitle: 'A new version of the app is available.', | ||
updateCta: 'Update now', | ||
}, | ||
nativePrompt: { | ||
message: 'A new version is available. Do you want to update now?', | ||
title: 'Update available', | ||
updateCta: 'Update', | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export type MessagesTypes = typeof messages; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.