使用Google Translate API对.po文件进行自动翻译的工具包。
项目描述
简介
lingua.autotranslate 是一个使用 Google Translate API 对 .po 文件进行自动翻译的工具包。
用法
要使用此软件包,您应该将以下部分添加到您的 buildout 中
[buildout] ... parts = ... autotranslate ... [autotranslate] recipe = zc.recipe.egg eggs = lingua.autotranslate
运行 bin/buildout 时,它将为您创建一个新的控制台脚本 bin/autotranslate,该脚本至少需要两个参数
~/workspace/my.product $ bin/autotranslate -h usage: autotranslate [-h] -i <locale> <po file> [-s LANGUAGE] [-u] Translate Po files. optional arguments: -h, --help show this help message and exit -i <locale> <po file> Locale and filename of po-file to process -s LANGUAGE Source language to translate from. -u Force updating translations by retranslating all msgids.
示例
请参阅下面的翻译示例。
~/workspace/my.product $ bin/autotranslate -i de src/my/product/locales/de/LC_MESSAGES/my.product.po [ Success ] New product -> Neues Produkt [ Success ] Specification -> Beschreibung [ Success ] Language -> Sprache [ Found variable(s) ] ${back} [ Success ] Back to product ${back} -> Zurück zum Produkt $ { back } ...
贡献者
Daniel Widerin [saily] <daniel@widerin.net>
变更日志
0.2.1 (2014-03-17)
更新文档。 [saily]
0.2 (2014-03-17)
打印 Found variables 消息,以通知用户验证他们的 i18n 变量,因为它们也会被翻译。您需要在运行 lingua.autotranslate 之后手动修复它们。[saily]
允许配置源语言,以便从不同于英语的语言开始自动翻译。[saily]
Python 2.7 附带 argparse,但 Python 2.6 不附带。在 Pyton 2.6 上运行时,将其添加为安装要求。[saily]
0.1 (2013-09-06)
使用 templer 创建的软件包[saily]
项目详情
关闭
lingua.autotranslate-0.2.1.zip 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | b4bce660c49ce8e546c6718de07d2ea0bd9be538c076905229d5ab408041c026 |
|
MD5 | 39551d56726c245e2d94ef3bd8f0542f |
|
BLAKE2b-256 | 62597ee7843261efb386029ad8550d4fa5179c58e8c5af4f7ccf7cf84d1d53d0 |