Help:Extension:Translate/zh



翻译扩展为使用 MediaWiki 进行翻译工作提供了必要的特性增强. 它可以用于翻译页面内容、wiki 界面、甚至其他软件产品，像它用在translatewiki.net那样. 翻译扩展简单易用的翻译界面，并拥有可以从文本内容中分离出需要翻译的内容的结构，通过将内容分割为可管理的单元，仅显示可翻译文本给翻译者. 每个单元会自动更新变化，翻译人员通过特殊页面或wiki，可以立刻看到那里需要更新.

翻译扩展在 translatewiki.net 上用于翻译 MediaWiki 的用户界面和其他软件项目，每月有数千译者参与其中. 在 userbase.kde.org 上，它用于翻译近千的用户文档内容页面. 翻译扩展易于上手，同时还提供了方便的高级报表、评审和工作流特性.

功能


界面： 翻译扩展的主要特性是简单实用的翻译界面. 除了类似消息定义和文档这里必要的信息外，你还可以查看其他语言的翻译. 如果定义改变，你会看到该变更. 扩展包含一些内置检查，可以帮助发现常见错误，比如括号不成对、未使用变量. 根据设置，它还可以根据翻译记忆或机器翻译服务提供翻译建议，比如 Google 翻译、微软的 Bing 翻译器和 Apertium.

通过使用 JavaScript 和 AJAX 增强了翻译界面的可用性. 后端提供的WebAPI 可用于移动终端或某种内容的界面定制. 也可以导出信息，用于在其他可以接受 Gettext po 文件格式的在线/离线工具中进行翻译.

信息组和任务： 很多特性都是围绕着信息组和任务这两个基本概念创建的.

信息组表示信息的集合. 一个内容页面可以使一个信息组，对于简单的表单页面，每个段落就是其中的一条信息. 在 translatewiki.net 上，每个 MediaWiki 扩展的所有信息构成一个信息组；一些太大的扩展拥有多个信息组. 你也可以创建信息组的集合，比如所有订阅、翻译扩展的所有信息. 很多统计和任务都可以基于信息组工作.

任务，或者换个说法叫信息组中不同的信息列表，适用于不同的用例. 通常译者在信息组中选择未翻译的信息列表，但是还有象评审信息或要获得所有信息或已/未翻译的信息这样的任务.



报告和统计： 本扩展提供的报告功能，显示根据翻译者活跃程度排序的指定语言的所有信息组的未翻译信息状况.

内容翻译： 如果你曾经试图不使用任何工具来翻译 MediaWiki 中的内容，你知道它没什么灵活性. 当翻译完的版本变得过时、需要更新时，无法跟踪原始页面的变更，因此有很多半成品和过时了的翻译作品，无法直观的把握整体状况. 因为无法对部分文本进行可管理的翻译工作，译者经常会感到沮丧. 译者无法找到要翻译什么、以及哪些需要更新. 用户也会因为这些过时的信息而感到困惑.

通过翻译扩展及其页面翻译功能，这些都解决了. 它给需要翻译的页面增加了一些额外开销，但好处远远大于开销. 本质上，你仅仅需要标记页面上需要翻译的部分. 扩展会将其分割为段落大小的单位，并为他们创建信息组. 之后，译者可以使用适用上面介绍的所有功能. 另外，你可以使用 标签，简单的添加语言栏；或者通过使用 Special:语言/页面名 ，在指定语言的版本存在的时候，使链接自动使用该语言的版本.

更多内容参见教程如何设置页面内容用于翻译和页面翻译功能深入文档.

开发者： 扩展内建了对许多常见翻译文件格式的支持，比如 Java 属性文件、Gettext po文件. 并包含一组工具，通过 wiki 或命令行来高效的导入导出翻译内容.

使用示例
使用翻译扩展，你几乎可以翻译任何东西. 当然，有特殊工具用于翻译某些类型的内容，比如视频字幕. 使用这些工具可以做的更好，不过单就一般的翻译来说，对于任何可以拆分成从一个字到一大段信息的文本，翻译扩展都有很好的表现. 较长的信息变得不太好翻译，也只是费些功夫而已.

The three primary use cases that the Translate extension supports are content translation, local interface translation and software translation. All of them are covered in the following sections, with links to tutorials and to reference documentation or in-depth topical help where available. Of the three use cases the interface translation has been utilized the least.

内容翻译


Most wikis have content they would like to be available in multiple languages. Whether just a few or hundreds of pages, it doesn't matter. In order to prevent wasting translator's time, pages should be marked for translation only when they are reasonably stable. Each change that is made afterwards can affect tens or hundreds of old translations, and the time needed to update them adds up. Especially with volunteer translators, you should be aware of this aspect, and respect the time they spend making translations and updates, avoiding unnecessary work. If you use the Translate extension to translate pages, you are already well on your way to using the translator time available in the most effective and efficient way.

The way the Translate extension splits up a page into paragraph sized units does not leave too much freedom for translators to change the content. This is usually a good thing and is ideal where continuity and consistency of content across languages is desired. It can be worked around, but in principle this way of doing translations is not generally suitable, for example, for Wikipedia articles, which usually are totally independent of each other. Even if they originally start as a translation from a different language, they usually begin living their own independent life from the original version. With Translate, the original page is always the main version, and new content cannot be developed in translated versions.

With these limitations in mind there are still plenty of cases where this feature is a perfect match. Most, if not all, user documentation falls into this category as well as news-like content that does not change once written. If you have the Translate extension already installed and access rights configured, try creating a page and wrapping the whole text inside  and follow the links, or follow the tutorial How to prepare a page for translation.

多语言维基中的本地界面翻译
One thing almost every wiki has customized is the sidebar. It is possible to create a message group for the custom sidebar messages and also for other local interface customisations.

One interesting expansion is the multilingual pages or templates built with the magic word. The translatewiki.net main page and some Wikimedia Commons templates are good examples of this. The magic word is an alternative to the content translation feature and it is more suitable to mark-up heavy pages just like the translatewiki.net main page. Another nice feature is that the language of the page automatically follows the user interface language, so there is no need for a language bar, although you might want to have an interface language selector instead.

Setting this up is currently a bit more complicated than content translation and needs software configuration, but it is all covered in the tutorial How to make an interface message group.

软件翻译
The Translate extension is a good fit for translating software interface messages. At translatewiki.net, it is used to translate tens of software products from games to web applications. The Translate extension supports reading and updating translations from and to common formats used in web development including Java properties, Gettext and Yaml files.

Change tracking is also available for externally tracked files, because internally the extension uses a cached derivative version of the localisation files where the source text and its translations are stored, instead of using them directly in their original format. Translation administrators can either use the web interface or a command line interface to check new message definitions and "fuzzy" (request update of) translations when they need updating. This works regardless of the underlying file format or version control system (if any).

With simple command line tools, translation administrators can easily import even a large set of existing translations and with just one command they can export all translations in the correct format and in the correct directory structure. You can export directly to your VCS repository checkout, where you can easily commit changes and new files.

译者与翻译管理员

 * 如何翻译 [教程]
 * Translation best practices
 * Statistics and reporting
 * Quality assurance
 * Message group states
 * 离线翻译
 * [进行中] 词汇表

翻译管理员

 * 如何为页面做好翻译准备 [教程]
 * 页面翻译管理
 * 界面信息组（本地化侧栏，主页和模板） [教程]
 * [进行中] Message group management
 * YAML设置格式
 * How to write YAML configuration for file based message groups [教程]

开发人员参考文档

 * 安装 and 配置; 大多数情况下MediaWiki语言扩展包已足够使用.
 * [进行中] 给开发人员的翻译说明
 * 钩子
 * [进行中] 信息组
 * [进行中] File format support
 * 翻译目标
 * [未写] Web API
 * Insertables
 * 翻译历史

相关项

 * Translation notifications
 * Localisation/Tutorial: General localisation tutorial for developers, for use at hackathons & trainings
 * Extension:TranslateSvg: Adds support for translating SVG files
 * Universal Language Selector: Provides webfonts and input methods

待办事项

 * 元维基中的实施样本：m:Meta:Translate extension.
 * 特殊任务请查看translate-doc.