Fix plugin string extraction for Crowdin uploads - #15203
Merged
marcellamaki merged 2 commits intoAug 20, 2026
Merged
Conversation
webpack_json.py imports each plugin module to find its buildConfig.js, so it needs the interpreter the plugins are installed into. A bare `python` is the system interpreter wherever the build runs outside an activated shell, and the python_packages/* members are not importable there — the Crowdin upload failed on kolibri_demo_server_plugin for exactly this reason, one line after the Makefile's `uv run python -c "import ..."` guard had passed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HkePtEQUF73hQuovbiQ85Q
__tests__ was in scope for the extraction glob, so every spec calling createTranslator(Component.name, ...) logged an unresolvable-namespace error — 33 of them per run. Worse, AssessmentWrapper.spec.js declares PerseusRendererIndex hint/noMoreHint with literal messages and no context, which overwrote the real definitions: both strings have been reaching Crowdin with an empty Context field. checkForDuplicateIds compares message only, so it never flagged the collision. Same 5839 identifiers extract either way; the two strings regain their context. LearnerExerciseReport's empty $trs went with it, being the last warning left. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HkePtEQUF73hQuovbiQ85Q
Contributor
npm Package VersionsWarning The following packages have changed files but no version bump:
If these changes affect published code, consider bumping the version. |
Contributor
Build Artifacts
Smoke test screenshot |
rtibbles
marked this pull request as ready for review
August 17, 2026 16:48
marcellamaki
approved these changes
Aug 20, 2026
marcellamaki
left a comment
Member
There was a problem hiding this comment.
pnpm run makemessages
> kolibri-root@0.12.0-dev.1 makemessages /Users/marcellamaki/Documents/learning-equality/kolibri
> kolibri-i18n extract-messages --pluginFile ./build_tools/build_plugins.txt --namespace kolibri-common --searchPath ./packages/kolibri-common --namespace kolibri-core --searchPath ./packages/kolibri
Gathering relevant modules from ['kolibri.core', 'kolibri.plugins.*']
Writing webpack_json output to /var/folders/dz/0zbf87657772n4tlp30904m00000gn/T/2026720-40534-h6k3d4.tvou.json
INFO: Writing webpack_json output to /var/folders/dz/0zbf87657772n4tlp30904m00000gn/T/2026720-40534-h6k3d4.tvou.json
Code review makes sense, and the outputs look as expected
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.
Summary
Fixes issue with resolving
pythonfrom read_webpack_json.js outside of an activated venv contextExcludes tests folders to prevent extraction of messages from test files
Deletes empty $trs
References
First seen: https://github.com/learningequality/kolibri/actions/runs/31639853467
Reviewer guidance
Run make messages locally and make sure there's no error output
AI usage
Used Claude Code to diagnose the failing Crowdin upload and write both fixes. Verified with manual runs of the extraction target and prek.