Audit translation accuracy for strings changed in a GitHub PR. Use when asked to check, review, audit, or verify translations in a pull request. Identifies inaccurate translated strings by comparing PR changes against the English source.
Audit the translation accuracy of Android string resources changed in a GitHub pull request.
Run the extraction script from the skill's folder to get the changed strings from the PR:
python scripts/extract_pr_strings.py <pr-number>
The output includes both the translated value and the English source for each changed key — no repo search needed.
For each entry in added, compare value (translation) against english (source) using the accuracy criteria below.
Report findings as JSON (see Output Format).
Counts as inaccurate:
%s, %1$d, %2$s) are missing, reordered incorrectly, or alteredDoes NOT count as inaccurate:
scripts/extract_pr_strings.py (skill-local)The script parses the output of gh pr diff and extracts <string> elements from res/values-*/strings.xml patch hunks.
Usage:
python scripts/extract_pr_strings.py <pr-number>
Output schema:
{
"pr_number": 1234,
"locales": {
"values-pl": {
"added": [{"key": "some_key", "value": "translated text", "english": "English source text"}],
"removed": [{"key": "old_key", "value": "old translated text", "english": "English source text"}]
}
}
}
added — strings newly introduced or whose value was changed (new value)removed — strings that were deleted or whose value was changed (old value)english — the corresponding value from app/src/main/res/values/strings.xml; empty string if the key is not foundres/values-*/strings.xml files are included; the English res/values/strings.xml is excludedOutput ONLY a JSON blob:
{
"pr_number": 1234,
"inaccurate_translations": [
{
"key": "key_name",
"locale": "values-xx",
"reason": "Why it is inaccurate"
}
]
}
If all translations are accurate:
{
"pr_number": 1234,
"inaccurate_translations": []
}
Do not output any explanation, commentary, or text outside the JSON blob.