Skip to content

seantis/honyaku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6fc3aae · Feb 27, 2025

History

20 Commits
Mar 7, 2023
Feb 27, 2025
Sep 15, 2017
Mar 7, 2023
Feb 27, 2025
Mar 7, 2023
Sep 15, 2017
Sep 15, 2017
Feb 27, 2025
Mar 7, 2023
Mar 7, 2023

Repository files navigation

Honyaku

Translate po-files using Gengo.com

Installation

  1. Create a virtual env.
  2. pip install '.'

Usage

Honyaku uses the Gengo API with two states:

  1. It creates a translation job and writes the id in the targeted PO file.
  2. It checks the job id and displays each translation for manual acceptance.

To use, store your GENGO public/private key in the following variables. Notice the single quotes:

`shell export GENGO_PUBLIC_KEY='your public key' export GENGO_PRIVATE_KEY='your private key' `

Afterwards initiate a new job as follows:

```shell honyaku <path-to-po-file> <source-language> <target-language>

--tone "formal" --limit 100 --tier standard

```

The limit is recommended to avoid creating thousands of jobs in case Honyaku does something wrong.

Optionally, a command can be sent to the translator:

```shell honyaku foo.po en fr

--tone "formal" --limit 100 --tier standard --commend "Text between ${} and {} are variables and should be left alone"

```

Once a job has been sent, it's status can be queried by running the same exact command again. Once a translation is available, it has to be accepted (if it's okay) or refused (with a comment).

Limitations

Note that there are a lot of HTTPS warnings at the moment, due to this bug: gengo/gengo-python#99

In the future we should probably simply use our own REST client.

License

honyaku is released under GPLv2