Index of every page on this site: llms.txt
All skills
devolutions avatar

/translation-diff-import

@bb42035
by devolutionsdevolutions/unigetui27k stars
991
Run it yourself

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.

  • 3 files
  • 10.3 KB
  • Updated 7 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/devolutions/unigetui/translation-diff-import

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈59 tokens for metadata: the name and description. ≈684 when used: this file.

Description uses 2.9% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈236 characters, or 2.9%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

translation diff import

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.

Prerequisites

  • PowerShell 7 (pwsh).
  • cirup available on PATH.

Scripts

  • 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.

Usage

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
  • -KeepIntermediate

Recommended 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

Output

  • A merged .json file that contains both the previously translated entries and the imported patch values.
  • If -KeepIntermediate is used, patch snapshots are preserved under generated/translation-diff-import/tmp/.

Edge cases

  • If the target JSON file does not exist yet, the script can create an output from the translated patch alone.
  • When -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.
  • The import skill expects .translated.json to remain sparse. Untranslated keys should be omitted instead of copied in English unless you intentionally bypass that check with -AllowUnchangedValues.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at bb42035. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 7 months ago

README badge

README badge for devolutions/unigetui/translation-diff-import