Conversation
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2619 +/- ##
==========================================
+ Coverage 61.74% 62.21% +0.47%
==========================================
Files 15 15
Lines 481 487 +6
Branches 104 107 +3
==========================================
+ Hits 297 303 +6
Misses 165 165
Partials 19 19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| translations: { | ||
| '': Object.fromEntries(translations.map((translation: GettextTranslation) => [translation.msgid, translation])), | ||
| }, | ||
| const needsRename = useBaseLanguage && currentLanguage === language.split('_')[0] |
There was a problem hiding this comment.
Shouldn't the split be the other way around? e.g. we have de.js and de_DE.js, but not de_AT.js; then:
useBaseLanguageis trueneedsRenameis false, becausecurrentLanguageisde_ATand bothlanguage.split('_')[0]arede- better match should be more generic, so
deand notde_DE?
I see how it works with current ja and available ja_JP though
There was a problem hiding this comment.
This is more a future proof variant of hard renaming done in server:
lang_map = fi_FI: fi, hu_HU: hu, nb_NO: nb, sk_SK: sk, th_TH: th, ja_JP: ja, bg_BG: bg, cs_CZ: cs
We can also just hardcode that map if that makes more sense
There was a problem hiding this comment.
Ok, didn't know it's from .tx/config
🤖 AI (if applicable)