Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>i18n-communeNew to Visual Studio Code? Get it now.
i18n-commune

i18n-commune

Commune

|
22 installs
| (1) | Free
Support tools for i18n commune
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

i18n-commmune

i18n-commmune is a tool for developers and translators who work for globalizePJ in Commmune Inc.

Features

  • To open the translation JSON file corresponding to the component file you are editing, execute "Open Translation File"
  • For React function components, put cursor on the line where you want to... and execute "Insert useTranslation" command. This will insert import statement and assignment of calling useTranslation with automatically-generated arguments as below:
    import React from 'react'
    +import { useTranslation } from 'react-i18next'
    
    +const { t } = useTranslation(['components/molecules/admin/settings/integrations'])
    
  • For React function components that just return JSX, select code from ( to ) and execute "Insert useTranslation2" to convert function body structure from:
    => (
      <>
      </>
    )
    
    to:
    => {
      return (
        <>
        </>
      )
    }
    
    and insert import statement and assignment of calling useTranslation with automatically-generated arguments
  • For React class components, select the class name and execute "Insert withTranslation" command. This will insert import statements and replace the class name with calling withTranslation as below:
    import React from 'react'
    +import { TFunction } from 'i18next'
    +import { withTranslation } from 'react-i18next'
    
    -export default Button
    +export default withTranslation(['components/molecules/admin/settings/integrations'])(Button)
    
    • For an item in translation JSON file, select the key value and execute Search All Usages of a Translation Item command. All usages in the corresponding directory will displayed in search result.

Requirements

There is no requirement yet.

Extension Settings

There is no setting yet.

Known Issues

  • If there is no line which imports react, an error will occur.

Release Notes

0.0.1

Initial release

0.0.2

Take into consideration of the case where import statement imports something else with React

0.1.0

Add command "Open Translation File"

0.1.2

Fix bug

0.2.0

Add command "Insert useTranslation2"

0.3.0

Add command "Initialize Translation File"

0.3.1

Fix return value when findImportReact can not find import statement

0.4.0

Add command "Search All Usages of a Translation Item"

0.4.1

Fix description of 0.4.0 in REAME.md

0.5.0

  • Update branding
  • Migrate to TypeScript and remove not used code
  • Change publisher

0.5.1

  • ignore extra files

0.5.2

  • change translations path

0.5.3

  • downgrade VS Code version to support Cursor

0.6.0

  • support new structure: translations for each language are now in separate folders
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft