{"data":{"slug":"discovered-eddb295f3908880ab53ffe799cb0cfbbaba1c4192ff1110f","title":"Translate","summary":"Update, add, or delete i18n translation nodes while keeping every accompanying language file structurally in sync. Use \/translate for translation files of any format, locale drift, missing keys, or user-facing copy changes.","url":"https:\/\/skillshunter.net\/skills\/discovered-eddb295f3908880ab53ffe799cb0cfbbaba1c4192ff1110f","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-eddb295f3908880ab53ffe799cb0cfbbaba1c4192ff1110f","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-eddb295f3908880ab53ffe799cb0cfbbaba1c4192ff1110f.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-eddb295f3908880ab53ffe799cb0cfbbaba1c4192ff1110f\/download","category":{"slug":"content-editorial","name":"Content & Editorial"},"editor_note":"Before making changes, read repository instructions to determine the locale layout and default or source language. Ensure that every accompanying language file is updated with the same structural changes, including adding, updating, renaming, moving, or deleting nodes. Preserve interpolation variables, plural\/select branches, and formatting. Run the repository's format-native parser or tests, and use the bundled locale-tree checker when supported by `yq`.","instructions":"---\nname: translate\ndescription: Update, add, or delete i18n translation nodes while keeping every accompanying language file structurally in sync. Use \/translate for translation files of any format, locale drift, missing keys, or user-facing copy changes.\nlicense: MIT\nmetadata:\n  author: damacus\n---\n\n# Translate\n\nUse `\/translate` whenever a task updates, adds, renames, or deletes a node in a\ntranslation file. This applies to translation files of any format, including\nYAML, JSON, TOML, properties, gettext, and framework-specific locale formats.\n\n## Non-Negotiable Rule\n\nA translation-tree change is incomplete until the equivalent node change has\nbeen made in every accompanying language.\n\nThis remains true when the request names only one locale file: treat that file\nas the starting point, then inspect and update the repository's other locales.\n\nFor example, if `en.yml` changes and the repository also contains Spanish,\nPolish, and Welsh locale files, update all four files in the same change. Do not\nupdate only the source or default locale.\n\n## Workflow\n\n1. Read repository instructions and determine the locale layout and default or\n   source language.\n2. Find every accompanying language file. Check sibling locale files, split\n   locale directories, and framework configuration; do not assume the languages\n   from the files already changed.\n3. Identify each node being added, updated, renamed, moved, or deleted.\n4. Apply the same structural operation to every language:\n   - add the same node path and translate its value;\n   - update the corresponding meaning in each language;\n   - rename or move the same node path everywhere;\n   - delete the obsolete node everywhere.\n5. Preserve interpolation variables exactly, including `%{name}`, `{{name}}`,\n   printf-style placeholders, and format-specific escaping.\n6. Preserve plural, gender, select, and HTML-safe branches. Do not collapse\n   branches such as `zero`, `one`, `few`, `many`, and `other`.\n7. Preserve each file's ordering, comments, quoting, encoding, and established\n   formatting where its format permits this.\n8. Run the repository's format-native parser or tests, then run the bundled\n   locale-tree checker when the files use a format supported by `yq`.\n\nDo not silently copy source-language text into other locales unless the project\nexplicitly uses source text as its fallback policy. If a translation is\nambiguous or domain-specific, call that out rather than inventing terminology.\n\n## Locale Tree Checker\n\nThe bundled checker compares node paths and node kinds. It ignores translated\nvalues and normalizes a single top-level locale key, so `en.greeting` and\n`es.greeting` are treated as the same logical path.\n\nFrom the directory containing this `SKILL.md`, run the checker with only a\nreference file to discover locale-named sibling files having the same extension:\n\n```bash\n.\/scripts\/check_locale_sync.sh \/path\/to\/project\/config\/locales\/en.yml\n```\n\nPass files explicitly for split directories, mixed extensions, or locale\nlayouts the discovery rule cannot infer safely:\n\n```bash\n.\/scripts\/check_locale_sync.sh \\\n  \/path\/to\/project\/locales\/en\/messages.yml \\\n  \/path\/to\/project\/locales\/es\/messages.yml \\\n  \/path\/to\/project\/locales\/pl\/messages.yml \\\n  \/path\/to\/project\/locales\/cy\/messages.yml\n```\n\nThe checker requires mikefarah `yq` v4 and accepts formats it can parse, such as\nYAML, JSON, TOML, XML, properties, and INI. For formats `yq` cannot parse, such\nas gettext PO, use the format's native validation tooling and manually verify\nthe same node set across all languages.\n\n## Completion Checks\n\n- Every supported language was identified and updated.\n- Added, renamed, moved, and deleted paths are structurally identical across\n  locale files.\n- Interpolation variables and plural\/select branches match across languages.\n- Every translation file parses successfully.\n- The bundled sync checker passes where applicable.\n- The patch contains no unrelated translation churn.\n","use_cases":["Maintaining consistent translations across multiple locales in a project","Updating user-facing copy in all supported languages simultaneously","Ensuring interpolation variables and plural\/select branches are preserved across languages","Validating translation file structure with a locale-tree checker"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/damacus\/skills\/blob\/5706f70c0058822adf29da9bd7620c7ea780b9d6\/skills\/productivity\/translate\/SKILL.md","source_commit":"5706f70c0058822adf29da9bd7620c7ea780b9d6","license":null,"version":null,"listing_approved_at":"2026-12-02","created_at":"2026-11-30T08:54:43.000000Z","updated_at":"2026-12-02T09:15:01.000000Z","seo_title":"Translation Synchronization for Multilingual Projects","seo_description":"Ensure all language files are structurally in sync when updating, adding, or deleting i18n translation nodes. Supports YAML, JSON, TOML, and other formats.","seo_keywords":["i18n translation","locale synchronization","translation file management","multilingual project maintenance","translation node updates"]}}