0.3.1 • Published 1 year ago
@z3phyro/tytra-cli v0.3.1
Typed Translations CLI - TyTra-CLI
CLI inspired by prisma, to create and mantain statically typed translations on any typescript project.
Installation
Install the dependency
npm i -D @z3phyro/tytra-cli
yarn add -D @z3phyro/tytra-cli
Setup project package.json script
{
"scripts": {
"tytra": "node ./node_modules/.bin/tytra"
}
}
Or use an alias
alias tytra="node ./node_modules/.bin/tytra"
Run it!
npm run tytra
Or if you have an alias
tytra
Use
To see the help
tytra
To initialize the translations (First step)
tytra init
To add a translation
tytra add <entry.path> [values...]
Values need to be in the same order as the dicts in the dictionaries.json file
To see the translation coverage per language
tytra coverage
To see the translation coverage of a particular language
tytra coverage [language-shortname]