consolidate-duplicate-i18n-keys

Scan TypeScript and locale JSON files to consolidate duplicate i18n keys.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/OrderlyNetwork/dex-creator --skill consolidate-duplicate-i18n-keys
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: consolidate-duplicate-i18n-keys
Source: https://github.com/OrderlyNetwork/dex-creator/tree/main/.cursor/skills/consolidate-duplicate-i18n-keys
Command: npx skills add https://github.com/OrderlyNetwork/dex-creator --skill consolidate-duplicate-i18n-keys

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill tackles the inefficiency and potential for errors caused by having multiple internationalization (i18n) keys in your application that point to the exact same English text.

Core Features & Use Cases

  • In-Module Deduplication: Identifies and consolidates duplicate i18n keys within the same module, reducing code clutter and maintenance overhead.
  • Cross-Module Suggestion: Suggests merging i18n keys with identical English values but different prefixes into a common key (e.g., common.xxx) for better code organization.
  • Use Case: If you find keys like userProfile.saveButton and settings.saveButton both translate to "Save", this skill helps you standardize them, perhaps to common.save.

Quick Start

Run the consolidate-duplicate-i18n-keys script from the app directory to generate a report of potential deduplications.

Frequently Asked Questions about consolidate-duplicate-i18n-keys

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

FAQPage Schema
How do I consolidate duplicate i18n keys across application modules?

Consolidate duplicate i18n keys by scanning TypeScript files and locale JSON files to identify shared English translations, verify consistency across multiple locales, and generate a replacement plan for in-module deduplication or cross-module merging.

Why do I have duplicate internationalization keys with the same English text?

Duplicate internationalization keys occur when different modules define separate keys like `userProfile.saveButton` and `settings.saveButton` for the same English text, creating maintenance overhead and potential translation inconsistencies across locales.

How do I check i18n translation consistency across multiple locales before merging keys?

Check i18n translation consistency by scanning locale JSON files across languages like zh, tc, ko, and es to verify that keys with identical English values also share matching translations before generating a consolidation plan.

Can I automatically apply i18n key deduplication replacement plans?

Automatic i18n key deduplication requires explicitly directing the script via the `--apply` flag; otherwise, it safely generates a replacement plan and manual consolidation suggestions without modifying your codebase.

Does this deduplication tool work with TypeScript and locale JSON files?

This deduplication tool works by scanning TypeScript files in `app/app/i18n/module` and locale JSON files in `app/app/i18n/locales` to identify duplicate keys and classify them by prefix for in-module or cross-module consolidation.

What is the best way to merge cross-module i18n keys with different prefixes?

The best way to merge cross-module i18n keys is to standardize duplicate keys with identical English values into a common key like `common.save`, generating manual consolidation suggestions to improve code organization across modules.