Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>i18n Translation FinderNew to Visual Studio Code? Get it now.
i18n Translation Finder

i18n Translation Finder

Raz Labs

|
7 installs
| (0) | Free
Navigate between i18n translation keys and their usage with unused key detection
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

i18n Translation Finder

A VS Code extension that provides bidirectional navigation and unused key detection for i18next translations in the gestao-contratadas-full-stack codebase.

Features

🔄 Bidirectional Navigation

  • Go to Definition: Ctrl+click on i18n.t('key.path') to navigate to the translation definition
  • Find All References: Ctrl+click on translation keys to see all usage locations

🔍 Unused Key Detection

  • Red squiggly lines under translation keys that aren't used anywhere in the codebase
  • Real-time validation as files are edited

🎯 Hover Information

  • Hover over translation keys to see their values and usage statistics
  • Hover over i18n.t() calls to see the translated text

Usage

  1. Open the gestao-contratadas-full-stack project in VS Code
  2. The extension will automatically scan for translation files and usage patterns
  3. Use Ctrl+click on translation keys or i18n.t() calls to navigate
  4. Unused translation keys will be highlighted with red squiggly lines

Configuration

The extension can be configured via VS Code settings:

{
  "i18nTranslationFinder.translationPaths": [
    "src/translate/languages/**/*.ts",
    "src/translate/languages/**/*.js"
  ],
  "i18nTranslationFinder.usageFilePatterns": [
    "**/*.ts",
    "**/*.tsx", 
    "**/*.js",
    "**/*.jsx"
  ],
  "i18nTranslationFinder.excludePatterns": [
    "**/node_modules/**",
    "**/dist/**",
    "**/out/**",
    "**/.git/**"
  ]
}

Development

This extension is specifically designed for the gestao-contratadas-full-stack codebase structure and may not work with other i18n setups.

Running the Extension

  1. Press F5 to open a new Extension Development Host window
  2. Open the gestao-contratadas-full-stack folder
  3. Test the navigation and unused key detection features

Architecture

The extension consists of several key components:

  • TranslationRegistry: Central registry that maps translation keys to their definitions and usages
  • TranslationFileScanner: Parses translation files using AST analysis
  • UsageScanner: Finds i18n.t() calls using regex patterns
  • Language Providers: Implement VS Code's definition, reference, hover, and diagnostic features

Supported Patterns

The extension recognizes these i18n usage patterns:

  • i18n.t('key.path')
  • i18n.t("key.path")
  • i18n.t(\key.path`)`
  • t('key.path') (destructured import)

Limitations

  • Designed specifically for the current codebase structure
  • Does not support dynamic key construction (e.g., i18n.t(\${prefix}.${suffix}`)`)
  • Only supports Portuguese translations currently

Version History

0.0.1

  • Initial release with bidirectional navigation and unused key detection
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft