Auto-input po-style translation files using Google Translate API.
See PR: Translate into English using Google Translate API - c-bata/webframework-in-python or my Japanese blog article.
This requires Python3 and google-cloud-translate
library.
$ pip install --upgrade google-cloud-translate
$ export GOOGLE_SERVICE_ACCOUNT_JSON=/path/to/service-account-credential.json
$ python translate_po.py --help
usage: translate_po.py [-h] [--lang LANG] [--currency CURRENCY] filepath
positional arguments:
filepath
optional arguments:
-h, --help show this help message and exit
--lang LANG target language (default: "ja")
--currency CURRENCY dollar per your currency. (default currency is yen: 111.90)
MIT License.