enhanced-message-context

Add contextual translator comments to ambiguous Lingui messages in React and JavaScript.

1|Updated Jun 27, 2026
One-click install
npx skills add https://github.com/babually/bongo-template --skill enhanced-message-context-babually
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: enhanced-message-context
Source: https://github.com/babually/bongo-template/tree/main/.agents/skills/enhanced-message-context
Command: npx skills add https://github.com/babually/bongo-template --skill enhanced-message-context-babually

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you write better Lingui translation messages by adding translator comments that remove ambiguity and explain where the text appears in the product.

Core Features & Use Cases

  • Ambiguity Reduction: Clarifies short or context-sensitive strings like button labels, status text, and table headers.
  • UI-Aware Translation Guidance: Adds location, purpose, and disambiguation details so translators can choose the right tone and wording.
  • Lingui Integration: Supports comments for t, Trans, and defineMessage workflows across JavaScript and React code.
  • Use Case: A button labeled “Back” can mean navigation or a noun; this Skill helps annotate it so translators localize it correctly.

Quick Start

Add a clear translator comment to each ambiguous Lingui message so the translation team understands its UI context and intended meaning.

Frequently Asked Questions about enhanced-message-context

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add translator comments to Lingui messages in React?

To add translator comments to Lingui messages in React, you annotate ambiguous strings using the comment fields available in the `t`, `Trans`, and `defineMessage` formats. This provides UI location and purpose context directly in the code.

Why do Lingui translations have incorrect context for short UI strings?

Lingui translations often lack context for short UI strings because message extraction pulls raw text without visual placement. Adding descriptive translator comments clarifies button labels and status text for the localization team.

Does Lingui support translator comments for JavaScript i18n workflows?

Yes, Lingui supports translator comments for JavaScript i18n workflows by extracting comment fields attached to `t`, `Trans`, and `defineMessage` messages. These comments are pulled into translation catalogs to guide linguists.

What is the best way to disambiguate Lingui messages for localization?

The best way to disambiguate Lingui messages for localization is adding UI-aware translator comments that detail the text location and purpose. This ensures linguists choose the correct tone for ambiguous words like navigation buttons.

When do I need to add UI context to Lingui translation messages?

You need to add UI context to Lingui translation messages whenever a string is ambiguous, domain-specific, or lacks clear visual placement. Short labels like a navigation Back button require disambiguation comments to prevent translation errors.