Skip to content

Migrate i18n to crowdin-cli and kolibri-build/kolibri-i18n#5831

Merged
rtibbles merged 3 commits intolearningequality:unstablefrom
rtibbles:i18n
Apr 16, 2026
Merged

Migrate i18n to crowdin-cli and kolibri-build/kolibri-i18n#5831
rtibbles merged 3 commits intolearningequality:unstablefrom
rtibbles:i18n

Conversation

@rtibbles
Copy link
Copy Markdown
Member

Summary

Migrate Studio's i18n infrastructure to use the same architecture as Kolibri:

  • Replace the custom Python crowdin.py API script with the official crowdin-cli tool, adding crowdin.yml config and GitHub Actions workflows for upload/download
  • Replace kolibri-tools with kolibri-build (webpack/babel config) and kolibri-i18n (message extraction, code-gen), including a stub for kolibri-build's RTL CSS runtime module which Studio doesn't use
  • Make i18nSetup async with dynamic imports for locale data (matching Kolibri's pattern), upgrade to @vue/vue2-jest for proper <script setup> support

References

  • Kolibri's crowdin config: learningequality/kolibri crowdin.yml
  • Kolibri's i18n workflows: learningequality/kolibri .github/workflows/i18n-upload.yml / i18n-download.yml

Reviewer guidance

  • The crowdin.yml language mappings should be verified against the 5 languages currently on the Crowdin project (ar, es-ES, fr, hi, pt-BR)
  • contentcuration/contentcuration/frontend/shared/rtlcss-stub.js is a passthrough stub — kolibri-build's RTL plugin injects runtime code for dynamic RTL CSS chunk loading, but Studio does not code-split CSS assets yet, so the dynamic loading isn't needed
  • The async i18nSetup change relies on Jest 30's support for async setupFilesAfterEnv exports

AI usage

Used Claude Code throughout to implement the migration, guided by Kolibri's existing patterns. All changes were reviewed and verified — production build, full test suite (2099 passing), linting, and manual runtime console check.

rtibbles and others added 3 commits April 15, 2026 13:41
Replace the custom Python crowdin API script with the official
crowdin-cli tool. Add crowdin.yml config with language mappings
and GitHub Actions workflows for upload/download.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace kolibri-tools with kolibri-build (webpack/babel config) and
kolibri-i18n (message extraction, code-gen). Update package scripts,
dependabot config, and workspace settings accordingly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Make i18nSetup async with dynamic imports for locale data, matching
Kolibri's pattern. Switch from vue-jest to @vue/vue2-jest for proper
Vue 2.7 <script setup> support. Update LoadingText.vue to use shared
translator strings.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rtibbles rtibbles marked this pull request as ready for review April 15, 2026 20:43
* kolibri-build's WebpackRTLPlugin injects runtime code that accesses
* window.kolibriCoreAppGlobal["kolibri/rtlcss"].rtlManager to handle
* dynamic RTL CSS chunk loading. Studio doesn't use this mechanism
* (RTL CSS is served directly by Django), so we provide a passthrough
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

learn something new every day!

Copy link
Copy Markdown
Member

@marcellamaki marcellamaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am approving because there was only one small deviation from the cross referencing i did with kolibri and i don't know whether or not it's a blocker. if not, fine to proceed. otherwise i would defer to richard anyways

Comment thread crowdin.yml
@@ -0,0 +1,45 @@
#
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cross referenced with Kolibri -- looks good

Comment thread Makefile
# finds only the .po files nested there.
cd contentcuration && python manage.py compilemessages

CROWDIN_BRANCH ?= unstable
Copy link
Copy Markdown
Member

@marcellamaki marcellamaki Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I truly do not know if this is important but in Kolibri this is

CROWDIN_BRANCH := release

ETA here meaning the difference being ?= vs := not branhc name

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?= technically allows the value to be overridden by the command line - I left it like this just in case we have a specific need to override, but I don't think it matters.

Comment thread webpack.config.js
settings: ['./settings/index.js'],
accounts: ['./accounts/index.js'],
administration: ['./administration/index.js'],
// The rtlcss-stub must come first to set up the window global before any CSS chunk loading.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tricky!

@rtibbles rtibbles merged commit 732481c into learningequality:unstable Apr 16, 2026
13 checks passed
@rtibbles rtibbles deleted the i18n branch April 16, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants