Difference between revisions of "ZH/Translation PO File Approach"
From ADempiere
This Wiki is read-only for reference purposes to avoid broken links.
(→第四步 转化为xml文件) |
|||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | = | + | [[ADempiere|<返回英文首页>]] [[Chinese|<返回中文首页>]] [[ZH/TranslationProject|<返回中文翻译项目首页>]] |
+ | =通往国际化翻译的自由之路= | ||
− | * | + | * 本文主要介绍利用PO文件开展ADempiere翻译的总体工作流程。 |
− | * | + | * 关于'''PO文件的示例、原理和使用方法'''见 [[ZH/Translation PO File Approach Detail|通往本地化翻译的自由之路-深入探寻]]。 |
− | * | + | * 本文尚在编辑完善中,欢迎您的参与! |
− | == | + | |
− | + | ==总体设想== | |
− | * | + | |
+ | * 翻译流程: | ||
+ | |||
+ | <pre> | ||
+ | 未翻译的.xml文档 -----> 未翻译的.po文档 -----> 已翻译的.po文档 -----> 已翻译的.xml文档 | ||
+ | ^ ^ ^ | ||
+ | (自动处理) (手工翻译或Launchpad协作翻译) (自动处理) | ||
+ | </pre> | ||
+ | ===翻译方法=== | ||
+ | * 对于po文档,有两种方式进行翻译。 | ||
+ | ** 一是上传至翻译平台(如launchpad.net),在网站上完成翻译后导出。 | ||
+ | **二是直接在po文档中手工翻译。 | ||
+ | * 无论采用哪一种方式,经过翻译之后,最后po文件内容都是一致的,例如: | ||
==目前需要着手的工作== | ==目前需要着手的工作== | ||
− | + | # 自动处理.xml文件格式的工具。 | |
+ | # 已有中文翻译成果的整理。此项工作难度最大。 | ||
− | |||
− | |||
− | + | =PO文件翻译流程= | |
− | # | + | * 在这里,我们结合ADempiere的实际例子,您将会看到如何围绕PO文件开展翻译工作的。 |
+ | ===第一步 取得原始.xml文件=== | ||
+ | * 假设有一个未翻译的原始.xml文件:untrans.xml | ||
+ | ** 备注:本内容摘自AD_Window_Trl_en_US.xml | ||
+ | |||
+ | <pre> | ||
+ | |||
+ | <adempiereTrl language="en_US" table="AD_Window"> | ||
+ | <row id="100" trl="Y"> | ||
+ | <value column="Name" original="Table and Column">Table and Column</value> | ||
+ | <value column="Description" original="Maintain Tables and Columns">Maintain Tables and Columns</value> | ||
+ | <value column="Help" original="The Table and Column Window defines all tables with their columns">The Table and Column Window defines all tables with their columns</value> | ||
+ | </row> | ||
+ | </adempiereTrl> | ||
+ | </pre> | ||
+ | |||
+ | ===第二步 转化为.po文件=== | ||
+ | * 通过po4a工具,自动将原始的XML文件转化为未翻译的PO文件:untrans.po,格式如下: | ||
+ | |||
+ | <pre> | ||
+ | #. id="100" | ||
+ | #: type: Name | ||
msgid "Table and Column" | msgid "Table and Column" | ||
msgstr "" | msgstr "" | ||
− | #. | + | #. id="100" |
− | + | #: type: Description | |
msgid "Maintain Tables and Columns" | msgid "Maintain Tables and Columns" | ||
msgstr "" | msgstr "" | ||
− | #. | + | #. id="100" |
− | + | #: type: Help | |
msgid "The Table and Column Window defines all tables with their columns" | msgid "The Table and Column Window defines all tables with their columns" | ||
msgstr "" | msgstr "" | ||
− | == | + | </pre> |
− | * | + | |
− | * | + | |
− | + | ||
− | + | ===第三步 翻译PO文件=== | |
+ | * 通过文本编辑工具直接翻译PO文件。 | ||
+ | * 翻译完成后的.po文件文件名为: trans.po | ||
− | + | <pre> | |
− | # | + | #. id="100" |
+ | #: type: Name | ||
msgid "Table and Column" | msgid "Table and Column" | ||
msgstr "表格和列" | msgstr "表格和列" | ||
− | #. | + | #. id="100" |
− | + | #: type: Description | |
msgid "Maintain Tables and Columns" | msgid "Maintain Tables and Columns" | ||
msgstr "维护表格和列" | msgstr "维护表格和列" | ||
− | #. | + | #. id="100" |
− | + | #: type: Help | |
msgid "The Table and Column Window defines all tables with their columns" | msgid "The Table and Column Window defines all tables with their columns" | ||
− | msgstr " | + | msgstr "这个 表格和列窗体 用于定义所有的表格和列" |
+ | </pre> | ||
+ | |||
+ | ===第四步 转化为xml文件=== | ||
+ | * po4a工具会把原始XML模板(untrans.xml)和已经翻译好的PO文件(trans.po)结合起来,自动生成翻译好的XML文件,这样就可以直接导入ADempiere ERP啦! | ||
+ | * 翻译后的xml文件trans.xml,结果如下所示: | ||
+ | |||
+ | <pre> | ||
+ | <adempiereTrl language="en_US" table="AD_Window"> | ||
+ | <row id="100" trl="Y"> | ||
+ | <value column="Name" original="Table and Column">表格和列</value> | ||
+ | <value column="Description" original="Maintain Tables and Columns">维护表格和列</value> | ||
+ | <value column="Help" original="The Table and Column Window defines all tables with their columns">这个 表格和列窗体 用于定义所有的表格和列</value> | ||
+ | </row> | ||
+ | </adempiereTrl> | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | [[Category:Chinese]] | ||
+ | [[Category:Localisation]] | ||
+ | [[Category:Translation Project]] |
Latest revision as of 23:38, 3 June 2010
<返回英文首页> <返回中文首页> <返回中文翻译项目首页>
Contents
通往国际化翻译的自由之路
- 本文主要介绍利用PO文件开展ADempiere翻译的总体工作流程。
- 关于PO文件的示例、原理和使用方法见 通往本地化翻译的自由之路-深入探寻。
- 本文尚在编辑完善中,欢迎您的参与!
总体设想
- 翻译流程:
未翻译的.xml文档 -----> 未翻译的.po文档 -----> 已翻译的.po文档 -----> 已翻译的.xml文档 ^ ^ ^ (自动处理) (手工翻译或Launchpad协作翻译) (自动处理)
翻译方法
- 对于po文档,有两种方式进行翻译。
- 一是上传至翻译平台(如launchpad.net),在网站上完成翻译后导出。
- 二是直接在po文档中手工翻译。
- 无论采用哪一种方式,经过翻译之后,最后po文件内容都是一致的,例如:
目前需要着手的工作
- 自动处理.xml文件格式的工具。
- 已有中文翻译成果的整理。此项工作难度最大。
PO文件翻译流程
- 在这里,我们结合ADempiere的实际例子,您将会看到如何围绕PO文件开展翻译工作的。
第一步 取得原始.xml文件
- 假设有一个未翻译的原始.xml文件:untrans.xml
- 备注:本内容摘自AD_Window_Trl_en_US.xml
<adempiereTrl language="en_US" table="AD_Window"> <row id="100" trl="Y"> <value column="Name" original="Table and Column">Table and Column</value> <value column="Description" original="Maintain Tables and Columns">Maintain Tables and Columns</value> <value column="Help" original="The Table and Column Window defines all tables with their columns">The Table and Column Window defines all tables with their columns</value> </row> </adempiereTrl>
第二步 转化为.po文件
- 通过po4a工具,自动将原始的XML文件转化为未翻译的PO文件:untrans.po,格式如下:
#. id="100" #: type: Name msgid "Table and Column" msgstr "" #. id="100" #: type: Description msgid "Maintain Tables and Columns" msgstr "" #. id="100" #: type: Help msgid "The Table and Column Window defines all tables with their columns" msgstr ""
第三步 翻译PO文件
- 通过文本编辑工具直接翻译PO文件。
- 翻译完成后的.po文件文件名为: trans.po
#. id="100" #: type: Name msgid "Table and Column" msgstr "表格和列" #. id="100" #: type: Description msgid "Maintain Tables and Columns" msgstr "维护表格和列" #. id="100" #: type: Help msgid "The Table and Column Window defines all tables with their columns" msgstr "这个 表格和列窗体 用于定义所有的表格和列"
第四步 转化为xml文件
- po4a工具会把原始XML模板(untrans.xml)和已经翻译好的PO文件(trans.po)结合起来,自动生成翻译好的XML文件,这样就可以直接导入ADempiere ERP啦!
- 翻译后的xml文件trans.xml,结果如下所示:
<adempiereTrl language="en_US" table="AD_Window"> <row id="100" trl="Y"> <value column="Name" original="Table and Column">表格和列</value> <value column="Description" original="Maintain Tables and Columns">维护表格和列</value> <value column="Help" original="The Table and Column Window defines all tables with their columns">这个 表格和列窗体 用于定义所有的表格和列</value> </row> </adempiereTrl>