@nx-extend/translations
TypeScript icon, indicating that this package has built-in type declarations

12.0.1 • Public • Published

@nx-extend/translations

@nx-extend/translations NPM package

Nx plugin to extract, push, pull and translate your FormatJS projects.

Setup

Install

npm install -D @nx-extend/translations
nx g @nx-extend/translations:add

Usage

Build

Available options:

name type default description

Serve

Available options:

name type default description

Plugin

{
  "plugins": [
    {
      "plugin": "@nx-extend/translations/plugin"
    }
  ]
}

Will add the extract-translations, push-translations, pull-translations and translate target to all projects with an .translationsrc.json in the root.

Example .translationsrc.json

{
  "extends": "../.translationsrc.json",
  "projectName": "Project name in the provider",
  "projectId": "id in the provider",

  // Options that are the same could go for example in the ".translationsrc.json" of the root.
  "provider": "simplelocalize",
  "outputDirectory": "<projectRoot>/src/translations",
  "outputLanguages": "<projectRoot>/src/translations/locales.json",
  "defaultLanguage": "en",
  "translator": "deepl",
  "translatorOptions": {
    "formality": "less",
    "fallbackToGooleTranslate": true
  },
  "publishAfterPush": true,
  "autoTranslate": true,
  "languages": [
    "en",
    "de",
    "nl",
    "pl",
    "fr",
    "ro",
    "da",
    "he",
    "sv"
  ]
}

Package Sidebar

Install

npm i @nx-extend/translations

Weekly Downloads

59

Version

12.0.1

License

MIT

Unpacked Size

190 kB

Total Files

93

Last publish

Collaborators

  • tripss