1.0.4 • Published 1 month ago

smoking-intl-cli v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

npm version npm downloads deps

Smoking I18n CLI(sic) Frontend Internationalization Toolkit

Install

Project

npm i smoking-intl-cli --save-dev

Global

npm i smoking-intl-cli -g

Usage

sic [options]

Options

-V --version          Show version number
init                  Init Work Space, Pulling Source Files
xlsx                  Generage Export File(.xlsx)
ts                    Start import .xlsx File, and generate .ts files
langs                 Show All Supported Languages

Config file

Need create intl.config.ts in your project root directory. Type of intl.config.ts as below:

Type

Base Features

  1. Support multiple languages export and import.

More Features

  1. Support google translate prefill.
  2. Table is code, easy to collaborate.

Best Practices

  1. Google sheet is recommended as the editor for exporting files

The default GoogleTranslate service is used. Iflytek and DeepL translation function templates are provided in the project, which can be easily configured and used through Google workspace Apps-script.

  1. When the GoogleTranslate pre - fill function is enabled, {cat} may be translated into {猫} or other languages, which can affect template filling.

// bad
export intlModule = {
  "xxx-key": {action}{name}
  ...,
}
// good
export intlModule = {
  "xxx-key": {1}{2}
  ...,
}

License

MIT

1.0.4

1 month ago

1.0.3

2 months ago

1.0.2

2 months ago

1.0.1

2 months ago

1.0.0

2 months ago