name: translate description: Translate web user interface strings from English to another language.
Translate Skill
Use this skill when asked to translate.
Key Principles
- The source language is always English.
- Identify the target language. If the target language is not specified, ask the user.
- Preserve the original formatting, structure, and markup.
- Keep placeholders unchanged — only translate human-readable text.
- Maintain the tone and style of the original (formal, informal, technical).
Guidelines
Translating .po files:
- The
.pofiles are located in thesrc/nsupdate/localedirectory. - Follow the standard gettext format and only fill in
msgstrentries. - Never change the
msgidentries. - When asked to translate missing strings, only process the strings with currently empty
msgstrentries. - After any edits to a
.pofile, always validate and compile it:- Validate:
msgfmt --check-format -o /dev/null <path/to/file.po> - Compile:
msgfmt -o <path/to/file.mo> <path/to/file.po>(output.moin the same directory as the.pofile) - Validate the compiled
.mofile:msgunfmt <path/to/file.mo> | msgfmt --check-format -o /dev/null -
- Validate:
Quality:
- Prefer natural, fluent translations over literal word-for-word translations.
- For ambiguous terms, add a brief translator's note as a comment if appropriate.
- Always check the
glossaries/<TARGET_LANGUAGE>.mdfile to produce a consistent translation. - If the text contains domain-specific jargon (e.g., DNS, networking), use the accepted terminology in the target language.
Scripts:
scripts/find_missing.py <language_code>— finds all entries with emptymsgstrin a.pofile for the given language. Use it to identify which strings still need translation.