← ClaudeAtlas

enhanced-message-contextlisted

Add translator comments to Lingui messages so translations are accurate. Use when adding or modifying translatable messages, when strings are short or ambiguous ("Back", "Delete", "Post"), when placeholders are unclear ({count}, {name}), when deciding between comment and context, or when auditing extracted .po catalogs for missing translator context.
lingui/skills · ★ 9 · Web & Frontend · score 79
Install: claude install-skill lingui/skills
# Enhanced Message Context When implementing Lingui i18n, add translator comments to the messages that need them, so translators have the context to choose the right tone, length, and wording. Which messages need them is the whole question, and the tiers below answer it: a short label carries almost no context of its own and a full sentence carries most of it, so they earn very different treatment. ## Know the App Domain First Before writing comments, identify what the product is about — check `package.json` description, the README, and route/component names. The domain disambiguates terms that are otherwise unresolvable: in a parking app, "Park" is a parking spot, not a nature park; in a social app, "Post" is likely a noun. Reference the domain in comments whenever a term is domain-sensitive. ## When to Add Comments Prioritize in tiers: **Must comment** — translations will be wrong without it: - **Ambiguous short strings**: 1-2 word phrases with multiple meanings or parts of speech - "Back" (noun or verb?), "Delete" (button or confirmation?), "Close" (verb or adjective?) - **Action labels without a visible object**: the code shows what's acted on, the translator can't see it - "Remove" (remove what?), "Apply" (apply to what?) - **Domain-sensitive terms**: words whose meaning depends on the product - "Post" (verb or noun?), "Tag" (noun or verb?), "Park" (spot or greenspace?) - **Grammatical-gender dependence**: the translation depends on what the message refers t