Read pot files to translate strings in msgid with google translate API and save a new po file.
kanazuchi@FreeBSD #: virtualenv --python=python3 .
kanazuchi@FreeBSD #: source bin/activate
kanazuchi@FreeBSD #: pip3 install transpopy
kanazuchi@FreeBSD #: pkg install py36-transpopy
kanazuchi@FreeBSD #: git clone https://github.com/kanazux/transpopy
kanazuchi@FreeBSD #: python3 setup.py install
transpopy -f samples/leap-seconds.pot -o newfile.po -t zh_cn -e -i -p
Translate msgid from po file with google translate API
optional arguments:
-h, --help show this help message and exit
-f FILE, --file FILE Get the POT file name.
-o OUTPUT_FILE, --output_file OUTPUT_FILE
Get name to save the new PO file.
-t TRANSLATE, --translate TRANSLATE
Get language to translate to.
-i, --imprecise Save translated texts as fuzzy(draft).
-e, --error Print translate errors if exist.
-p, --print_process Print translate process.