-
Notifications
You must be signed in to change notification settings - Fork 915
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
[BUG] Internationalization not working #772
Comments
One possible solution is to create a translation plugin. |
I'm working on translating opensearch-dashboard to pt-BR and I had the same problem when deploying. Investigating the problem, I noticed that the translation files are not loaded
Through debugging I've verified that the translation files are not found when executing the script src/legacy/server/i18n/index.ts The cause of this problem is the format of the expression passed to the globby lib Changing the code, adding '**' before the I18N_RC the problem was fixed const translationPaths = await Promise.all([
getTranslationPaths({
cwd: fromRoot('.'),
glob: `**/${I18N_RC}`,
}),
...(config.get('plugins.paths') as string[]).map((cwd) =>
getTranslationPaths({ cwd, glob: I18N_RC })
),
...(config.get('plugins.scanDirs') as string[]).map((cwd) =>
getTranslationPaths({ cwd, glob: `**/${I18N_RC}` })
),
getTranslationPaths({
cwd: fromRoot('../opensearch-dashboards-extra'),
glob: `**/${I18N_RC}`,
}),
]); After finding the I18N_RC files (.i18nrc.json), the translations are loaded from the json In my case, the scripts/i18n_integrate tool did not add the files in this configuration. I had to do this manually. {
...
"translations": []
} I can't tell if it's another problem, or something I forgot to do. PR: #1276 |
how to customize the language conversion plug-in? |
Here is an example of translation to pt-BR.. https://github.com/schleuss/opensearch-dashboard-i18n-ptbr But i've found some translations issues. Some opensearrch UI components are not working properly. |
We've created the i18n OpenSearch Dashboards plugin to provide this functionality. |
Describe the bug
When changing the locale config from English to Chinese in the opensearch_dashboards.yml file, the application does not change language to Chinese but still showing the default language English.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Language for the Opensearch Dashboard should be changed from the default language English to Chinese as the comments saying "supported languages are the following: English - en, by default, Chinese -zh-CN" in the yml file.
Screenshots
Additional context
Legacy application includes the supported translation functions in the X-pack folder, so we do not have access to it.
The text was updated successfully, but these errors were encountered: