-
Notifications
You must be signed in to change notification settings - Fork 3
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
1623: Add i18n for administration #1744
Conversation
91121e4
to
cd06942
Compare
cd06942
to
ba85f2e
Compare
For the applications i would store the i18n labels in the json structure and resolve them in the frontend instead of saving the particular values (as it is now). i don't see the whole database redesign in this verein360 project to be honest even it will be a bit ugly to reconstruct the application data json after receiving the data from the verein360 endpoint. I think we need proper tests for this reconstructing function. The initial i18n implementation looks fine to me |
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.
Is there any reason you did not stick to the format/structure we use in integreat, i.e. using one file to store translations for all languages? That way, we could reuse existing tools and scripts and therefore our whole translation process.
One other question: Do you know why it is not necessary anymore to wrap the app in a I18nProvider
or similar? Is that just an unnecessary thing we do in Integreat or it became obsolete with some update in the past?
Otherwise, no objections from my side.
Thanks for your feedback.
Valid question. I thought about this, too and decided to stick to the solutions described in the documentation rather then to the integreat solution. The reasons for this is the integreat solution is a lot complexer, e.g. needing functions to merge the language documents into one translation file. This makes sense for integreat where we have this whole import / export translations logic, but not really for entitlement card furthermore the out of the box functionality of i18next is absolutely sufficient for the use cases of the entitlementcard and needs no enhancements like we use in integreat.
The I18nextProvider does take an i18next instance and passes that down using contexts. As we do not consume the translations for context, but by using the useTranslation() hook, it is not needed. I am not quite sure, if we still have occurences in Integreat where we use translations from context, if not, it should be save to delete this Provider. |
…f labels from object
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.
Thanks a lot for the work on this tedious issue 🙏 Looks pretty good already :)
administration/src/mui-modules/application/forms/GoldenCardEntitlementForm.tsx
Outdated
Show resolved
Hide resolved
administration/src/mui-modules/application/forms/OrganizationForm.tsx
Outdated
Show resolved
Hide resolved
administration/src/mui-modules/application/forms/WorkAtOrganizationForm.tsx
Show resolved
Hide resolved
administration/src/mui-modules/application/forms/WorkAtOrganizationForm.tsx
Show resolved
Hide resolved
administration/src/mui-modules/application/forms/WorkAtOrganizationForm.tsx
Show resolved
Hide resolved
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.
Smoke tested on firefox, looks good :)
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.
Looks good. One finding telephone label is missing in translations file
Thanks for testing. Please approve if only small things needs fixing. Also maybe you do not want to publish your adress and phonenumber on github? |
Short description
Move labels from objects in the database to translation.json
Proposed changes
Side effects
Testing
/beantragen
and check if all labels for all cases are displayed properlyTodo for follow up ticket
Resolved issues
Fixes: #1623