Skip to content
cccskills
FreePublished on GitHub

i18n-context

Use this skill when the same English text needs different translations in different parts of an application. It adds gettext context at the source, updates affected PO entries, and guides validation of translations and formatting checks for the touched locale.

OriginalShow the original description

Add gettext context for ambiguous user-facing strings and repair affected PO translations.

cataclysmbn/Cataclysm-BN1,289 stars(GitHub 1,289 + cccskills 0)

Run score Not tested

See how to install

Good for

  • Separate translations for an ambiguous label
  • Add context to translated JSON strings
  • Update and validate affected PO entries

Files included (1)

  • SKILL.md2.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

I18n Context

Use this when one English msgid has multiple meanings and a locale needs different translations.

Hard requirements

  • Do not reduce requested word/context coverage for review risk, churn, or convenience.
  • If a requested meaning needs loader support for contextual translation, add loader support.
  • Do not open or update a PR while msgfmt or printf checks fail for the touched locale.
  • Do not dismiss msgfmt/printf failures as pre-existing when this task touches that locale.

Workflow

  • Find every shared msgid before editing:
    • rg -n 'msgid "<word>"|msgctxt .*\nmsgid "<word>"' lang/po/<lang>.po
    • rg -n '"<word>"|translate_marker\( "<word>" \)|_\( "<word>" \)' data src
  • Split meanings at the source, following #8729 and #8741:
    • C++ runtime strings: pgettext( "short specific context", "text" ).
    • C++ marker-only strings: translate_marker_context( "short specific context", "text" ).
    • JSON translated strings: { "ctxt": "short specific context", "str": "text" } or matching plural fields.
    • Snippet arrays: { "text": { "ctxt": "short specific context", "str": "text" } }.
    • If a JSON field is currently std::string, convert it to translation so contextual JSON can load.
  • Keep context names terse and UI-specific, e.g. time format, map extra, music genre, damage type.
  • Update lang/po/<lang>.po for each new msgctxt; do not rely on the old shared msgstr.
  • Preserve old uncontexted entries only when some source still uses the shared msgid.
  • For Korean, check existing glossary first:
    • rg -C2 -i '<term>' lang/po/ko.po | rg -v '^(#:|--)' | head -n 20
  • Validate after editing:
    • python3 lang/extract_json_strings.py -i data/json -o /tmp/catabn-i18n-context.pot --tracked-only
    • msgfmt -f -c -o /tmp/ko.mo lang/po/ko.po
    • ./tools/check_po_printf_format.py
    • If JSON changed, run ./build-scripts/lint-json.sh.

PR references

  • #8729 split ambiguous yes/no labels in C++ with pgettext and translate_marker_context.
  • #8741 split ambiguous animal/action/species/fish names in JSON with ctxt and updated PO entries.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Use this skill to expose Cataclysm-BN game functions and utilities to Lua. It guides you through organizing functions into libraries, registering constants and callbacks, documenting the API, and handling errors so Lua scripts can use the new bindings.

  • Expose game or map functions to Lua
  • Add constants or utility functions to a Lua library
  • Let Lua scripts register callbacks
cataclysmbn/Cataclysm-BN1.3KUpdated Oct 27, 2026

Expose complex C++ classes to Lua by adding bindings for methods, inheritance, constructors, properties, and operators. The skill also guides ownership handling and registration so Lua scripts can use the intended class interface.

  • Exposing a C++ class to Lua
  • Binding inherited class methods
  • Adding constructors and properties
cataclysmbn/Cataclysm-BN1.3KUpdated Oct 27, 2026

Add Lua bindings that let Cataclysm-BN scripts access simple C++ types, including string IDs, enums, and basic read-only classes. The skill guides documentation macros, registration in the appropriate source file, and build and in-game checks.

  • Exposing a C++ string ID to Lua
  • Registering an enum for Lua scripts
  • Making a basic read-only C++ type available to Lua
cataclysmbn/Cataclysm-BN1.3KUpdated Oct 27, 2026

changelog-gen

FreeSummary

Generate and synchronize player-facing changelog files across English, Korean, and Japanese from a Git reference range. It groups related changes, organizes featured updates and fixes, and preserves localized labels and relevant media.

  • Preparing changelogs between two Git refs
  • Updating English, Korean, and Japanese release notes
  • Grouping related player-facing changes
cataclysmbn/Cataclysm-BN1.3KUpdated Oct 27, 2026

deno-script

FreeSummary

Create or update Deno and TypeScript scripts for Cataclysm-BN, following the project’s conventions. Use it for command-line tools, data migrations, code or documentation generators, Git hooks, and other development utilities.

  • Creating a Deno command-line utility
  • Writing a data migration script
  • Generating code or documentation
cataclysmbn/Cataclysm-BN1.3KUpdated Oct 27, 2026

A practical reference for adding Lua bindings to Cataclysm-BN. Look up Luna macros, usertypes, libraries, type and function patterns, documentation helpers, build steps, and common errors, with examples showing how C++ types and functions become usable from Lua.

  • Look up Luna macros for a type
  • Register C++ methods and properties for Lua
  • Troubleshoot binding or build errors
cataclysmbn/Cataclysm-BN1.3KUpdated Oct 27, 2026

See all skills by cataclysmbn

Report a problem with this skill