@intlgadmin/locales-cli

0.2.4 • Public • Published

GAdmin Locales CLI

Convert xlsx to locales configuration code or vice versa

Compatibility Note: GAdmin Locales CLI requires Node.js version >=12.0.0.

# convert excel to locales configuration codes
$ npx gadmin-locales --mode excel2code --single true --sort true

# convert locale configuration codes to excel
$ npx gadmin-locales --mode code2excel --excel src/locales/generated.xlsx

Configuration

parameter default description
mode excel2code excel2code or code2excel
excel src/locales/locales.xlsx the excel file path
excelTemplate {builtin}/lib/template.xlsx the excel template for generating excel, excel2code mode only
code src/locales the code directory
sourceLocale zh-CN the source locale, as default key
defaultLocale en-US the default locale to replace empty locales, excel2code mode only
locales zh-CN,en-US,ja-JP supported locale types, should be no less than your requires
single false single mode to merge multiple modules to a single file
sort false the generated codes will be sorted by key ascending
ignoreDuplicateSource false ignore the warnings of the duplicated source locale name, excel2code mode only

Readme

Keywords

none

Package Sidebar

Install

npm i @intlgadmin/locales-cli

Weekly Downloads

2

Version

0.2.4

License

MIT

Unpacked Size

485 kB

Total Files

20

Last publish

Collaborators

  • g_gadmin