Skip to content

intpp/redux-i18n-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redux-i18n-parser

Utility for parsing translations for react-native and react-redux-i18n.

Utility parses snippets like:

<Translation value="HERE.YOUR.TRANSLATION.TOKEN"/>

OR

I18n.t('HERE.YOUR.TRANSLATION.TOKEN')

Instalation

yarn add redux-i18n-parser

Usage

node ./node_modules/.bin/i18n-parser --config={PATH_TO_CONFIG}

Configuration

Simple config for redux-i18n-parser, i18n.json

{
  "languages": [
    "ru",
    "en"
  ],
  "sourceDir": "../src",
  "outputDir": "../src/i18n"
}

languages - List of supported languages, utility will be parse & merge with existing translations

sourceDir - Relative path to your source code

outputDir - Relative path to your translations

Etc

In package.json

// ...
"scripts": {
  // ...
  "i18n": "i18n-parser --config=./config/i18n.json"
  // ...
},
// ...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published