1.0.4 • Published 1 month ago
smoking-intl-cli v1.0.4
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:
Base Features
- Support multiple languages export and import.
More Features
- Support google translate prefill.
- Table is code, easy to collaborate.
Best Practices
- 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.
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