Translating/HowTo/lang-zh: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
Line 112: Line 112:
=== Setting up the translated page ===
=== Setting up the translated page ===


虽然翻译可以自由决定怎样翻译WIKI,但他们必须遵守一条规则。那就是被翻译的页面必须使用[[Template:Translation|<nowiki>{{Translation}}</nowiki>]].
Although the translator is given as much freedom to edit and to translate as possible when translating the wiki, there is one rule that must be adhered to at all times. The translated page must be declared as a [[Template:Translation|<nowiki>{{Translation}}</nowiki>]]. (Please note the use of "singular". Plural is for the original page and it will have many translations.)


当然也有很多各种各样的建议可以帮助改善翻译工作。第一,保证页面内的链接简单易懂。第二,在翻译中适量保留原文可以帮助理解和维护。
There are couple of other bits of advice that may improve the quality of the translation process. First, please keep navigation and linking within the translated pages simple and easy to follow. Secondly, preserving the original text in the translation may simplify peer review and help with maintenance.


翻译最快的方法是去WIKI页面,通过编辑或查看源码(当页面被保护时,你只有用这种方法)来复制'''wiki-text'''。之后粘贴到新的页面中。
The quickest way to set up a page is by going back to the
original page, then copying the '''wiki-text'''. This can be done either by following the ''edit'' link or through ''view source'' if the page is protected. Then copy the whole page and paste it onto the new page.


==== Adding the [[Template:Translation|Translation template]] ====
==== 添加 [[Template:Translation|Translation template]] ====


<div style="font-size:80%; ">
<div style="font-size:80%; ">
Line 158: Line 157:
|}
|}
</div>
</div>

For a full explanation of the parameters, see the [[#Notes|Notes]] below, in short:
'''lang''' &mdash; is the [http://www.iana.org/assignments/language-subtag-registry IANA language code] (usually 2 letters, without any further segmentation&mdash;ie: instead of ''<tt>lang-pt-BR</tt>'' (brazilian portuguese), just ''<tt>lang-pt</tt>'' (portuguese)&mdash;just to keep things simple and neutral.
想要理解所有的参数,请参考下面的[#Notes|Notes]]. 简单来说: '''lang''' &mdash; 是语言代码[http://www.iana.org/assignments/language-subtag-registry IANA language code] (通常是2位代码,没有其它的信息$mdash;如: 使用 ''<tt>lang-pt-BR</tt>'' (brazilian portuguese), 而用 ''<tt>lang-pt</tt>'' (portuguese)&mdash;这样可以使事情简单明了。)


==== Adding the [[Template:Ongoing Translation|Ongoing Translation template]] ====
==== Adding the [[Template:Ongoing Translation|Ongoing Translation template]] ====

Revision as of 17:07, 13 March 2008

  翻譯 Translating/HowTo 原文  
  english | español | 日本語 | 中文 | català | Indonesia   +/- 變更  
This is an on-going translation


参加翻译应该是一个很有趣而且也会有回报的工作。但是WIKI自己的一些易变特性可能会给翻译工作造成一些困难。这些问题可以通过下面的一些简单的规则和标准的处理模示来克服。同时希望也可以帮助任何人不受影响的加入这个过程,并享受其中的快乐。

这个翻译模板可以让您更好的理解这个过程,所以这个帮助文件是做翻译最好指导。当你开始新的一页时,把{{translations}}放在页面内,并且按照下面的步骤保存新的文件和相关的页面。下面的一些内容已经不是最新的了,所以有时看起来会有一些别扭


具体步骤

从下面开始,有三个基本步骤去完成一个翻译工作:


检查源文件

我们假设你要翻译一个由OLPC维护的页面。这种页面应该包括一个{{OLPC}} 模板;而且页面所属的给也是Category:Pages maintained by OLPC;通常这种页面都被放在很明显的位置,方便大家访问。

如果这个页面已经包括了语言条,你可以跳过这一步直接去 #修改语言条

[[Original page]] (translated page does not exist—yet)
{{OLPC}}

== Some header ==

Some text blah... 
blah... [[#Another header]]
... blah == Another header == Some other text blah...
blah... [[Another page]]
and [[Another page#section|section]]
... blah

添加语言条

如果你真的找到一页从来没有被翻译过的页面,在翻译前你应该在这个页面添加一个语言条为其它的翻译者提供方便。

[[Original page]] (translated page does not exist—yet)
{{OLPC}}
{{Translations}}

== Some header ==

Some text blah... 
blah... [[#Another header]]
... blah == Another header == Some other text blah...
blah... [[Another page]]
and [[Another page#section|section]]
... blah

翻译设置

You should follow the [[Original page/translations]] link in order to edit the page that groups the translations of a particular page, and should look something like this:

使用 [[Original page/translations]] 链接可以把要翻译的页面放在一个特定的组时。这个链接应该看起来象下面的样子:

[[Original page/translations]]
[[Original page|english]] | [[Original page/lang-xx|shortNativeName]]

加入之后,你就会看到一个红色的链接。这种情况表明这个链接不存在或链接有问题。不用担心这个,因为这就是你将要翻译的页面。下面一步你就可以改正这个链接错误。

提示: 你应该先使用 "The OLPC Wiki/lang-es"。 如果你想把页面放在正确的语言下面 (如: El Wiki de la OLPC" ),你可以使用WIKI的移动("move")功能; WIKI将自动生成一个重定向链接,这样语言链接就下确了。(当前有一些问题,有一些页面不能按预想的工作。不过大部分都是因为在翻译过和中没有正确的格式所造成的。就象前面提到的,在翻译中使用 /lang-xx 结构还是有很多优势的。


修改语言条

下面是一个标准语言条的例子。需要被翻译的页面应该在语言条的右侧显示 +/- 链接(不过在这个例子中没有).这个链接是用来编辑语言条的。要在语言条上增加一门新的语言,你可以点未这个链接打开编辑页面,添加正确的语言代码。

当你把这个链接加入你的页面时,保证 /lang-xx 按字母顺序排列。(就是说,如果你加入德语 /lang-de,它应该在英语 (English&mdashen) 之前)。同时保证在 '|'前后加入空格来分隔语言。请参考 # 检查源文件/翻译设置

Setting up the translated page

虽然翻译可以自由决定怎样翻译WIKI,但他们必须遵守一条规则。那就是被翻译的页面必须使用{{Translation}}.

当然也有很多各种各样的建议可以帮助改善翻译工作。第一,保证页面内的链接简单易懂。第二,在翻译中适量保留原文可以帮助理解和维护。

翻译最快的方法是去WIKI页面,通过编辑或查看源码(当页面被保护时,你只有用这种方法)来复制wiki-text。之后粘贴到新的页面中。

添加 Translation template

[[Original page]] [[Original page/lang-xx]]
(translated page name)
{{OLPC}}
{{Translations}}


== Some header ==

Some text blah... 
blah... [[#Another header]]
... blah == Another header == Some other text blah...
blah... [[Another page]]
and [[Another page#section|section]]
... blah
{{OLPC}}
{{Translation
 | lang = xx
 | source = Original page
 | version = yyyy}}

== Some header ==

Some text blah... 
blah... [[#Another header]]
... blah == Another header == Some other text blah...
blah... [[Another page]]
and [[Another page#section|section]]
... blah

想要理解所有的参数,请参考下面的[#Notes|Notes]]. 简单来说: lang — 是语言代码IANA language code (通常是2位代码,没有其它的信息$mdash;如: 使用 lang-pt-BR (brazilian portuguese), 而用 lang-pt (portuguese)—这样可以使事情简单明了。)

Adding the Ongoing Translation template

[[Original page]] [[Original page/lang-xx]]
(translated page name)
{{OLPC}}
{{Translations}}


== Some header ==

Some text blah... 
blah... [[#Another header]]
... blah == Another header == Some other text blah...
blah... [[Another page]]
and [[Another page#section|section]]
... blah
{{OLPC}}
{{Translation
 | lang = xx
 | source = Original page
 | version = yyyy}}
{{Ongoing Translation}}

== Some header ==

Some text blah... 
blah... [[#Another header]]
... blah == Another header == Some other text blah...
blah... [[Another page]]
and [[Another page#section|section]]
... blah

The main purpose of the {{Ongoing Translation}} template is to inform the readers that a particular page is still not finished, therefore they can expect the presence of untranslated text or that it hasn't been reviewed enough and thus may not be quite done yet. Parallel to that notice to the reader, it does a grouping of them in the Ongoing Translation category thus allowing other translators to find them and collaborate, review, make comments, etc. on them.

Translating section headers

When translating section headers, the best practice is to preserve them as anchors. Then add the translated header under it.

For example if the section header is called "Some Section Header" and it is translated into German in the form of "Einige Paragraph Kopfzeile". Original text "Some Section Header" is preserved by wrapping it between curly braces like the following:

   {{anchor|Some Section Header}}

Then the translated text "Einige Paragraph Kopfzeile" is placed under it. Together it will look like the following when finished:

    {{anchor|Some Section Header}} 
== Einige Paragraph Kopfzeile ==
[[Original page]] [[Original page/lang-xx]]
(translated page name)
{{OLPC}}
{{Translations}}


== Some header ==

Some text blah... 
blah... [[#Another header]]
... blah == Another header == Some other text blah...
blah... [[Another page]]
and [[Another page#section|section]]
... blah
{{OLPC}}
{{Translation
 | lang = xx
 | source = Original page
 | version = yyyy}}
{{Ongoing Translation}}

{{anchor|Some header}}
== Un titular ==

Some text blah... 
blah... [[#Another header]]
... blah {{anchor|Another header}} == Otro titular == Some other text blah...
blah... [[Another page]]
and [[Another page#section|section]]
... blah

Translating links

When translating links, the original text is preserved by using what is called "piped links". By placing the symbol "|" between original text and the translated text, both become connected together through a pipe. For example if "some-link" is to be translated into German as "einige-link", it will end up looking like the following:

   [[some-link|einige-link]]

As a result, following "einige-like" will connect to "some-link". The reader will only see the translated link "einige-link".

Linking to a page in particular language

When linking to a translated page in a particular language use the /lang-xx to point to that particular translation.

   [[some-link/lang-de|einige-link]]

Translating texts

When translating text, it is useful to preserve original text by wrapping them inside {{Translated text}} function. "display = value" parameter can be used to control whether the original text is visible to the reader or not.

Original text invisible to reader (display = none).

   
    {{ Translated text |   
           original text
           more original text
           yet more original text
           final original text
       | display = none }}
    


Original text visible to reader (display = block).

   
    {{ Translated text |
           original text
           more original text
           yet more original text
           final original text     
       | display = block }}
    

Please see here for more information.


[[Original page]] [[Original page/lang-xx]]
(translated page name)
{{OLPC}}
{{Translations}}


== Some header ==

Some text blah... 
blah... [[#Another header]]
... blah == Another header == Some other text blah...
blah... [[Another page]]
and [[Another page#section|section]]
... blah
{{OLPC}}
{{Translation
 | lang = xx
 | source = Original page
 | version = yyyy}}
{{Ongoing Translation}}

{{anchor|Some header}}
== Un titular ==

Algo de texto bla... 
bla... [[#Another header|Otro titular]]
... blah {{ Translated text | Some text blah...
blah... [[#Another header]]
... blah | display = block}} {{anchor|Another header}} == Otro titular == Algo más de texto bla...
bla... [[Another page/lang-xx|Otra página]]
y [[Another page/lang-xx#section|sección]]
... bla {{ Translated text | Some other text blah...
blah... [[Another page]]
and [[Another page#section|section]]
... blah | display = block}}

Handling translated links that point to a non-existant page

At the beginning, any link you 'translate' will most likely point to a non-existing page; don't worry. There are two alternatives:

  • let the wiki handle them through Special:Wantedpages
  • make one last translating effort: dedicated redirects

The first alternative is the simplest but also the hardest on the reader (lands them on the 'create page option' which is hardly the best alternative). Another downside, is that it'll be hard to detect those 'wanted pages' for a specific language, as they will be in the same list as all other 'missing translated pages' in other languages plus all the naturally missing pages in the wiki (a long list due to historical reasons).

The second, recommended alternative, is to add the {{subst:requesttranslation}} template to the target page. This self-substitutes with the replacement:

[[Another page/lang-xx|annuder paij]]
#REDIRECT [[Another page]]
[[Category:Translations wanted lang-xx]]
{{translation | lang = es | source = Another page | status = wanted }}

Note: the last option is only available for those languages whose "inline translation instructions" are not red in this table. Use the links there to create instructions for your language, based on English or Spanish, in a template named "translation/no translation/lang-xx".

WARNING
Make sure that the original page is not linking to a REDIRECT. If that is the case, you should change the target to the real page and create there the /lang-xx subpage. For example, if the [[Foo]] actually is a redirect to [[Bar]], then you should create the [[Bar/lang-xx]] instead of [[Foo/lang-xx]] and change the referencing link accordingly.

This will serve three purposes, first the page will at least take the reader to the right page (albeit not in the correct language). Secondly, the Category will allow a simple way to check 'what is missing'. Finally, and using the What links here from the toolbox you can find out how many references to the missing page exist, giving some sense of need for it and thus guiding the translating efforts.

Please do NOT add these fake translation redirects to the /translations page, as it doesn't make sense to advertise a translation that doesn't yet exist. Only when the REDIRECT is made into a real translation (ongoing or otherwise) add the link to the language navigation page.

Full example of a wiki-page

Anatomy of a wiki-page

This 'sample' page includes all of the elements that require some level of consideration when translating
[[Original page]] Notes on the structure
{{OLPC}}

== Some header ==

Some text blah... 
blah... [[#Another header]]
... blah == Another header == Some other text blah...
blah... [[Another page]]
and [[Another page#section|section]]
... blah

== Some header ==
section headers act as anchors, and their translation is sensitive as they anchor incomming links.
[[#Another header]]
intra-page section linking may be simple to maintain as it's within the same page (you can search&replace local references) but will break external inbound links if changed.
[[Another page]]
the most common problem with links to other pages is to know how the page title has been translated...
[[Another page#section|section]]
links to specific sections in other pages pose the conflated problem of knowing both the target page name and the section name's translations.

Full finished example

[[Original page]] [[Original page/lang-xx]]
(translated page name)
Translated text deleted...
(not really recommended)
{{OLPC}}
{{Translations}}


== Some header ==

Some text blah... 
blah... [[#Another header]]
... blah == Another header == Some other text blah...
blah... [[Another page]]
and [[Another page#section|section]]
... blah
{{OLPC}}
{{Translation
 | lang = xx
 | source = Original page
 | version = yyyy}}
{{Ongoing Translation}}

{{anchor|Some header}}
== Un titular ==

Algo de texto bla... 
bla... [[#Another header|Otro titular]]
... blah {{ Translated text | Some text blah...
blah... [[#Another header]]
... blah | display = block}} {{anchor|Another header}} == Otro titular == Algo más de texto bla...
bla... [[Another page/lang-xx|Otra página]]
y [[Another page/lang-xx#section|sección]]
... bla {{ Translated text | Some other text blah...
blah... [[Another page]]
and [[Another page#section|section]]
... blah | display = block}}
{{OLPC}}
{{Translation
 | lang = xx
 | source = Original page
 | version = yyyy}}

{{anchor|Some header}}
== Un titular ==

Algo de texto bla... 
bla... [[#Another header|Otro titular]]
... blah {{anchor|Another header}} == Otro titular == Algo más de texto bla...
bla... [[Another page/lang-xx|Otra página]]
y [[Another page/lang-xx#section|sección]]
... bla

Supporting pages:

[[Original page/translations]]
[[Original page|english]] | [[Original page/lang-xx|shortNativeName]]
[[Another page/lang-xx]] [[Another page]]
#REDIRECT [[Another page]]
[[Category:Missing translation]]
some untranslated page...
maybe the content is mutating rapidly,
or is peripheric to the main corpus, etc.

Notes

shortNativeName
should be in the native language; español instead of spanish.

Translation template notes

For the full documentation, please see Template:Translation.

lang
This parameter identifies the target language of the translation. See ISO 639 for a select list of codes being used in the wiki. (Another source is IANA's lang codes).
It serves several purposes, and is used in several contexts although it should be done in a homogeneous way.
We are currently using ISO 639-1 codes (two-letter codes).

source
is the name of the page (not the link—in other words, without the enclosing square brackets).

version
Each original page has a unique version number. These version numbers appear on the far right of the 'blue language navigation bar', and appear in the form: [ID# yyyyy]
When a page edit is submitted, the version number for that particular page is incremented.
A translated page on the other hand does not have a visible version number on its own. It must be manually assigned by the translator when an edit is submitted. The version number of a translated page is the same as the version number of the original page which it is based on.
For example if the original page has a version number ID# 54321, and the translatation is based on this particular version, the translated page is given the version number ID# 54321.
The version number for the translated page is entered at the top of the page as a parameter for the {{Translation}} function.
{{ Translation
| lang = de
| source = Translating/HowTo
| version = 54321 }}
There is one use which results directly from the above manual assignment of a version number to the translated page. It allows the translator to easily lookup what new translations are needed by following the 'changes' link located to the far right of the 'blue language navigation bar'.
Suppose translator 'A' is making a translation of page Bitfrost with version number ID# 65535 into español. As per this guide, translator 'A' assigns version number ID# 65535 to the Bitfrost/lang-es español translated page. Meanwhile editor 'B' arrives and edits the original Bitfrost page and its version number is incremented to ID# 65536. Translator 'A' then can see what new translations are necessary by followoing the 'changes' link located on the blue nav bar. The 'changes' link compares the differences of two versions of the original page ID# 65535 and ID# 65536. By observing the resulting output, translator 'A' could easily see what new text needs to be translated.

Translated text template notes

display
is used to show or hide the enclosed translated text.
While doing the translation, it comes in handy for comparing the original with the translation. When finished, you can replace the block with none and the source text is not displayed. Although it adds quite a bit of text and 'noise' to the source of the translated page, it comes in handy when trying to update or synchronize it with any changes in the original page—after all, this IS a wiki and pages are supposed to mutate!