翻译和本地化工程工具和API。
项目描述
翻译工具包
翻译工具包是一套软件和文档,旨在帮助本地化人员更加高效和减少挫败感。工具包是Translate项目的组成部分,托管在<https://github.com/translate>。
软件包括将本地化格式转换为通用PO格式和新兴的XLIFF格式的程序。还有检查和管理PO和XLIFF文件的程序。在线文档包括使用工具、运行本地化项目和如何从OpenOffice.org到Mozilla本地化各种项目的指南。
软件的核心包含一组用于处理各种本地化存储格式的类:DTD、属性、OpenOffice.org GSI/SDF、CSV、MO、Qt .ts、TMX、TBX、WordFast txt、Gettext .mo、Windows RC,当然还有PO和XLIFF。它还提供了在这些格式之间转换的脚本。
工具包还包括Python程序,用于创建单词计数、合并翻译并对翻译文件执行各种检查。
重要链接
加入翻译项目
如果您想加入翻译项目的邮件列表,请访问:<http://lists.sourceforge.net/lists/listinfo/translate-devel>。
翻译项目的愿景是成为本地化人员的元项目,基于这样的前提:您的语言应有权成为一个独立的项目,而不是主要项目的次等品。
大多数项目对本地化人员的需求和遇到的困难不予以关注。因此,目标是创建工具和文档,使本地化人员能够专注于他们最擅长的事情:翻译软件。
需求
有一些额外的需求,您可能需要安装以获取完整功能集。这可以在pip安装期间轻松指定
# Install with XML support pip install translate-toolkit[XML] # Install all optional dependencies pip install translate-toolkit[all]
工具包需要Python 3.8或更高版本。
需要包lxml。您应该安装版本4.6.3或更高版本。<http://lxml.de/>根据您的平台,最简单的方法可能是通过您的系统包管理器安装。或者,您可以尝试
pip install lxml
应该从网上安装最新版本。
对于Mac OSX,以下页面可能会有帮助:<http://lxml.de/build.html#building-lxml-on-macos-x> <http://lxml.de/installation.html#macos-x>
包lxml依赖于libxml2和libxslt。如果您需要单独安装这些库的推荐版本,请检查lxml网站。大多数lxml的打包版本已经包含这些依赖项。
当环境变量USECPO设置为1时,工具包将尝试使用gettext-tools包中的libgettextpo(在您的发行版上可能具有不同的名称)。这可以大大加快对PO文件的访问速度,但尚未广泛测试。欢迎提供反馈。
包iniparse对于ini2po和po2ini是必需的:<https://pypi.ac.cn/project/iniparse/>
如果安装了python-Levenshtein包,则可以提高模糊匹配的性能。例如,这可以提高pot2po的性能。它是可选的,如果不安装,不会丢失任何功能,只是速度较慢。<http://sourceforge.net/projects/translate/files/python-Levenshtein/>
lang.data模块中的函数可以提供使用pycountry包翻译语言名称的函数。它甚至可以翻译格式为语言(国家)的名称,如英语(南非)。Pootle和Virtaal都使用此功能。如果未安装此包,语言名称将简单地以英语显示。因此,建议您安装pycountry包。
包vobject对于ical2po和po2ical是必需的。
包aeidon对于sub2po和po2sub是必需的。一些Unicode编码的文件(包括来自<http://dotsub.com/>的大多数文件)需要0.14或更高版本。
Trados TXT TM支持需要BeautifulSoup解析器 <http://www.crummy.com/software/BeautifulSoup/>
Markdown支持需要mistletoe解析器 <https://github.com/miyuchina/mistletoe>
程序概述
使用--help查找所有程序的语法和选项。
转换器
oo2po - convert between OpenOffice.org GSI files and PO oo2xliff - convert between OpenOffice.org GSI files and XLIFF moz2po - convert between Mozilla files and PO csv2po - convert PO format to CSV for editing in a spreadsheet program php2po - PHP localisable string arrays converter. ts2po - convert Qt Linguist (.ts) files to PO txt2po - convert simple text files to PO html2po - convert HTML to PO (beta) md2po - convert Markdown to PO xliff2po - XLIFF (XML Localisation Interchange File Format) converter prop2po - convert Java .properties files to PO po2wordfast - Wordfast Translation Memory converter po2tmx - TMX (Translation Memory Exchange) converter pot2po - PO file initialiser csv2tbx - Create TBX (TermBase eXchange) files from Comma Separated Value (CSV) files ini2po - convert .ini files to to PO ical2po - Convert iCalendar files (*.ics) to PO sub2po - Convert many subtitle files to PO resx2po - convert .Net Resource (.resx) files to PO
工具(质量保证)
pofilter - run any of the 40+ checks on your PO files pomerge - merge corrected translations from pofilter back into your existing PO files. poconflicts - identify conflicting use of terms porestructure - restructures po files according to poconflict directives pogrep - find words in PO files
工具(其他)
pocompile - create a Gettext MO files from PO or XLIFF files pocount - count translatable file formats (PO, XLIFF) podebug - Create comment in your PO files' msgstr which can then be used to quickly track down mistranslations as the comments appear in the application. posegment - Break a PO or XLIFF files into sentence segments, useful for creating a segmented translation memory. poswap - uses a translation of another language that you would rather use than English as source language poterminology - analyse PO or POT files to build a list of frequently occurring words and phrases
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。
源分布
构建分布
translate_toolkit-3.13.5.tar.gz 的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | 53c59c919e52a9787c0d1d7ccd34df9508e9f58bb84d1d52d27a9bda5203d768 |
|
MD5 | 9e66324aae4a97ada6863b173c989948 |
|
BLAKE2b-256 | e062e87ea8be9fb831ee79b4b75e50d1eeb5959fe094b2cbe80e80c59d477fda |
translate_toolkit-3.13.5-py3-none-any.whl 的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | f2a549973ca50ad56d299050401ee55bfd8265dd6f7c9307c77ece2f0e8e2ca8 |
|
MD5 | c7d830556c11e6cf82a5834b2b5ddda3 |
|
BLAKE2b-256 | a8f4fbd93b851042c925076dc8425d4882606df4eff60e5c3d84fe6af041c792 |