@opensea/i18n-extract

1.0.13 • Public • Published

extract

@opensea/i18n-extract analyzes and extracts translation keys with their default values from source files. Extracted translation keys are meant to be uploaded to a translation management system for translation into other languages.

How?

Program looks for references to the useTranslation() and <Trans /> from next-translate using @babel/parser and @babel/traverse. Note that wrapping these into custom hooks/components will break the translation key extraction.

Getting started

Install

npm install --save-dev @opensea/i18n-extract

Usage

Published packages comes with a i18n-extract binary.

npm run i18n-extract --directory ./ --out locales/en-US

Local development

Running tests

yarn test

Readme

Keywords

none

Package Sidebar

Install

npm i @opensea/i18n-extract

Weekly Downloads

446

Version

1.0.13

License

MIT

Unpacked Size

32.8 kB

Total Files

4

Last publish

Collaborators

  • royliu2
  • janclarin
  • jallum
  • coryhardman-opensea
  • ralxz
  • sunwrobert
  • meemaw