@dvhb/react-intl-messages
Library for parsing source files and extract react-intl messages
Last updated a month ago by sairus2k .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @dvhb/react-intl-messages 
SYNC missed versions from official npm registry.

react-intl-messages

Library for parsing source files and extract react-intl messages. Extracted messages saves to json files. Underhood it uses babe-plugin-react-intl

oclif Version Downloads/week License

Features

  • synchronize translations with translation service (lokalise.co for now)
  • custom babel config, appropriate for projects on react-native and typescript
  • prettify extracted json files
  • store parameters in config

Usage

$ npm install -g @dvhb/react-intl-messages
$ messages COMMAND
running command...
$ messages (-v|--version|version)
@dvhb/react-intl-messages/2.4.2 linux-x64 node-v10.16.0
$ messages --help [COMMAND]
USAGE
  $ messages COMMAND
...

Commands

messages clean

Clean lokalise for unused translation keys

USAGE
  $ messages clean

OPTIONS
  -d, --messagesDir=messagesDir  (required) [default: src/messages] Directory for extracted messages
  -h, --help                     show CLI help
  --namespace=namespace          Provider`s namespace. Required for Locize
  --projectId=projectId          Provider`s project id
  --provider=lokalise|locize     (required) Translation service provider
  --token=token                  Provider`s token
  --uploadTranslations           Upload existing translations to provider. Useful for provider migration.
  --version=version              Translations version, for example "production". Required for Locize

See code: src/commands/clean.ts

messages extract

Extract translations from source files to json

USAGE
  $ messages extract

OPTIONS
  -d, --messagesDir=messagesDir  (required) [default: src/messages] Directory for extracted messages
  -h, --help                     show CLI help
  -i, --ignore=ignore            Regex mask for ignored files
  -l, --langs=langs              (required) Comma separated languages
  -p, --pattern=pattern          (required) Regex mask for files

EXAMPLE
  $ messages extract --langs=en,fr,de,ru --pattern="src/**/*.{ts,tsx}"

See code: src/commands/extract.ts

messages help [COMMAND]

display help for messages

USAGE
  $ messages help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

messages sync

Synchronise extracted files with Lokalise.co

USAGE
  $ messages sync

OPTIONS
  -d, --messagesDir=messagesDir  (required) [default: src/messages] Directory for extracted messages
  -h, --help                     show CLI help
  -l, --langs=langs              (required) Comma separated languages
  --namespace=namespace          Provider`s namespace. Required for Locize
  --projectId=projectId          Provider`s project id
  --provider=lokalise|locize     (required) Translation service provider
  --token=token                  Provider`s token
  --uploadTranslations           Upload existing translations to provider. Useful for provider migration.
  --version=version              Translations version, for example "production". Required for Locize

EXAMPLE
  $ messages extract --langs=en,fr,de,ru --pattern="src/**/*.{ts,tsx}"

See code: src/commands/sync.ts

Config

  • messages property in a package.json file.
  • .messages file with JSON or YAML syntax.
  • .messages.json file.
  • .messages.yaml or .messages.yml file.
  • .messages.js or messages.config.js JS file exporting the object.

Current Tags

  • 2.4.2                                ...           latest (a month ago)

22 Versions

  • 2.4.2                                ...           a month ago
  • 2.4.1                                ...           a month ago
  • 2.4.0                                ...           a month ago
  • 2.3.4                                ...           a month ago
  • 2.3.3                                ...           a month ago
  • 2.3.2                                ...           a month ago
  • 2.3.1                                ...           a month ago
  • 2.3.0                                ...           a month ago
  • 2.2.6                                ...           a month ago
  • 2.2.5                                ...           a month ago
  • 2.2.4                                ...           a month ago
  • 2.2.3                                ...           a month ago
  • 2.2.2                                ...           a month ago
  • 2.2.1                                ...           a month ago
  • 2.1.2                                ...           a month ago
  • 1.1.0                                ...           2 months ago
  • 0.0.0-development                                ...           2 months ago
  • 1.0.0                                ...           3 months ago
  • 0.0.3                                ...           3 months ago
  • 0.0.2                                ...           3 months ago
  • 0.0.1                                ...           3 months ago
  • 0.0.0                                ...           3 months ago
Downloads
Today 0
This Week 0
This Month 47
Last Day 0
Last Week 47
Last Month 280
Dependencies (9)
Dev Dependencies (21)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |