Use global i18n strings instead of global env vars in our i18n strings #2431
Labels
kind/cleanup
Cleanup/refactor an existing component/code
triage/accepted
The issue was reviewed and is complete enough to start working on it
Description
This issue is split off from #1478
TLDR;
kuma-gui/src/app/application/services/i18n/I18n.ts
Lines 32 to 36 in e865b09
See the env usage above? We should try and reduce that and replace it with the
t
usage shown above.This code makes these
GLOBAL_VARIABLES
available within i18n files.Coming back to look at this after some time I think we've actually done most of this, some examples:
KUMA_VERSION
should be anenv
var as its not staticKUMA_DOCS_URL
is weirder, as it should use a static i18n derived URL, appended withKUMA_VERSION
KUMA_PRODUCT_NAME
can probably be removed fromenv
entirely (but kept as being i18n derived)Ideally all i18n 'globals' should live in
global.NAME_OF_VAR
or similar so its super obvious how to make a new i18n global var.The final aim is to finally have
env
not deal with static variables (we only useenv
for historical reasons because we didn't have i18n when we originally needed injectable strings).The text was updated successfully, but these errors were encountered: