Superset internationalization does not seem to be working on few components at the frontend.
The 'Add new slice' menu @ superset/assets/src/addSlice/AddSliceContainer.jsx is one example, even if the @superset-ui module has been called.
import { t } from '@superset-ui/translation';
t('Choose a datasource')
All UI elements should be translated.
Few frontend elements seem to ignore the translation, i couldn't reproduce the issue on backend rendered components like tables.
Download the current main branch, or 0.32.0rc2, haven't tested on other releases.
(please complete the following information):
Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.94. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
Replicating the exact same code as described here, fixes the issue partially.
Could it be that some of the translations have not been "compiled"?
https://github.com/apache/incubator-superset/blob/master/CONTRIBUTING.md#creating-a-new-language-dictionary
@mistercrunch No, they are just absent, even for existing languages, the add-slice-container itself has no translations being piped to the view, so it's an easy task(As described above), however, most parts of the code do not have translations mechanisms whatsoever.
humanize.i18n.activate('code', path='path/to/my/translation/')
We do need to 'compile' new translations for all currently supported languages, since humanize is an abandonware.
Datetime on Python does not seem to print the localized dates, setting the locale globally with locale.setlocale(locale.LC_ALL, 'i18n_code') can lead to troubles, so more investigations on how properly do it on Superset is required.
Moment.js also is absent of any internationalization, importing the locale in preamble.js does fix that.
import locale from 'moment/locale/i18n_code';
My use case is very specific(One single language support) so all measures above work, but unfortunatelly i can't open a PR with those changes since they do not match the code quality required on Superset and can lead to trouble in the future.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.