]> git.ipfire.org Git - thirdparty/git.git/commit
l10n: docs: add translation instructions in AGENTS.md
authorJiang Xin <worldhello.net@gmail.com>
Sun, 15 Feb 2026 06:06:19 +0000 (14:06 +0800)
committerJiang Xin <worldhello.net@gmail.com>
Thu, 2 Apr 2026 23:36:52 +0000 (07:36 +0800)
commitfc59ba0dfe134fbb51230d50f396f5efc9ba1721
tree2450127bbed5f5336ab1f876f81a5279b39de23f
parentb5690272f2457bb667542c57ae52c37768f295b6
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>
po/AGENTS.md