Closed raplemie closed 5 months ago
Along with this check, we should also review the many different ways we have to use localization, IE, we have UiFramework.localization
(internal) which is a pass through of IModelApp.localization
, and we have UiFramework.translate
(internal), which is calling directly IModelApp.localization.getLocalizedString
(not UiFramework's...) with the namespace key... In test app we have calls to UIFramework.localization
which is internal, we shouldnt.
We have some component that directly call IModelApp.localization.getLocalizedString("UiFramework:...")
, not using the namespace... So we basically have multiple ways of doing the same thing, and whenever we will try to fix any of them, we will certainly forget one, so we should standardise and probably remove the unneeded ones.
As seen in
ui/appui-react/src/appui-react/settings/ui/UiSettingsPage.tsx
, using a ref is a mistake because it will remove the benefit of being able to change language, while always doing the work of getting the full translation on each render...See what we want to do with that, but we probably can optimize this everywhere in the different packages.