From Fedora Project Wiki

No edit summary
No edit summary
Line 5: Line 5:
{{shortcut|FP:LANG}}
{{shortcut|FP:LANG}}


== Step 1: Find the English version of the page ==
== 第1步:找到页面的英文版本 ==
English is the base language for the Fedora Project wiki, so there needs to be an English version of the page you are working on. (If there isn't an English version of the page you are working on, see [[#Handling translations without an English version]].)
英语是Fedora项目维基的基本语言,所以你需要基于一个英文版本的页面来处理。(如果你处理的页面还没有英文版本,请参见[[#Handling translations without an English version|无英文版本的翻译工作]]。)


If there is already a language template at the top of that page, click <nowiki>[edit]</nowiki> on the right side of the language box and move to step 4; otherwise, continue to step 2.
如果在页面的顶部已经存在一个语言模板,那么单击语言条右侧的<nowiki>[edit]</nowiki>按钮并跳转到第4步,否则,请继续第2步。


=== Handling translations without an English version ===
=== 无英文版本的翻译工作 ===
If the page you create doesn't have an English version, create a new page for the English version, add the {{template|autolang}} template as noted above, and then add the {{template|needs english}} template. This will flag the page for needing an English translation as well as create a base page.
如果你创建的页面还没有一个英文版本,那么首先创建一个英文版本的新页面,添加如上面所描述的{{template|autolang}}模板,然后添加{{template|needs english}} 模板。这样就会在创建一个新页面的同时标记该页面还需要一个英文版本的翻译。


== Step 2: Add the language template to the English page ==
== 第2步:在英文页面上添加语言模板 ==
Edit the English page, and at the top of it, add the {{template|autolang}} template:
编辑英文页面,在顶部添加模板{{template|autolang}} 模板:


  <nowiki>{{autolang|base=yes}}</nowiki>
  <nowiki>{{autolang|base=yes}}</nowiki>


The <code>base=yes</code> part is ''required'' for the English page. Save the page.
<code>base=yes</code> 部分的代码对于英文页面是''必须''的。保存编辑的页面。


== Step 3: Create the language template ==
== 第3步:创建语言模板 ==
The {{template|autolang}} autolang template should provide a link for you to set up the language box. Click it, and an edit page will come up. ''Don't change any of the content'' and save the page. Then click the <nowiki>[edit]</nowiki> link on the right side of the language box.
{{template|autolang}} 自动语言模板为你提供了一个设置语言条的链接。单击这个链接,然后编辑页面将会随之出现。''不要改变任何内容''并且保存页面。然后单击语言条右侧的<nowiki>[edit]</nowiki>链接。


== Step 4: Add your language to the template ==
== 第4步:在模板中添加你的语言 ==
At this point you should have an edit box open with template syntax that looks similar to this:
现在你应该打开了一个类似下面的模板定义的编辑框:


  <nowiki>{{</nowiki>lang|en|page=''Base page name''<nowiki>}}</nowiki>
  <nowiki>{{</nowiki>lang|en|page=''Base page name''<nowiki>}}</nowiki>


The text between <code>lang</code> and <code>page=</code> is the list of language codes. Add the language code that you are translating to this list. Use [http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/languages/Names.php?view=markup this list] to determine the proper MediaWiki language code.
<code>lang</code> <code>page=</code> 之间的内容是语言代码的列表。在这个列表中添加你将要翻译的语言代码。使用[http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/languages/Names.php?view=markup this list] 来确定合适的MediaWiki支持的语言代码。


{{admon/note | Please keep the list alphabetical | Keep the list of language codes alphabetical by code. This means German (de) should come before English (en), for example. }}
{{admon/note | 请保持列表按字母有序 | 保持语言代码列表按照代码的有序。这也就是说,举个例子,德语(de)应该排在英语(en)之前。}}


== Step 5: Start the new page ==
== 第5步:开始新页面 ==
Click on the red link for your language to start the new page. Insert the template <code><nowiki>{{autolang}}</nowiki></code> at the top of your page, so that the list of languages is there. ''Be certain to not include "base=yes" in the template for non-English subpages.''
单击你的语言的红色链接,以创建一个新页面。在页面顶部插入<code><nowiki>{{autolang}}</nowiki></code>模板,这样页面顶部就会出现语言条。''请确保在非英语子页面的模板中没有包含"base=yes"这段。''


== Moving pages from the old translation setup ==
== 从旧的翻译中移动页面 ==
For translated pages that aren't in the proper place, follow steps 1-4 above. Then, copy the title of the new page (e.g., "Fedora Project Wiki/de"). Click the "move" button at the top of the old page and paste the new page name in the "to new title" field. Edit the new page and add <code><nowiki>{{autolang}}</nowiki></code> to the top.
对于那些出现在不适当位置的翻译页面,请参考上述第1步到第4步的操作。然后,复制新页面的标题(例如,"Fedora Project Wiki/de")。单击旧页面顶部的"move"按钮,在"to new title"中粘贴新页面的名字。编辑新页面并且在页面顶部添加<code><nowiki>{{autolang}}</nowiki></code> 模板。

Revision as of 14:23, 5 August 2010


Warning.png
This is a page that describes policies of the Fedora Project.
For policy pages, accuracy and clarity are important. You are encouraged to edit the wiki to improve it. If you have any substantive changes to make to this page, use the talk page to discuss the changes with other page maintainers. Do this before making the changes.
Shortcut:
FP:LANG

第1步:找到页面的英文版本

英语是Fedora项目维基的基本语言,所以你需要基于一个英文版本的页面来处理。(如果你处理的页面还没有英文版本,请参见无英文版本的翻译工作。)

如果在页面的顶部已经存在一个语言模板,那么单击语言条右侧的[edit]按钮并跳转到第4步,否则,请继续第2步。

无英文版本的翻译工作

如果你创建的页面还没有一个英文版本,那么首先创建一个英文版本的新页面,添加如上面所描述的{{autolang}}模板,然后添加{{needs english}} 模板。这样就会在创建一个新页面的同时标记该页面还需要一个英文版本的翻译。

第2步:在英文页面上添加语言模板

编辑英文页面,在顶部添加模板{{autolang}} 模板:

{{autolang|base=yes}}

base=yes 部分的代码对于英文页面是必须的。保存编辑的页面。

第3步:创建语言模板

{{autolang}} 自动语言模板为你提供了一个设置语言条的链接。单击这个链接,然后编辑页面将会随之出现。不要改变任何内容并且保存页面。然后单击语言条右侧的[edit]链接。

第4步:在模板中添加你的语言

现在你应该打开了一个类似下面的模板定义的编辑框:

{{lang|en|page=Base page name}}

langpage= 之间的内容是语言代码的列表。在这个列表中添加你将要翻译的语言代码。使用this list 来确定合适的MediaWiki支持的语言代码。

Note.png
请保持列表按字母有序
保持语言代码列表按照代码的有序。这也就是说,举个例子,德语(de)应该排在英语(en)之前。

第5步:开始新页面

单击你的语言的红色链接,以创建一个新页面。在页面顶部插入{{autolang}}模板,这样页面顶部就会出现语言条。请确保在非英语子页面的模板中没有包含"base=yes"这段。

从旧的翻译中移动页面

对于那些出现在不适当位置的翻译页面,请参考上述第1步到第4步的操作。然后,复制新页面的标题(例如,"Fedora Project Wiki/de")。单击旧页面顶部的"move"按钮,在"to new title"中粘贴新页面的名字。编辑新页面并且在页面顶部添加{{autolang}} 模板。