Read pot files to translate strings in msgid with google translate API and save a new po file.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
samples
scripts
tests
transpopy
.gitignore
.travis.yml
LICENSE
README.md
setup.py
tox.ini

README.md

transpopy

Read pot files to translate strings in msgid with google translate API and save a new po file.

Build Status

Install

With PyPi

kanazuchi@FreeBSD #: virtualenv --python=python3 .
kanazuchi@FreeBSD #: source bin/activate
kanazuchi@FreeBSD #: pip3 install transpopy

With BSD pkg

kanazuchi@FreeBSD #: pkg install py36-transpopy

With GitHub

kanazuchi@FreeBSD #: git clone https://github.com/kanazux/transpopy
kanazuchi@FreeBSD #: python3 setup.py install

Usage:

transpopy -f samples/leap-seconds.pot -o newfile.po -t zh_cn -e -i -p leap-seconds to chinese language

Help:

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 po file name to translated msgid's.
  -o OUTPUT_FILE, --output_file OUTPUT_FILE
                        Get a name to save new po file.
  -l LANG, --lang LANG  Get original language of po file.
  -t TRANSLATE, --translate TRANSLATE
                        Get language to translate the po file strings.
  -i, --imprecise       Write messages as fuzzy.
  -e, --error           Print some errors if exists.
  -p, --print_process   Print translate process.