Skip to content
shigurewindPublic

About

QA for Chinese-to-Japanese game localization: rule checks for placeholders, tags, numbers, glossary, plus a Claude review for mistranslation and character voice.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LocQA — Game Localization QA for Chinese → Japanese

LocQA checks a translated string table before it ships and produces a report a localization lead can act on.

It runs in two passes:

  1. Rule checks (instant, free, no API key): broken placeholders and tags, changed numbers, UI length overflow, glossary violations, Simplified Chinese characters left in Japanese text, missing line breaks, empty strings.
  2. AI review (optional, uses Claude): mistranslations, omissions, character-voice and tone problems, unnatural Japanese. It returns a suggested fix for each issue.

The non-zero exit code on errors lets you put it in CI and block a broken string table before it reaches a build.

report screenshot

Why

Most localization bugs that reach players are mechanical: {1} deleted from a reward popup, [icon=btn_a] changed to btn_b, a stat value of 150 that became 1500, a button label too long for its frame. Human reviewers miss these because they read for meaning. LocQA catches the mechanical ones automatically, so reviewers can spend their time on meaning and voice. The AI review helps there too.

Quick start

python -m locqa check samples/strings.csv -g samples/glossary.csv

Open reports/report.html. The sample contains 21 strings with deliberately injected bugs. The rule pass finds 11 issues in 9 strings.

With the AI review (needs pip install anthropic and an Anthropic API key in ANTHROPIC_API_KEY):

pip install -r requirements.txt
python -m locqa check samples/strings.csv -g samples/glossary.csv -s samples/style_guide.txt --llm --lang ja

--lang sets the language of the AI comments (en, ja, zh).

Choosing where Claude runs

Set CLAUDE_PROVIDER:

value uses when
anthropic (default) Claude API, ANTHROPIC_API_KEY production, client work
bedrock Claude on Amazon Bedrock, your AWS credentials and AWS_REGION teams already on AWS
claude-code the local Claude Code CLI, signed in with your own Claude subscription local development and demos only, at no extra cost. Not for running a service for others
set CLAUDE_PROVIDER=claude-code
python -m locqa check samples/strings.csv -g samples/glossary.csv -s samples/style_guide.txt --llm

Input format

Strings — CSV or JSON:

column required example
id yes quest.reward
source yes 完成任务获得{0}金币和{1}经验。
target yes 任務を完了すると{0}ゴールドを獲得。
context no Princess Lyra - arrogant (speaker and situation; used by the AI review)
max_len no 6 (UI character limit)

Glossary — CSV or JSON with source, target, optional note.

Style guide — any plain text: character voices, UI conventions. Used only by the AI review.

Checks

check severity catches
placeholder error {0}, {name}, {{var}}, %s, %1$d missing or added (order may change)
tag error <color=…>, <b>, [icon=…] missing or altered
number error numbers changed (full-width digits are normalized; tag colors ignored)
length error target longer than max_len (markup excluded)
glossary error glossary term not translated as specified
script error Simplified-only characters (这, 个, 们 …) in Japanese text
untranslated error / warning empty target / target identical to source
linebreak warning \n or real line-break count differs
whitespace warning stray leading/trailing or double spaces
llm:* error / warning mistranslation, omission, tone, naturalness, terminology

Output

reports/report.html (filterable, works offline, light/dark), report.md (paste into a ticket), and report.json (for pipelines).

Tests

python -m unittest -v

Project layout

locqa/
  rules.py    deterministic checks
  llm.py      Claude semantic review (structured JSON output, batched)
  report.py   HTML / Markdown / JSON rendering
  loader.py   CSV / JSON input
  cli.py      command line
samples/      demo string table, glossary, style guide
tests/        unit tests for the rules

License

MIT


中文说明

LocQA 是一个面向「中文 → 日文」游戏本地化的自动 QA 工具。

  • 规则检查不需要 API,可以离线运行。它检查占位符、标签、数值、UI 字数、术语表,以及日文里残留的简体字。
  • 加上 --llm 后,会再用 Claude 检查误译、漏译、角色口吻和不自然的日语,并给出修改建议。

About

QA for Chinese-to-Japanese game localization: rule checks for placeholders, tags, numbers, glossary, plus a Claude review for mistranslation and character voice.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages