nexthink-campaign-translator

Installation
SKILL.md

Nexthink Campaign Translations

Use this skill when a user asks to translate a Nexthink campaign export or add languages to an existing export.

Read references/schema.md before editing an export. Use scripts/add_translations.py for structural changes and validation; let the model produce localized text, then pass that text to the script.

Allowed languages come from references/languages.json. It is the single configurable allowlist. Add or disable entries there, or pass an alternate file with --language-config; keep export codes and aliases in that registry rather than hardcoding them in the workflow.

Workflow

  1. Locate the campaign export JSON. Process .json files only; ignore sidecars such as :Zone.Identifier. If the request names multiple input files, process each independently. For an explicit request, read one base language and one or more target languages. Normalize names through the configured allowlist (French becomes fr) and reject disabled or unknown languages. Deduplicate targets while preserving request order. Skip the base language and report it.

    For a bare request such as translate this campaign, infer base language from multiLanguageInfo.baseLanguage and targets from multiLanguageInfo.additionalLanguages, followed by languages present in campaign.translations. Deduplicate, remove the base language, and use --from-export-languages. This uses only languages declared in the export. If both sources contain no target language, report that explicitly and do not guess.

  2. Compare the requested base language with campaign.multiLanguageInfo.baseLanguage. If the export has a different base language, stop and ask which source to use. Keep defaultLanguage unchanged; it may differ from baseLanguage in existing exports.

  3. Translate every base question's visible text and every base choice's visible text. Preserve rich HTML tags, attributes, inline styles, href values, whitespace that affects rendering, and HTML entities. Translate text nodes and choice labels only. Keep sender metadata, question metadata, choice behavior, links, and embedded images unchanged.

  4. Protect every exact token matching {{...}} or {...} before translating. Put the exact token back in the same semantic location. This includes {user} and parameters inside HTML attributes such as https://{{announcement_link}}. Never translate, rename, or reformat protected tokens.

Installs
1
Repository
synit-io/skills
First Seen
1 day ago
nexthink-campaign-translator — synit-io/skills