extract-i18n-keys

Extracts hardcoded strings from TypeScript/JavaScript/TSX/JSX files and replaces them with translation calls.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the extraction of hardcoded text from your codebase, transforming it into translatable keys for internationalization (i18n), significantly speeding up the localization process.

Core Features & Use Cases

  • Automated Key Extraction: Identifies and extracts user-facing strings from TypeScript, JavaScript, TSX, and JSX files.
  • Smart Key Generation: Creates semantic i18n keys with appropriate prefixes based on file location (routes vs. components).
  • Code Replacement: Replaces extracted strings with translation function calls (t() or i18n.t()) or Trans components for rich text.
  • Use Case: After adding new UI copy to your application, run this Skill to automatically generate the necessary i18n keys and update the source code, preparing it for translation without manual effort.

Quick Start

Use the extract-i18n-keys skill to extract i18n keys from the file '/app/app/routes/_layout.tsx'.

Frequently Asked Questions about extract-i18n-keys

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

FAQPage Schema
How do I extract hardcoded strings for i18n from TypeScript and JSX files?

To extract hardcoded strings for i18n from TypeScript and JSX files, run this Skill on specific file paths or directory locations. It identifies user-facing text nodes and automatically replaces them with translation function calls or Trans components.

What is the best way to automate internationalization key generation in a React application?

Automating internationalization key generation is best handled by scanning your codebase for hardcoded text and converting it into semantic, module-prefixed i18n keys based on file location, eliminating manual translation setup.

Does this i18n extraction tool support processing files via git commit hashes?

Yes, this i18n extraction tool supports processing files via git commit hashes. You can input specific commit hashes to target and extract newly added hardcoded strings from your latest code changes for internationalization.

How are translation keys structured when extracting text from routes versus components?

When extracting text from routes versus components, the Skill generates smart i18n keys with appropriate semantic prefixes based on the file location, ensuring organized and context-aware translation keys across your internationalization setup.

Can I run the internationalization extraction process with unstaged git changes?

No, you cannot run the internationalization extraction process with unstaged git changes. The Skill enforces strict pre-checks for unstaged changes to prevent accidental file overwrites and maintain codebase integrity during extraction.

How do I replace plain text with translation functions in TSX files?

To replace plain text with translation functions in TSX files, the Skill parses your code to identify string literals and substitutes them with t() or i18n.t() calls, utilizing Trans components specifically for rich text formatting.