RFC: i18n Infrastructure Overhaul — Making Language Contributions Easier #268
Replies: 4 comments
-
Progress update: i18n infrastructure refactoredPR #331 just landed — the i18n system has been migrated from hand-rolled TS modules to i18next + react-i18next. What changedThe old structure (5 TS translation files in Adding a new UI language now requires only 2 steps:
No other files need changes. See Impact on open language PRsAll open language PRs now have merge conflicts because the old TS files they modify no longer exist. Your translation work is still valuable — the content is the same, just the format changed.
#176 (@GRIZZZZZLY) is a generation-side bug fix, not a translation PR — it should be mostly unaffected. Rebase and we'll review separately. What's not yet doneThis refactor only covers UI language. Course generation language is still hardcoded to If you run into issues during rebase, feel free to ask here. Thanks for your contributions and patience 🙏 |
Beta Was this translation helpful? Give feedback.
-
|
Hello,
I just wanted to share an update: not only is the user interface translated
into Russian, but the course generation itself is also fully localized and
available in Russian.
You can see an example here: open-maic-nu.vercel.app.
Thanks,
Maxim Zubov
сб, 4 апр. 2026 г., 11:44 wyuc ***@***.***>:
… Progress update: i18n infrastructure refactored
PR #331 <#331> just landed — the
i18n system has been migrated from hand-rolled TS modules to *i18next +
react-i18next*.
What changed
The old structure (5 TS translation files in lib/i18n/) is gone. The new
structure:
lib/i18n/locales/
├── zh-CN.json # one flat JSON per language
├── en-US.json
└── ...
lib/i18n/locales.ts # locale registry (one line per language)
*Adding a new UI language now requires only 2 steps:*
1. Create lib/i18n/locales/<code>.json (copy en-US.json, translate
values, keep keys identical)
2. Add one entry to supportedLocales in lib/i18n/locales.ts
No other files need changes. See lib/i18n/TRANSLATION_GUIDE.md for
interpolation syntax ({{var}}) and keys with special UX context.
Impact on open language PRs
All open language PRs now have merge conflicts because the old TS files
they modify no longer exist. Your translation work is still valuable — the
content is the same, just the format changed.
PR Author Language What to do
#95 <#95> @alvinets
<https://github.com/alvinets> zh-TW Rebase onto main, convert
translations to a single zh-TW.json, register in locales.ts
#177 <#177> @GRIZZZZZLY
<https://github.com/GRIZZZZZLY> ru-RU Same as above — create ru-RU.json +
register
#261 <#261> @maximvalerevich
<https://github.com/maximvalerevich> ru-RU Overlaps with #177
<#177>. Suggest coordinating
with @GRIZZZZZLY <https://github.com/GRIZZZZZLY> to merge the more
complete version and avoid duplicate work
#215 <#215> @harshanaDisa
<https://github.com/harshanaDisa> de-DE Same — create de-DE.json +
register
#280 <#280> @ellaguno
<https://github.com/ellaguno> es-MX Same — create es-MX.json + register
#176 <#176> ***@***.***
<https://github.com/GRIZZZZZLY>) is a generation-side bug fix, not a
translation PR — it should be mostly unaffected. Rebase and we'll review
separately.
What's not yet done
This refactor only covers *UI language*. Course generation language is
still hardcoded to zh-CN | en-US in the toolbar and prompt builder —
that's a separate effort.
If you run into issues during rebase, feel free to ask here. Thanks for
your contributions and patience 🙏
—
Reply to this email directly, view it on GitHub
<#268 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/B4BUWK72TY7O3QOUSUPVV234UCHJNAVCNFSM6AAAAACW6MCJZSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMNBUGUYDQMY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Working on User Interface translations, course generation in traditional
chinese, browser tts voice playback in cantonese for traditional chinese.
Regards,
Alvin
…On Sat, Apr 4, 2026 at 6:29 PM maximvalerevich ***@***.***> wrote:
Hello,
I just wanted to share an update: not only is the user interface
translated
into Russian, but the course generation itself is also fully localized and
available in Russian.
You can see an example here: open-maic-nu.vercel.app.
Thanks,
Maxim Zubov
сб, 4 апр. 2026 г., 11:44 wyuc ***@***.***>:
> Progress update: i18n infrastructure refactored
>
> PR #331 <#331> just landed —
the
> i18n system has been migrated from hand-rolled TS modules to *i18next +
> react-i18next*.
> What changed
>
> The old structure (5 TS translation files in lib/i18n/) is gone. The new
> structure:
>
> lib/i18n/locales/
> ├── zh-CN.json # one flat JSON per language
> ├── en-US.json
> └── ...
> lib/i18n/locales.ts # locale registry (one line per language)
>
> *Adding a new UI language now requires only 2 steps:*
>
> 1. Create lib/i18n/locales/<code>.json (copy en-US.json, translate
> values, keep keys identical)
> 2. Add one entry to supportedLocales in lib/i18n/locales.ts
>
> No other files need changes. See lib/i18n/TRANSLATION_GUIDE.md for
> interpolation syntax ({{var}}) and keys with special UX context.
> Impact on open language PRs
>
> All open language PRs now have merge conflicts because the old TS files
> they modify no longer exist. Your translation work is still valuable —
the
> content is the same, just the format changed.
> PR Author Language What to do
> #95 <#95> @alvinets
> <https://github.com/alvinets> zh-TW Rebase onto main, convert
> translations to a single zh-TW.json, register in locales.ts
> #177 <#177> @GRIZZZZZLY
> <https://github.com/GRIZZZZZLY> ru-RU Same as above — create ru-RU.json
+
> register
> #261 <#261> @maximvalerevich
> <https://github.com/maximvalerevich> ru-RU Overlaps with #177
> <#177>. Suggest coordinating
> with @GRIZZZZZLY <https://github.com/GRIZZZZZLY> to merge the more
> complete version and avoid duplicate work
> #215 <#215> @harshanaDisa
> <https://github.com/harshanaDisa> de-DE Same — create de-DE.json +
> register
> #280 <#280> @ellaguno
> <https://github.com/ellaguno> es-MX Same — create es-MX.json + register
>
> #176 <#176> ***@***.***
> <https://github.com/GRIZZZZZLY>) is a generation-side bug fix, not a
> translation PR — it should be mostly unaffected. Rebase and we'll review
> separately.
> What's not yet done
>
> This refactor only covers *UI language*. Course generation language is
> still hardcoded to zh-CN | en-US in the toolbar and prompt builder —
> that's a separate effort.
>
> If you run into issues during rebase, feel free to ask here. Thanks for
> your contributions and patience 🙏
>
> —
> Reply to this email directly, view it on GitHub
> <
#268 (comment)>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/B4BUWK72TY7O3QOUSUPVV234UCHJNAVCNFSM6AAAAACW6MCJZSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMNBUGUYDQMY>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#268 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATPFKDMFJZAL3DWZ46YT5B34UDPXDAVCNFSM6AAAAACW6MCJZSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMNBUGY2TMNY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Completed.
feat(i18n): add Traditional Chinese (zh-TW) support with Cantonese TTS
#421
Alvin
…On Tue, Apr 14, 2026 at 12:38 AM Alvin Lam ***@***.***> wrote:
Working on User Interface translations, course generation in traditional
chinese, browser tts voice playback in cantonese for traditional chinese.
Regards,
Alvin
On Sat, Apr 4, 2026 at 6:29 PM maximvalerevich ***@***.***>
wrote:
> Hello,
>
> I just wanted to share an update: not only is the user interface
> translated
> into Russian, but the course generation itself is also fully localized
> and
> available in Russian.
>
> You can see an example here: open-maic-nu.vercel.app.
>
> Thanks,
> Maxim Zubov
>
> сб, 4 апр. 2026 г., 11:44 wyuc ***@***.***>:
>
> > Progress update: i18n infrastructure refactored
> >
> > PR #331 <#331> just landed —
> the
> > i18n system has been migrated from hand-rolled TS modules to *i18next +
> > react-i18next*.
> > What changed
> >
> > The old structure (5 TS translation files in lib/i18n/) is gone. The
> new
> > structure:
> >
> > lib/i18n/locales/
> > ├── zh-CN.json # one flat JSON per language
> > ├── en-US.json
> > └── ...
> > lib/i18n/locales.ts # locale registry (one line per language)
> >
> > *Adding a new UI language now requires only 2 steps:*
> >
> > 1. Create lib/i18n/locales/<code>.json (copy en-US.json, translate
> > values, keep keys identical)
> > 2. Add one entry to supportedLocales in lib/i18n/locales.ts
> >
> > No other files need changes. See lib/i18n/TRANSLATION_GUIDE.md for
> > interpolation syntax ({{var}}) and keys with special UX context.
> > Impact on open language PRs
> >
> > All open language PRs now have merge conflicts because the old TS files
> > they modify no longer exist. Your translation work is still valuable —
> the
> > content is the same, just the format changed.
> > PR Author Language What to do
> > #95 <#95> @alvinets
> > <https://github.com/alvinets> zh-TW Rebase onto main, convert
> > translations to a single zh-TW.json, register in locales.ts
> > #177 <#177> @GRIZZZZZLY
> > <https://github.com/GRIZZZZZLY> ru-RU Same as above — create
> ru-RU.json +
> > register
> > #261 <#261> @maximvalerevich
> > <https://github.com/maximvalerevich> ru-RU Overlaps with #177
> > <#177>. Suggest coordinating
> > with @GRIZZZZZLY <https://github.com/GRIZZZZZLY> to merge the more
> > complete version and avoid duplicate work
> > #215 <#215> @harshanaDisa
> > <https://github.com/harshanaDisa> de-DE Same — create de-DE.json +
> > register
> > #280 <#280> @ellaguno
> > <https://github.com/ellaguno> es-MX Same — create es-MX.json +
> register
> >
> > #176 <#176> ***@***.***
> > <https://github.com/GRIZZZZZLY>) is a generation-side bug fix, not a
> > translation PR — it should be mostly unaffected. Rebase and we'll
> review
> > separately.
> > What's not yet done
> >
> > This refactor only covers *UI language*. Course generation language is
> > still hardcoded to zh-CN | en-US in the toolbar and prompt builder —
> > that's a separate effort.
> >
> > If you run into issues during rebase, feel free to ask here. Thanks for
> > your contributions and patience 🙏
> >
> > —
> > Reply to this email directly, view it on GitHub
> > <
> #268 (comment)>,
>
> > or unsubscribe
> > <
> https://github.com/notifications/unsubscribe-auth/B4BUWK72TY7O3QOUSUPVV234UCHJNAVCNFSM6AAAAACW6MCJZSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMNBUGUYDQMY>
>
> > .
> > You are receiving this because you were mentioned.Message ID:
> > ***@***.***>
> >
>
> —
> Reply to this email directly, view it on GitHub
> <#268 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ATPFKDMFJZAL3DWZ46YT5B34UDPXDAVCNFSM6AAAAACW6MCJZSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMNBUGY2TMNY>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We've seen growing interest in multi-language support recently. Several contributors are actively working on adding new languages:
Thanks to everyone involved. This is clearly a direction the community cares about, and we want to support it properly.
The Problem
Honestly, the current i18n architecture was designed with only zh-CN and en-US in mind. We didn't anticipate this level of community interest in multi-language support, and it shows. The
'zh-CN' | 'en-US'union type is hardcoded across type definitions, API routes, prompt builders, toolbar components, and TTS config. Server-side generation logic usesif (language === 'zh-CN')branches in ~18 places. It works for two languages, but it's not a design that scales.As a result, adding a new language currently requires touching 17–33 files. Every language PR modifies the same core files, so merging one causes rebase conflicts in all the others. That's not a reasonable ask for contributors.
Proposed Changes
We're planning an infrastructure refactor to make language contributions much simpler. The goal: adding a new language = adding one directory + one line of registration.
1. Locale Registry with Auto-Derived Types
Each language lives in its own directory under
lib/i18n/locales/. A central registry derivesLocaleandGenerationLanguagetypes automatically. No more manually updating union types in 10+ files.2. Server-Side Prompt Simplification
The current codebase maintains separate prompt templates for zh-CN and en-US, but they're identical in content, just translated. We'll consolidate to a single English prompt with a language instruction (e.g., "respond in {language}"). This means language contributors only need to provide UI translations, not prompt templates.
3. TTS Voice Mapping in Locale Config
Each locale declares its TTS voice preferences (browser lang tag, Azure voice names) in its registration config. No more scattering voice mappings across components.
4. Auto-Generated Language Toolbar
The generation toolbar reads available languages from the registry instead of hardcoding a cycle list. Adding a new generation language won't require modifying toolbar code.
What This Means for Open PRs
We plan to land this refactor first, then help existing language PRs rebase onto the new structure. The rebase should be straightforward since most of the work (translations) stays the same. Only the file locations and registration pattern change.
PR #176 (language normalization fix) can merge independently since it fixes an existing bug.
For the two Russian PRs (#177 and #261), we'll coordinate with both authors to merge the most complete version and avoid duplicate work.
Timeline
We'll start this refactor soon. If you're working on a language PR, no need to pause. Keep translating. We'll help you adapt to the new structure once it lands.
Feedback and questions welcome in this thread.
Beta Was this translation helpful? Give feedback.
All reactions