translations in UI component (Sharing dialog) not showing in Dashboard app #310
-
Dashboard app now uses the new sharing dialog from ui. There are a bunch of strings in this component. But it seems that translations are not being found, and i suspect it could have something to do with i18n instances or namespace issues that we've had previously. The header-bar successfully shows translations, but it slightly different in that it is part of the app-shell. Also, it is doing this: https://github.com/dhis2/ui/blob/master/components/header-bar/src/header-bar.js#L63. Are any of the other ui components with translations successfully showing them in an app? (org-unit-tree, file-input, select, collections/forms, table, pagination) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Found what I needed. Instead of importing d2-i18n, the component needs to import the i18n object from the /locales directory Not this: |
Beta Was this translation helpful? Give feedback.
Found what I needed. Instead of importing d2-i18n, the component needs to import the i18n object from the /locales directory
Not this:
import i18n from 'd2-i18n'
But this:
import i18n from './locales/index.js'