Lingui.js tooling
Usage
Install package to the project:
npm i -D @werkspot/lingui
or globaly
sudo npm i -g @werkspot/lingui
after that you may use command linguit
:
linguit --help
Download translations
linguit
--command download
--language en
--path ./locales/
--crowdin-key k234hkj234f23udstisdufhjs
--crowdin-project myCrowdinProject
Upload translations
linguit
--command upload
--path ./locales/
--crowdin-key k234hkj234f23udstisdufhjs
--crowdin-project myCrowdinProject
Documentation
Table of Contents
CrowdinTranslationStorage
Crowdin Translation Storage
Meta
- author: Anton Nemtsev
constructor
Initialize with argument values, validate them Create folder for locales if it's not found
Parameters
-
options
object
upload
Collect and upload keys for translation
- Throws any Error
Returns any Promise
download
Download translations for specific language
Parameters
-
language
string language to download, should be nl, it, fr or en. -
Throws any Error
Returns any Promise
LocalTranslationStorage
Local Translation Storage
Meta
- author: Anton Nemtsev
constructor
Check if Cloud folder exist and if not — create one
upload
Save current english translations file to Cloud folder
download
Download selected translation, if this locale unavailable then it download english
Parameters
-
lang
string — language to download, should be nl, it, fr or en.