Translation Diff Translate translation-diff-translate
Translates a sparse UniGetUI JSON language patch, writes completed entries into the working copy, preserves placeholders and terminology, and prepares the patch for merge-back.
Use it when the user asks to translate or localize i18n strings, localization JSON, or language-file patches.
- Our test
- —
- not tested yet
- GitHub stars
- 28k
- devolutions/unigetui
- Added by
- 0
- members
- Updated
- Dec 6
- commit f32560b
- Content
- 2 files
- 1 script · 7 KB
- License
- MIT
- free to use
What our test found
Not tested yet. Our model tries every skill on a realistic request and scores the result, the most popular skills first. Until then, the safety checks on the right still apply.
name: translation-diff-translate description: Translates a sparse UniGetUI JSON language patch, writes completed entries into the working copy, preserves placeholders and terminology, and prepares the patch for merge-back. Use when the user asks to translate or localize i18n strings, localization JSON, or language-file patches.
translation diff translate
Use this skill after translation-diff-export produced a .source.json, .translated.json, and .reference.json set and you want to update the sparse translated working copy.
It translates only the active patch keys, keeps .translated.json as the sole writable file, preserves placeholders and formatting, and hands the completed working copy to translation-diff-import for merge-back.
Execution Expectations
- Edit
.translated.jsondirectly. Do not create helper scripts, temporary reports, or coverage probes. - Do not install packages or search for external translation services unless the user explicitly asks for automation.
- If
.translated.jsonis empty, that is expected. Translate from.source.jsoninto.translated.json. - Use
.reference.jsononly as terminology guidance, not as a reason to pause and analyze the rest of the repository. - If the patch is too large to finish reasonably in one pass, report that constraint to the user instead of creating automation on your own.
Script
scripts/write-translation-handoff.ps1: Writes a small.prompt.mdfile that points an agent at this skill with the concrete patch paths created by the export skill.
Usage
Generate a handoff prompt for a translated French working copy:
pwsh ./.agents/skills/translation-diff-translate/scripts/write-translation-handoff.ps1 \
-BaseName lang \
-Language fr \
-SourcePatch ./generated/translation-diff-export/lang.diff.fr.source.json \
-TranslatedPatch ./generated/translation-diff-export/lang.diff.fr.translated.json \
-ReferencePatch ./generated/translation-diff-export/lang.diff.fr.reference.json \
-TargetJson ./src/Languages/lang_fr.json \
-NeutralJson ./src/Languages/lang_en.json \
-MergedTargetJson ./src/Languages/lang_fr.merged.json \
-ValidationScript ./.agents/skills/translation-diff-import/scripts/validate-language-file.ps1 \
-OutputPrompt ./generated/translation-diff-export/lang.diff.fr.prompt.mdTranslation Rules
- Do not edit
.source.json. - Write completed translations only into
.translated.json. - If a key is not translated yet, omit it from
.translated.jsoninstead of copying the English source value. - Preserve key names exactly as-is.
- Preserve placeholders, named tokens, HTML-like fragments, escape sequences, and line breaks.
- Keep translated entries in the same key order as
.source.jsonwhen adding new entries. - Use
.reference.jsonto match existing terminology and tone in the destination language. - Do not introduce keys that are not present in the source patch.
After Translation
Merge the sparse working copy back into the full destination-language file:
pwsh ./.agents/skills/translation-diff-import/scripts/import-translation-diff.ps1 \
-TranslatedPatch ./generated/translation-diff-export/lang.diff.fr.translated.json \
-SourcePatch ./generated/translation-diff-export/lang.diff.fr.source.json \
-TargetJson ./src/Languages/lang_fr.json \
-NeutralJson ./src/Languages/lang_en.json \
-OutputJson ./src/Languages/lang_fr.merged.json
pwsh ./.agents/skills/translation-diff-import/scripts/validate-language-file.ps1 \
-NeutralJson ./src/Languages/lang_en.json \
-TargetJson ./src/Languages/lang_fr.merged.json \
-PatchJson ./generated/translation-diff-export/lang.diff.fr.source.json