Help:Extension:Translate/Page translation example/zh

欢迎！看完这篇教程之后你将明白如何使用翻译扩展创建和管理一个翻译页面. 我们尽量在可以介绍清楚所有概念和任务的前提下保证此教程的简洁易懂. 通过这篇教程你将可以使用进一步的关于页面翻译特性的教程.

第一步：准备工作
本教程默认翻译扩展已经安装并调试完成. 可能你已经有一个页面想要翻译了，或者你可以根据下面的例子在你自己的wiki中试一试这些步骤.

这是描述一个位于Fréttinga的虚拟市政府的页面. Fréttinga is a small municipality in MungoLand, located on the BaMungo island. It hosts a population of about 400 people. It has some agriculture and fishing. Tourists like to visit it in the summer time. == Services == It doesn't have many services. There is a shop and car ferry visits the island from mainland once a day.
 * 1. 转到在您的wiki上的 Fréttinga 页面，然后单击创建.
 * 2. 粘贴上面的内容，并保存它.

第二步：准备
现在你有了一个有内容的页面. 如果页面正在进行很频繁的编辑，那最好等这些编辑降低到正常水平时再把它添加到翻译体统. 这样做是为了避免太多在变动中内容也被翻译.

&lt;translate> Fréttinga is a small municipality in MungoLand, located on the BaMungo island. It hosts a population of about 400 people. It has some agriculture and fishing. Tourists like to visit it in the summer time. == Services == It doesn't have many services. There is a shop and car ferry visits the island from mainland once a day. &lt;/translate>
 * 3. 编辑 Fréttinga 页面
 * 4. 用 &lt;translate>...&lt;/translate> 标记出需要翻译的内容，如图所示.
 * 5. 保存页面

第3步：启动翻译
保存页面之后，你会在页面顶部看到一个“标记翻译此页”（如果你不是翻译管理员的话，会看到“此页面包含未被翻译的改动. ”）的链接. 点击那个链接，这样页面就会自动分成四个翻译部分. 第一部分是页面标题、第二部分是首段内容、第三部分是第二段标题、第四部分是第二段内容. 这是最基础的页面翻译项：每个部分都是独立的，需要作为一个整体来翻译，页面内容的改变也以一个部分为单位. 每个部分可以删除或重排.

同时也会出现一个页面翻译的模板，会在后面详细介绍. 你可以给每个翻译部分命名，在例子中我们使用默认名称.


 * 6.单击“标记翻译此页”链接
 * 7.请确保页面本体被正确地分成三个单元
 * 8.单击“标记翻译的版本”按钮
 * 9.返回到原始页面

现在你可以在上方看到一个新的链接，“翻译此页”，翻译者可以通过此链接翻译页面. 你可以看一看使用此页作为示例的翻译教程. 然后返回这里继续看下面的步骤.

第4步：进行修改
监视变动是后续的重要步骤，可让你知道变动和工作原理. 当你打开页面进行编辑时会发现已被类似 代码标记了. 这是扩展自动添加的帮助识别每个翻译部分的符号. This allows you to rearrange and edit those units. When editing the page, the markers should be left alone and their position in relation to the unit they belong to should not be changed. When moving a unit, move the unit marker, too. When deleting a unit, delete the marker too. When adding new paragraphs, new markers will be added by the software. Do not try to do this manually, it may confuse the software. &lt;languages /> &lt;translate> &lt;!--T:1--> Fréttinga is a small municipality in MungoLand, located on the BaMungo island. It hosts a population of about 400 people. It has some agriculture and fishing. Tourists like to visit it in the summer time. It has marvelous beaches with a lot of seagulls. == Services == &lt;!--T:2--> &lt;!--T:3--> It doesn't have many services. There is a shop and car ferry visits the island from mainland once a day. In 2009 January the roof of the church in the island fell down. It was rebuilt collaboratively in the following summer. &lt;/translate>


 * 10. 如上图所示，
 * 11，进行一些补充. 单击“翻译标记为”链接的顶部
 * 12. 观察其变化
 * 13. 点击“翻译”按钮
 * 14 打标记. 返回到原来的页面

If you made translations as suggested in the previous step, you can now see those translations linked at the top of the page. You will also see that the translation is not 100 % up to date. If you look at the translated version, you will see the new paragraph in English, and the changed paragraphs are replaced with the English text. If you go to the translation view, you see that the unit is marked as in need of updating.

The translation template view helps you to see what parts of the page are constant in all language versions (the "translation page template", i.e. the parts outside translate tags) and also shows you if units have been moved around or deleted.

There might be a slight delay before all translated versions are updated, because there can be many pages to update.

You now know the basics, but this tutorial will continue with more things that you are likely to encounter.

第5步：添加其他 wiki 标签
You have a basic translatable page now, but it is very dull. Let's add an image and some other stuff to make it look more like a normal wiki page and see how those elements interact with translation.

We also removed a paragraph, including its unit marker, and replaced it with a list, so you can see what happens.

&lt;languages /> &lt;translate> &lt;!--T:1--> Fréttinga is a small municipality in MungoLand, located on the BaMungo island. It hosts a population of about 400 people. It has some agriculture and fishing and tourists like to visit it in the summer time. It has marvelous beaches with a lot of seagulls. == Services == &lt;!--T:2--> &lt;!--T:3--> It doesn't have many services. There is a shop and a car ferry visits the island from the mainland once a day. Main events: * The roof of the church fell down in 2009 * New church was built in 1877 &lt;/translate>
 * 15. 如下图所示给页面添加一张图片，一个分类和一个列表
 * 16. 保存页面
 * 17. 点击页面上方的“标记翻译页面”链接
 * 18. 确保变化是与预期相同的
 * 19. 点击“标记翻译此版本”按钮
 * 20. 返回翻译页面

Here you can see that we left most of the image markup outside of a translation unit and have it in the translation page template instead. This is usually okay, but sometimes translators may want to change the image, especially if it contains linguistic content (text). In those cases it's usually easiest to include the whole markup in a unit (as we did for the category). When the translation of a unit involves or interacts with markup it's a good idea to write a small tip to the translators about it. You can do this with the following steps.


 * 21. Click "Translate this page" link at the top
 * 22. Select "qqq - Page documentation" language
 * 23. Click the message name which contains the message "A typical view of Fréttinga"
 * 24. Write "Description of an image" and click "Save"

In this example, the whole category assignment is a translation unit. This lets translators change it to or whatever naming convention you want to use for categories. If it were outside the translation template, you would have all the pages Foo, Foo/de, Foo/ru, Foo/ta and so on in the same category. Sometimes this is okay, but usually it distracts the users. Make sure your translators know what the local convention is.

Similarly, for links there are many ways to do it. We used " Special:MyLanguage/Seagull ", which automatically redirects to the translated version of the page depending on the users' interface language (if that translation exists). This isn't an ultimate solution, because users will always be redirected to the interface language they're using, not to the language they are currently reading. Special:MyLanguage also interferes with Special:WhatLinksHere and makes it not work. The good thing about Special:MyLanguage is that you always get some version of the page, even if the requested translation doesn't exist.

Last words
It is also possible to move translatable pages including all their translations to a new name. Because many pages may need to be moved, this operation is not instant. You can delete either the whole page including all translations, or just one translated version of a page. You can access these functions from the same place they are on all other pages.

Special:PageTranslation lists all the pages in the system. Besides giving you an overview of all translatable pages, it is also possible to discourage pages from translation. This hides the page from most lists. It does not prevent further translations.

You have now created a translatable page and tried all of the common actions that can be performed on translatable pages. For more information, or if you want to understand the feature more deeply, please continue reading on the in-depth documentation of page translation feature. It also contains discussion about different ways of handling links, categories and templates, or pros and cons of using larger or smaller translation units.