使用google translate api的.po文件自动翻译工具包。

lingua.autotranslate的Python项目详细描述


简介

autotranslate是一个使用google的.po文件的自动翻译工具包。 翻译API。

使用量

若要使用此软件包,应将以下部分添加到构建中:

[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 }
...

作者

贡献者

更改日志

0.2.1(2014-03-17)

  • 更新文档。 [航行]

0.2(2014-03-17)

  • 打印Found variables消息以通知用户验证 I18N变量,因为它们也会被转换。你需要手动操作 运行lingua.autotranslate后修复它们。 [航行]
  • 允许可配置的源语言从语言开始自动翻译 不同于英语。 [航行]
  • python 2.7提供了argparse,但python2.6没有。添加为 在Pyton 2.6上运行时的安装要求。 [航行]

0.1(2013-09-06)

  • 使用templer创建的包 [航行]

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
在Java中设置SMPP服务器   java如何使用Apache Santuario xmlsec库加密/解密(旧版本)   java如何使用double数组生成forloop?   java如何使用SwingWorker避免冻结GUI   java我面临一个问题,即在recycler视图中设置数据,我已经测试过数据来自API   java如何在php中显示http_post?   从php页面中的java DataOutputStream接收输出   java如何使用swing打印jframe?   处理json和表单参数的JavaSpringMVC方法   java在一个大的二维数组中存储布尔值   Java方法安排,运行时错误   java如何编写递归方法来返回整数中的数字和?   java将模型类添加到泛型列表时抛出错误   当实体映射为一个对象时,使用Hibernate获取java热对象列表   即使捕获到控制器上的异常,java Grails Hibernate会话也会被清除。   java禁用对Play框架模型类的增强   java gradle:无法执行run,因为属性“mainClass”未定义或为空   java将服务更改推送到客户端   从Java中的谷歌云存储访问时出现损坏的TAR文件错误