0.1.1 • Published 6 years ago

c-3po-cli v0.1.1

Weekly downloads
7
License
MIT
Repository
github
Last release
6 years ago

c-3po-cli

status: proof of concept, work in progress

Command line utility for c-3po translation library

extract [output|lang] <src...>

will extract translations to .pot file

Arguments:

-output  --o   result file with translations (.pot)  (default: translations.pot)
-lang  --l   sets default lang (ISO format)  (default: en)

check [lang] <pofile> <src...>

will check if all translations are present in .po file

Arguments:

-lang  --l   sets default lang (ISO format)  (default: en)

merge <path...>

will merge two or more po(t) files together using first non-empty msgstr and header from left-most file

translate <path> [args]

will open interactive prompt to translate all msgids with empty msgstr in cli

Arguments:

-output  --o   result file with translations (.po)  (default: translated.po)

stats <path>

will display various pofile statistics(encoding, plurals, translated, fuzzyness)

filter <path> [args]

will filter pofile by entry attributes(fuzzy, obsolete, (un)translated)

Arguments:

-fuzzy  --f   result file with fuzzy messages (.po)  (default: false)
-no-fuzzy  --nf   result file without fuzzy messages (.po)  (default: false)
-translated  --t   result file with translations (.po)  (default: false)
-not-translated  --nt   result file without translations (.po)  (default: false)
-reference  --r   a regexp to match references against  (default: )

Example:

 c-3po filter -nt small.po

 msgid "test"
 msgstr ""

init <lang> <filename>

will create an empty .po file with all necessary headers for the locale

Arguments:

-lang   sets default locale (ISO format)  (default: en)
-filename   path to the .po file  

update [lang] <pofile> <src..>

will update existing po file. Add/remove new translations

Arguments:

-lang   sets default locale (ISO format)  (default: en)
-pofile   path to .po file with translations  
-src   path to source files/directories  

replace <pofile> <out> <path>

will replace all strings with translations from the .po file

color <pofile>

will output po(t)file with pretty colors on, combine with | less -r

spell <pofile> [locale]

will spellcheck po file messages with given locale, locale can be autodetected from pofile

validate <pofile>

will validate js template strings (${x}) in messages and translations and against each other

Please support c-3po-cli development by sending issues/PRs.

0.1.1

6 years ago

0.1.0

6 years ago

0.0.21

6 years ago

0.0.20

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.7

6 years ago

0.0.8

6 years ago

0.0.6

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago