Skip to content

Fix plugin string extraction for Crowdin uploads - #15203

Merged
marcellamaki merged 2 commits into
learningequality:developfrom
rtibbles:fix-crowdin-plugin-string-extraction
Aug 20, 2026
Merged

Fix plugin string extraction for Crowdin uploads#15203
marcellamaki merged 2 commits into
learningequality:developfrom
rtibbles:fix-crowdin-plugin-string-extraction

Conversation

@rtibbles

Copy link
Copy Markdown
Member

Summary

Fixes issue with resolving python from read_webpack_json.js outside of an activated venv context
Excludes 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.

rtibbles and others added 2 commits August 15, 2026 16:21
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
@github-actions github-actions Bot added APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend SIZE: small labels Aug 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

npm Package Versions

Warning

The following packages have changed files but no version bump:

Package Version Changed files
kolibri-build 1.1.3 1

If these changes affect published code, consider bumping the version.

@github-actions

Copy link
Copy Markdown
Contributor

@rtibbles
rtibbles marked this pull request as ready for review August 17, 2026 16:48

@marcellamaki marcellamaki left a comment

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.

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

@marcellamaki
marcellamaki merged commit f64bbc2 into learningequality:develop Aug 20, 2026
93 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend SIZE: small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants