-
Notifications
You must be signed in to change notification settings - Fork 186
[module_manager] Add Translations to Module_Manager #10002
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
base: main
Are you sure you want to change the base?
Conversation
Makefile
Outdated
msgfmt -o modules/brainbrowser/locale/ja/LC_MESSAGES/brainbrowser.mo modules/brainbrowser/locale/ja/LC_MESSAGES/brainbrowser.po | ||
msgfmt -o modules/bvl_feedback/locale/ja/LC_MESSAGES/bvl_feedback.mo modules/bvl_feedback/locale/ja/LC_MESSAGES/bvl_feedback.po | ||
msgfmt -o modules/candidate_list/locale/hi/LC_MESSAGES/candidate_list.mo modules/candidate_list/locale/hi/LC_MESSAGES/candidate_list.po | ||
npx i18next-conv -l hi -s modules/candidate_list/locale/hi/LC_MESSAGES/candidate_list.po -t modules/candidate_list/locale/hi/LC_MESSAGES/candidate_list.json |
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.
What's the difference between this and line 76/77?
text: 'Updated ' + name + ' status! ' + | ||
'To apply changes the interface must be reloaded. Proceed?', | ||
title: t('Success!', {ns: 'module_manager'}), | ||
text: t('Updated', {ns: 'module_manager'}) + |
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.
String concatenation is not the right way to handle variables because the location of the variable (name) in the sentence changes between languages.
It looks like i18next supports format strings that should be used instead: https://www.i18next.com/translation-function/formatting
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.
This PR is responsible for translating the module module_manager to different languages. Currently only 'Hindi' language is supported but other languages can be added as required.
Testing instructions (if applicable)