i18n-sync

Detect translation gaps and stub missing keys across locale files.

19|31|Updated May 29, 2025
One-click install
npx skills add https://github.com/grafana/grafana-pathfinder-app --skill i18n-sync-grafana
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: i18n-sync
Source: https://github.com/grafana/grafana-pathfinder-app/tree/main/.cursor/skills/i18n-sync
Command: npx skills add https://github.com/grafana/grafana-pathfinder-app --skill i18n-sync-grafana

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Detect translation gaps across the 21 locales under src/locales. For keys present in en-US but missing from another locale, add the key with an empty string value (matching the runtime fallback to the en-US default). Emit a gap report (filled / empty / stale counts per locale + the list of newly stubbed keys). Never invent translations; translators fill the empty stubs later.

Core Features & Use Cases

  • Gap detection: identify missing keys in non-English locales compared to en-US.
  • Gap reporting: emit per-locale tallies (filled, empty, missing) and list newly stubbed keys.
  • Non-destructive edits: stub missing keys with empty strings without modifying en-US or existing translations.

Quick Start

Run the i18n-sync workflow to stub missing keys across all locales.

Frequently Asked Questions about i18n-sync

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

FAQPage Schema
How do I detect missing translation keys across multiple locale JSON files?

Detecting missing translation keys involves comparing locale JSON files against the en-US baseline. This workflow identifies absent keys in non-English locales and adds empty string stubs, emitting a detailed gap report with filled, empty, and stale counts per locale.

What is the best way to add empty stubs for missing i18n keys in src/locales?

The best way to add empty stubs for missing i18n keys is running the i18n-sync workflow. It targets keys under src/locales, safely adding missing entries with empty string values to non-English locale files without modifying existing translations or the en-US source.

Can I automatically generate a localization gap analysis report for multiple locales?

You can automatically generate a localization gap analysis report by running the i18n-sync workflow. It produces per-locale tallies of filled, empty, and missing keys, along with a list of newly stubbed keys across all 21 target locales.

Does i18n-sync modify the en-US locale or existing translations during gap detection?

i18n-sync does not modify the en-US locale or existing translations during gap detection. It enforces strict constraints to only edit non-English locale JSON files, inserting empty string stubs for missing keys while preserving all previously translated content.

Why does my i18n workflow need to run i18n-extract with failOnWarnings after stubbing missing keys?

Your i18n workflow needs to run i18n-extract with failOnWarnings after stubbing missing keys to validate the localization changes. This hard constraint ensures the generated JSON stubs across all locales remain structurally valid and synchronized with the en-US baseline.