Commit fc59ba0
committed
l10n: docs: add translation instructions in AGENTS.md
Add a new "Translating po/XX.po" section to po/AGENTS.md with detailed
workflow and procedures for AI agents to translate language-specific PO
files. Users can invoke AI-assisted translation in coding tools with a
prompt such as:
"Translate the po/XX.po file by referring to @po/AGENTS.md"
Translation results serve as drafts; human contributors must review and
approve before submission.
To address the low translation efficiency of some LLMs, batch
translation replaces entry-by-entry translation. git-po-helper
implements a gettext JSON format for translation files, replacing PO
format during translation to enable batch processing.
Evaluation with the Qwen model:
git-po-helper agent-run --agent=qwen translate po/zh_CN.po
Test translation (127 entries, 50 per batch):
Initial state: 5998 translated, 91 fuzzy, 36 untranslated
Final state: 6125 translated, 0 fuzzy, 0 untranslated
Successfully translated: 127 entries (91 fuzzy + 36 untranslated)
Success rate: 100%
Benchmark results (3-run average):
AI agent using gettext tools:
| Metric | Value |
|------------------|--------------------------------|
| Avg. Num turns | 86 (176, 44, 40) |
| Avg. Exec. Time | 20m44s (39m56s, 14m38s, 7m38s) |
| Successful runs | 3/3 |
AI agent using git-po-helper (JSON batch flow):
| Metric | Value |
|------------------|--------------------------------|
| Avg. Num turns | 56 (68, 39, 63) |
| Avg. Exec. Time | 19m8s (28m55s, 9m1s, 19m28s) |
| Successful runs | 3/3 |
The git-po-helper flow reduces the number of turns (86 → 56) with
similar execution time; the bottleneck appears to be LLM processing
rather than network interaction.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>1 parent b569027 commit fc59ba0
1 file changed
Lines changed: 600 additions & 1 deletion
0 commit comments