collect-i18n-change-merge-requests
Skill3 starsChanged 9 months agoMITView on GitHub
Collect strict whitespace-prefixed merge request ids and corresponding changed i18n files from the source commits behind translation changes. Use when asked to analyze a git commit that changes language resource files such as `*_ar.properties`, `*_ja.js`, `*_fr_FR.jsp`, install templates, or `zh-CN.js` style editor resources; choose one language file per language group, map changed resources back to zh_CN or zh-CN baseline files, blame those source lines, and return deduplicated `\s!123` ids with file mappings while excluding repository-qualified ids such as `wmweb!123`.
In this repository8 other files it gives its agents.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use the bundled script for this task.
- Distinctive: line 17
Use git blame on each changed key or changed line in the baseline file to find the source commit for that text.
- Very specific: line 18
When the user supplies a source commit interval, analyze the latest translation commit first and limit those blamed source commits with …
- Very specific: line 23
Default supported extensions mirror template.NG/build/i18n/collectResources.js: .properties, .js, .jsp, .letter, .eml, .html, .cf, and .txt.
- Distinctive: line 27
Run from the git repository root:
- Distinctive: line 33
When a latest translation commit must be traced only to source commits in a given range, keep the two inputs separate:
- Very specific: line 53
Use the script output as the source of truth.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Collect I18n Change Merge Requests
Workflow
Use the bundled script for this task. It codifies the fragile parts of the workflow:
- Group language files by removing locale suffixes such as
_ar.properties,_ja.properties,_fr_FR.properties,_ar.js, and basename locale files such asar.js. - Pick one representative file per group, defaulting to the alphabetically first locale file.
- For
.properties, extract only property keys changed by the target commit's diff. - For other translation resources, extract changed new-file line numbers from the target commit's diff.
- Map each representative file to the matching
*_zh_CN.<ext>orzh-CN.jsbaseline. - Use
git blameon each changed key or changed line in the baseline file to find the source commit for that text. - When the user supplies a source commit interval, analyze the latest translation commit first and limit those blamed source commits with
--source-range; the interval is not the translation commit to analyze. - Extract only merge request ids matching strict whitespace-prefixed
!123with(?<=\s)!\d+. - Exclude repository-qualified ids such as
wmweb!1025. - Output both file-group to id mappings and id to changed-file-group mappings.
Default supported extensions mirror template.NG/build/i18n/collectResources.js: .properties, .js, .jsp, .letter, .eml, .html, .cf, and .txt.
Quick Start
Run from the git repository root:
python3 /path/to/collect-i18n-change-merge-requests/scripts/collect_i18n_change_mrs.py HEADWhen a latest translation commit must be traced only to source commits in a given range, keep the two inputs separate:
python3 /path/to/collect-i18n-change-merge-requests/scripts/collect_i18n_change_mrs.py HEAD --source-range <base>..<tip>Useful options:
python3 /path/to/collect-i18n-change-merge-requests/scripts/collect_i18n_change_mrs.py <commit> --json
python3 /path/to/collect-i18n-change-merge-requests/scripts/collect_i18n_change_mrs.py <commit> --no-groups
python3 /path/to/collect-i18n-change-merge-requests/scripts/collect_i18n_change_mrs.py <commit> --locales ar,ja,ko,vi
python3 /path/to/collect-i18n-change-merge-requests/scripts/collect_i18n_change_mrs.py <commit> --extensions properties,js,jsp,letter,eml,html,cf,txt
python3 /path/to/collect-i18n-change-merge-requests/scripts/collect_i18n_change_mrs.py <translation-commit> --source-range <base>..<tip> --jsonReporting
Report the total deduplicated ids first, then include the corresponding changed file groups for each id. State the translation commit analyzed, any source range applied, and the strict extraction rule. If the script reports missing baseline keys, include that as residual risk rather than inventing ids from full file history.
Use the script output as the source of truth. Do not fall back to git log -- <file> for the whole file unless the user explicitly asks for full-file history.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

