Skip to content

✨ Allow deployment config to provide translation overrides - #1275

Merged
JGreenlee merged 1 commit into
e-mission:masterfrom
JGreenlee:i18n-deployment-overrides
Sep 4, 2026
Merged

✨ Allow deployment config to provide translation overrides#1275
JGreenlee merged 1 commit into
e-mission:masterfrom
JGreenlee:i18n-deployment-overrides

Conversation

@JGreenlee

@JGreenlee JGreenlee commented Sep 4, 2026

Copy link
Copy Markdown
Member

✨ 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.

@JGreenlee
JGreenlee force-pushed the i18n-deployment-overrides branch from d8b0bee to 50cb58f Compare September 4, 2026 04:19
@JGreenlee
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
JGreenlee force-pushed the i18n-deployment-overrides branch from 50cb58f to d1f3654 Compare September 4, 2026 04:33
@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 30.03%. Comparing base (2dcf3f6) to head (d1f3654).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/js/i18nextInit.ts 94.11% 1 Missing ⚠️
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     
Flag Coverage Δ
unit 30.03% <95.65%> (+0.38%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/js/config/dynamicConfig.ts 80.50% <100.00%> (+0.68%) ⬆️
src/js/i18nextInit.ts 76.74% <94.11%> (+11.35%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JGreenlee
JGreenlee merged commit 68f1b17 into e-mission:master Sep 4, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this to Tasks completed in OpenPATH Tasks Overview Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Tasks completed

Development

Successfully merging this pull request may close these issues.

1 participant