-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i18n support #482
i18n support #482
Conversation
4258fd0
to
f8004b6
Compare
Initial approach was to use React Routers Therefore I decided to go with local storage / locale in redux state combination. |
f8004b6
to
82a767b
Compare
Issue #21 includes feature requests for both JSON schema based forms and AJV validation. |
82a767b
to
e24f364
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me the components inside <NewDraftWizard/>
seem not completely worked with translation. For example, WizardCreateFolderStep
is missing the query params when changing language.
Query parameters are now included in language change method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. This contains a lot just to introduce locale for a another language. I'm not sure if its relevant but clicking En/Fi button in listing of folder content and details visible with "Show details" make the details hidden. For example http://localhost:3000/fi/home/published/{some id here}
Good call. This happens because language change updates locale in redux state and therefore the app re-renders components in navigation tree. Re-rendering is needed to get translations but I think that the opened details should be visible after language change. I'll look into it. |
This should be fixed now. |
04974c5
to
d3764b2
Compare
Description
Introduced i18n support with react-i18next library.
Selection is stored in local storage. This helps to render correct translation when user chooses locale on login page.
Related issues
Closes #21
Type of change
Changes Made
src
pathsrc/translations
/home
route.UserDraftTemplates
. This caused some issues if templates resulted as undefinedTesting