-
Notifications
You must be signed in to change notification settings - Fork 940
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
Update locales.js for support pl language #6301
Conversation
Needed for translating FormatMessage format Signed-off-by: Andrzej M. <[email protected]>
Signed-off-by: Andrzej M. <[email protected]>
Signed-off-by: AndrzejM <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6301 +/- ##
=======================================
Coverage 54.20% 54.20%
=======================================
Files 3251 3251
Lines 70655 70657 +2
Branches 10828 10828
=======================================
+ Hits 38300 38302 +2
Misses 30334 30334
Partials 2021 2021
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Hi @fcientymeh Can you add details to the PR description's sections so that its clear what this change is addressing? |
@ashwin-pc - thank you for your feedback. Generally speaking - we needs (I hope many others too) to have localized opensearch-dashboards. The problem is that adding translation support for <FormattedMessage> requires recompiling the product,, if theres is no locale defined in locales.js file for some new country. I think this could be separated as a new issue. |
Thanks for doing this. Yes this is a known issue. It requires the update this for functional purposes along with the translation. Looks good to me as much as I can verify. |
Hi @ashwin-pc and @kavilla , should we mark this PR for 2.15? |
* Update locales.js for support pl language Needed for translating FormatMessage format Signed-off-by: Andrzej M. <[email protected]> * Update locales.js for pl language / translate tokens Signed-off-by: Andrzej M. <[email protected]> * Update locales.js Signed-off-by: AndrzejM <[email protected]> --------- Signed-off-by: Andrzej M. <[email protected]> Signed-off-by: Andrzej M. <[email protected]> Signed-off-by: AndrzejM <[email protected]> Co-authored-by: Anan Zhuang <[email protected]> (cherry picked from commit 930039a) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Update locales.js for support pl language Needed for translating FormatMessage format Signed-off-by: Andrzej M. <[email protected]> * Update locales.js for pl language / translate tokens Signed-off-by: Andrzej M. <[email protected]> * Update locales.js Signed-off-by: AndrzejM <[email protected]> --------- Signed-off-by: Andrzej M. <[email protected]> Signed-off-by: Andrzej M. <[email protected]> Signed-off-by: AndrzejM <[email protected]> Co-authored-by: Anan Zhuang <[email protected]> (cherry picked from commit 930039a) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Update locales.js for support pl language Needed for translating FormatMessage format * Update locales.js for pl language / translate tokens * Update locales.js --------- (cherry picked from commit 930039a) Signed-off-by: Andrzej M. <[email protected]> Signed-off-by: Andrzej M. <[email protected]> Signed-off-by: AndrzejM <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Anan Zhuang <[email protected]>
* Update locales.js for support pl language Needed for translating FormatMessage format Signed-off-by: Andrzej M. <[email protected]> * Update locales.js for pl language / translate tokens Signed-off-by: Andrzej M. <[email protected]> * Update locales.js Signed-off-by: AndrzejM <[email protected]> --------- Signed-off-by: Andrzej M. <[email protected]> Signed-off-by: Andrzej M. <[email protected]> Signed-off-by: AndrzejM <[email protected]> Co-authored-by: Anan Zhuang <[email protected]>
Description
Opensearch-dashboard uses two kinds of translating engines:
<FormattedMessage> and i18n.translate.
i18n.translate works from scratch, but <FormattedMessage> needs to have localization country shortcut in locales.js file. If not - opensearch-dashboards must be build from source with newly added new localization country. This is very problematic.
I didn't found other solution.
Ultimately, adding support for a new language should not force compilation of the product
Testing the changes
Check List
yarn test:jest
yarn test:jest_integration