一键导入
translation-diff-import
// Merges translated key-value pairs from a UniGetUI JSON localization patch back into the full language file and validates the merged result. Use when the user asks to apply, merge, or import a translation patch.
// Merges translated key-value pairs from a UniGetUI JSON localization patch back into the full language file and validates the merged result. Use when the user asks to apply, merge, or import a translation patch.
Synchronizes the UniGetUI English language file with source-code usage, identifies missing translation keys, removes unused entries, reports localization drift, and can reorder locale files to match the English key ordering. Use when the user asks to sync language files, missing translations, i18n drift, or align locale file ordering with English.
Analyzes checked-in UniGetUI language files to calculate translation percentages, surface untranslated coverage data, and generate localization status reports.
Compares UniGetUI JSON locale files against English, identifies untranslated or source-changed keys, and generates patch, reference, and handoff files for a target language. Use when the user asks to export missing translations, untranslated strings, i18n diffs, or locale-file changes.
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.
Reviews UniGetUI .json language files for localization quality, detects parity issues, English-equal entries, wrong-script content, and cross-language outliers, then generates a dataset for LLM-assisted linguistic review. Use when the user asks to review translations, audit localization, inspect i18n or l10n quality, or validate language files.
| name | translation-diff-import |
| description | Merges translated key-value pairs from a UniGetUI JSON localization patch back into the full language file and validates the merged result. Use when the user asks to apply, merge, or import a translation patch. |
Use this skill after the export skill produced a .source.json, .translated.json, and .reference.json set and you want to merge the translated working copy back into the full target-language JSON file.
See translation-diff-export for the patch-generation step that produces the expected inputs.
pwsh).cirup available on PATH.scripts/import-translation-diff.ps1: Validates and merges a translated patch into the full language file.scripts/validate-language-file.ps1: Validates placeholder, token, HTML-fragment, and newline parity for either a full language file or just the active patch keys against lang_en.json.Import the translated French working copy from the export skill into the full French JSON 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
Validate the merged output:
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
Optional parameters:
-OutputDir (default: generated/translation-diff-import)-AllowUnchangedValues-KeepIntermediateRecommended input mapping from the export skill:
-TranslatedPatch: generated/translation-diff-export/lang.diff.fr.translated.json-SourcePatch: generated/translation-diff-export/lang.diff.fr.source.json.json file that contains both the previously translated entries and the imported patch values.-KeepIntermediate is used, patch snapshots are preserved under generated/translation-diff-import/tmp/.-SourcePatch is provided, the script validates translated keys, placeholder tokens, HTML-like fragments, newline counts, and likely untranslated values before delegating the merge to cirup while allowing missing keys for partial progress..translated.json to remain sparse. Untranslated keys should be omitted instead of copied in English unless you intentionally bypass that check with -AllowUnchangedValues.