Severity: Warning — does not affect exit code or fail CI builds.
Detection Rule
A key is flagged with replica lag if it:- Exists in the primary locale (e.g.,
messages/en.json) - Is missing from one or more replica locales (e.g.,
messages/zh.json,messages/es.json)
What Gets Detected
Missing Translations in Replica Locales
Keys added to the primary locale but not yet translated:messages/en.json (primary)
messages/zh.json (replica)
messages/es.json (replica)
Nested Keys Missing
Entire sections missing from replica locales:messages/en.json (primary)
messages/fr.json (replica)
Output Format
Severity
Warning - Replica lag doesn’t cause build failures, but it results in:- Fallback to primary locale at runtime (users see untranslated text)
- Incomplete user experience for non-primary locales
- next-intl may show console warnings about missing translations
How to Fix
Option 1: Add Missing Translations (Recommended)
Add the missing keys to all replica locales:messages/zh.json
messages/es.json
Option 2: Use Translation Tools
For large projects, consider:- Translation Management Systems (TMS) like Crowdin, Lokalise, or Phrase
- AI Translation as a starting point (then review/refine)
- Translation Services for professional translations
Option 3: Accept Temporarily
During active development:- Replica lag warnings are informational
- They don’t fail builds
- You can track translation debt and address it before release
Option 4: Sync Script
Create a script to copy untranslated keys from primary to replica locales as TODO markers:Real-World Workflow
Development Phase
- Add new feature to your app
- Add translation keys to primary locale only
- Replica lag warnings appear (expected)
- Continue development without blocking
Pre-Release Phase
- Review replica lag warnings
- Prioritize translations for target locales
- Add translations or use TMS
- Verify with
glot check replica-lag
CI/CD Integration
Configuration
Locale Settings
Ensure your configuration includes all locales:.glotrc.json
locales array have complete translations matching the primary locale.
Ignoring Specific Locales
If you’re not ready to support certain locales, remove them from thelocales array:
.glotrc.json
Related Checks
Replica Lag vs Other Checks
| Check | What it finds | Direction |
|---|---|---|
replica-lag | Keys in primary missing from replicas | Primary → Replica |
orphan | Keys in replicas not in primary | Replica → Primary |
untranslated | Keys in replicas with same value as primary | Value comparison |
messages/en.json (primary)
messages/zh.json (replica)
- replica-lag:
common.newButton(in primary, missing from replica) - orphan:
common.oldButton(in replica, not in primary) - untranslated:
common.submit(same value in both)
Examples
Multi-Locale Project
Multi-Locale Project
Primary locale (en):Replica locales:Glot output:Only
messages/en.json
messages/zh.json
messages/es.json
zh needs the translation; es already has it.Tracking Translation Progress
Tracking Translation Progress
Use glot to track how complete your translations are:This helps you prioritize translation work and track progress toward 100% coverage.
Best Practices
1. Translate in Batches
Don’t translate every key immediately:- Add keys to primary locale as you develop
- Batch translation work before releases
- Use replica-lag warnings to track what needs translation
2. Primary Locale First
Always complete the primary locale before translating:- Finalize English (or your primary) text first
- Avoid translating keys that might change
- Use replica-lag to ensure primary is complete
3. Automate When Possible
Use tools to streamline translation:- TMS integration (Crowdin, Lokalise)
- AI-assisted translation (review before committing)
- Scripts to detect and batch missing keys
4. Document Translation Status
Add comments to track translation status:messages/zh.json