✨ Allow deployment config to provide translation overrides - #1275
Merged
Conversation
JGreenlee
force-pushed
the
i18n-deployment-overrides
branch
from
September 4, 2026 04:19
d8b0bee to
50cb58f
Compare
JGreenlee
marked this pull request as ready for review
September 4, 2026 04:21
A generic way for deployments to tweak any i18nized text in the app, specified as "translation_overrides": {"<lang>": { ...same shape as en.json... }}
Via i18next addResourceBundle, these get tacked onto the translations from en.json, es.json, etc. when the config is loaded, which is before the UI gets a change to load any strings that would be modified.
The exception is, of course, the strings that appear before the user enters their opcode (as the app doesn't know what deployment it's using yet!)
We can likely use this to replace intro.translated_text entirely, since it accomplishes the same thing in a more generic way.
We might also consider using it to replace label-options "translations"; i.e. instead of asking deployers to provide the translations there for all the modes they list, we provide the translations for our default set of modes, and they would only have to provide the ones they added (or wanted to name something else), and those translations would live in the same place as any other translations/ in-app text they are providing.
JGreenlee
force-pushed
the
i18n-deployment-overrides
branch
from
September 4, 2026 04:33
50cb58f to
d1f3654
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1275 +/- ##
==========================================
+ Coverage 29.64% 30.03% +0.38%
==========================================
Files 134 134
Lines 4814 4835 +21
Branches 1218 1215 -3
==========================================
+ Hits 1427 1452 +25
+ Misses 3373 3370 -3
+ Partials 14 13 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ Allow deployment config to provide translation overrides
A generic way for deployments to tweak any i18nized text in the app, specified as "translation_overrides": {"": { ...same shape as en.json... }}
Via i18next addResourceBundle, these get tacked onto the translations from en.json, es.json, etc. when the config is loaded, which is before the UI gets a change to load any strings that would be modified.
The exception is, of course, the strings that appear before the user enters their opcode (as the app doesn't know what deployment it's using yet!)
We can likely use this to replace intro.translated_text entirely, since it accomplishes the same thing in a more generic way.
We might also consider using it to replace label-options "translations"; i.e. instead of asking deployers to provide the translations there for all the modes they list, we provide the translations for our default set of modes, and they would only have to provide the ones they added (or wanted to name something else), and those translations would live in the same place as any other translations/ in-app text they are providing.