Ŝablono:Autotranslate/doc

El Komunejo

(Malsamoj inter versioj)
Iri al: navigado, serĉi
E
E (Reverted edits by Susan123456 (talk) to last revision by Kanjy)
Linio 1: Linio 1:
-
文件子( ( ) )
+
{{Documentation subpage}}
-
这个模板是用来显示一个模板中的用户界面语言。
+
This template is used to show a template in the users interface language.
-
==如何转换模板==  
+
== How to convert a template ==
-
在您应用此模板,首先你必须准备的模板。
+
Before you apply this template, first you have to prepare the template.
-
===选择一个模板===  
+
=== Pick a template ===
-
,例如见[ http://commons.wikimedia.org/w/index.php?title=Template:Cc-by-1.0&oldid=12667239模板:抄送按1.0之前的变化] <br />  
+
&mdash;See for example [http://commons.wikimedia.org/w/index.php?title=Template:Cc-by-1.0&oldid=12667239 Template:Cc-by-1.0 before changes].<br />
-
首先,您必须选择一个模板,自动翻译。 <br />  
+
First you have to pick a template to autotranslate.<br />
-
''本文档中,我们将我们的名字“选择模板”为: ''<code> [ [模板:模板名称|模板: <var>模板名称“ /无功>]]</代码”
+
''In this documentation, we will name our "selected template" as:'' <code>[[Template:Template name|Template:<var>Template name</var>]]</code>
-
*[ [商品:模板本土化] ]的列表模板需要翻译或翻译。
+
*See [[Commons:Template i18n]] for a list of templates needing translation or translated.
-
===创建布局模板===  
+
=== Create a layout template ===
-
看到例如[ [范本: Cc-by-1.0/layout ] ] <br />  
+
&mdash;See for example [[Template:Cc-by-1.0/layout]].<br />
-
您必须创建一个布局模板,名为<code> [ [模板:模板名称/布局|模板: <var>模板名称“ /无功” /布局] ] /代码” ,以遏制布局的所有语言版本的范本。 <br />  
+
You must create a layout template, named <code>[[Template:Template name/layout|Template:<var>Template name</var>/layout]]</code>, to contain the layout of all language versions of the template.<br />
-
此模板不应添加任何类别时transcluded 。
+
This template should not add any categories when transcluded.
-
在此网页,您必须添加代码,使模板识别自动翻译时,可用:
+
In this page, you must add the code that will make the template to recognise automaticly the translations when available:
-
 的<code> <nowiki> ( (自动翻译/语言| ( (物质:名字空间}}:{{物质: BASEPAGENAME }}}}</ nowiki “ ” /代码“
+
<code><nowiki>{{Autotranslate/Languages|{{subst:NAMESPACE}}:{{subst:BASEPAGENAME}}}}</nowiki></code>
-
===转换现有语言版本===  
+
=== Convert existing language versions ===
-
看到例如[ [范本: Cc-by-1.0/en ] ] <br />  
+
&mdash;See for example [[Template:Cc-by-1.0/en]].<br />
-
所有版本必须子的<code> [ [模板:模板名称|模板: <var>模板名称“ /无功>]]</代码” ,他的名字必须使用适当的前缀, [ [男: List_of_Wikipedias |为维基百科上使用] ]当添加一个新的语言, ISO 639语言代码。 Posibilities列[ [范本:自动翻译/语言/文件# Supported_languages |这里] ] 。例如,西班牙子必须名为<code> [ [模板:模板名称/中心|模板: <var>模板名称“ /无功” /中心] ] /代码” <br />通常英文链接主要范本-的<code>模板: <var>模板名称“ /无功” “ /代码” -.这是不正确的,指向它的<code> [ [模板:模板名称/|模板: <var>模板名称“ /无功” /英文] ] /代码”子。
+
All versions must be subpages of <code>[[Template:Template name|Template:<var>Template name</var>]]</code>, and his name must use the appropriate prefix, [[m:List_of_Wikipedias|as used on Wikipedia]] when adding a new language &ndash;ISO 639 language code&ndash;. Posibilities are listed [[Template:Autotranslate/Languages/doc#Supported_languages|here]]. For example, Spanish subpage must be named <code>[[Template:Template name/es|Template:<var>Template name</var>/es]]</code><br />Usually the English language link to the main template &ndash;<code>Template:<var>Template name</var></code>&ndash;. That is incorrect, point it to the <code>[[Template:Template name/en|Template:<var>Template name</var>/en]]</code> subpage.
-
每个语言版本的模板应检查并转换为使用布局模板-的<code> [ [模板:模板名称/布局|模板: <var>模板名称“ /无功” /布局] ] /代码” & ndash ; 。首先是英文版本,并进行比较,以目前的范本。
+
Each language version of the template should be checked and converted to use the layout template &ndash;<code>[[Template:Template name/layout|Template:<var>Template name</var>/layout]]</code>&ndash;. Start with the English language version and compare it to the current template.
-
请注意,这是不应该包括与模板,类似<code> <nowiki> ( (翻译标记|清理) ) “ / nowiki ” “ /代码”或<code>文件<nowiki> ( ( ) ) “ / nowiki ” “ /代码” ,必须在一个<code> <noinclude> /代码”标记。
+
Note that everything that is not supposed to be included together with the template, like <code><nowiki>{{translated tag|cleanup}}</nowiki></code> or <code><nowiki>{{documentation}}</nowiki></code>, must be inside a <code>&lt;noinclude&gt;</code> tag.
-
这是sintaxis您必须使用的<code> [ [模板:模板名称/|模板: <var>模板名称“ /无功” / <var>前缀” /无功>>]]</代码“ ,其中<code> <var>前缀” /无功“ ” “ /代码”是[ [范本:自动翻译/语言/文件# Supported_languages |一本] ]
+
Here is the sintaxis you must use for <code>[[Template:Template name/en|Template:<var>Template name</var>/&lt;<var>prefix</var>&gt;]]</code>, where <code>&lt;<var>prefix</var>&gt;</code> is [[Template:Autotranslate/Languages/doc#Supported_languages|one of this]].
-
  <nowiki> ( ( “ / nowiki ”的<code> [ [模板:模板名称/布局|模板: <var>模板名称“ /无功” /布局] ] /代码”
+
<nowiki>{{</nowiki><code>[[Template:Template name/layout|Template:<var>Template name</var>/layout]]</code>
-
  |文字= ''翻译文本模板''
+
|text=&lt;''translated text of the template''&gt;
-
  |= ''前缀''
+
|lang=&lt;''prefix''&gt;
-
  <nowiki> ) ) “ / nowiki <br /> <nowiki> <noinclude> ( ( “ / nowiki ”翻译标记|许可证<nowiki> ) ) “ / noinclude ” “ / nowiki
+
<nowiki>}}</nowiki><br /><nowiki><noinclude>{{</nowiki>translated tag|license<nowiki>}}</noinclude></nowiki>
-
===创建一个文件页===  
+
=== Create a documentation page ===
-
看到例如[ [范本: Cc-by-1.0/doc ] ] <br />  
+
&mdash;See for example [[Template:Cc-by-1.0/doc]].<br />
-
创建一个文件页面在<code> [ [模板:模板名称/文件|模板: <var>模板名称“ /无功” /文件] ] /代码” 。这页的文件应包括一些代码创造语言版本的模板。
+
Create a documentation page at <code>[[Template:Template name/doc|Template:<var>Template name</var>/doc]]</code>. This documentation page should include some code for creating language versions of the template.
-
===转换主要范本===  
+
=== Convert the main template ===
-
看到例如[ [范本:抄送按1.0 ] ] <br />  
+
&mdash;See for example [[Template:Cc-by-1.0]].<br />
-
最后一步是使模板。请务必检查前的所有启用范本。您可能会导致真正的大混乱!
+
The last step is to enable the template. Be sure to check everything before you enable the template. You can cause a really big mess!
-
为了使模板,把这个代码模板-的<code> [ [模板:模板名称|模板: <var>模板名称“ /无功>]]</代码” -.  
+
To enable the template, put this code in the template &ndash;<code>[[Template:Template name|Template:<var>Template name</var>]]</code>&ndash;.
-
  <nowiki> ( (自动翻译| 1 = ( ( ( 1 |}}}| 2 = ( ( ( 2 |}}}| 3 = ( ( ( 3 |}}}|基地= / nowiki ''模板名称'' <nowiki> ) ) “ / nowiki
+
<nowiki>{{Autotranslate|1={{{1|}}}|2={{{2|}}}|3={{{3|}}}|base=</nowiki>''template name''<nowiki>}}</nowiki>
-
  <nowiki>文件<noinclude> ( ( ) ) “ / noinclude ” “ / nowiki
+
<nowiki><noinclude>{{documentation}}</noinclude></nowiki>
-
===保护模板===  
+
=== Protect templates ===
-
主要范本网页很可能已受到保护。你或许应该也保护的<code> /布局“ /代码”和<code> /恩“ /代码” 。
+
The main template page is probably already protected. You should probably also protect <code>/layout</code> and <code>/en</code>.
-
== ==代码段
+
== Code snippet ==
-
要使用此模板,包括下面的代码:
+
To use this template, include the following code:
-
<PRE> ( (自动翻译| 1 = ( ( ( 1 |}}}| 2 = ( ( ( 2 |}}}| 3 = ( ( ( 3 |}}}| 4 = ( ( ( 4 | ) ) ) | 5 = ( ( ( 5 |}}}| 6 = ( ( ( 6 |}}}| 7 = ( ( ( 7 |}}}| 8 = ( ( ( 8 |}}}| 9 = ( ( ( 9 | ) ) )
+
<PRE>{{Autotranslate|1={{{1|}}}|2={{{2|}}}|3={{{3|}}}|4={{{4|}}}|5={{{5|}}}|6={{{6|}}}|7={{{7|}}}|8={{{8|}}}|9={{{9|}}}
-
|基地= ( (物质:网页名) )
+
|base={{subst:PAGENAME}}
-
) ) “ /预”
+
}}</PRE>

Kiel registrite je 04:07, 23. Jul 2009

Ŝablono:Documentation subpage This template is used to show a template in the users interface language.

Enhavo

How to convert a template

Before you apply this template, first you have to prepare the template.

Pick a template

—See for example Template:Cc-by-1.0 before changes.
First you have to pick a template to autotranslate.
In this documentation, we will name our "selected template" as: Template:Template name

Create a layout template

—See for example Template:Cc-by-1.0/layout.
You must create a layout template, named Template:Template name/layout, to contain the layout of all language versions of the template.
This template should not add any categories when transcluded.

In this page, you must add the code that will make the template to recognise automaticly the translations when available:

{{Autotranslate/Languages|{{subst:NAMESPACE}}:{{subst:BASEPAGENAME}}}}

Convert existing language versions

—See for example Template:Cc-by-1.0/en.
All versions must be subpages of Template:Template name, and his name must use the appropriate prefix, as used on Wikipedia when adding a new language –ISO 639 language code–. Posibilities are listed here. For example, Spanish subpage must be named Template:Template name/es
Usually the English language link to the main template –Template:Template name–. That is incorrect, point it to the Template:Template name/en subpage.

Each language version of the template should be checked and converted to use the layout template –Template:Template name/layout–. Start with the English language version and compare it to the current template.

Note that everything that is not supposed to be included together with the template, like {{translated tag|cleanup}} or {{documentation}}, must be inside a <noinclude> tag.

Here is the sintaxis you must use for Template:Template name/<prefix>, where <prefix> is one of this.

{{Template:Template name/layout
|text=<translated text of the template>
|lang=<prefix>
}}
<noinclude>{{translated tag|license}}</noinclude>

Create a documentation page

—See for example Template:Cc-by-1.0/doc.
Create a documentation page at Template:Template name/doc. This documentation page should include some code for creating language versions of the template.

Convert the main template

—See for example Template:Cc-by-1.0.
The last step is to enable the template. Be sure to check everything before you enable the template. You can cause a really big mess! To enable the template, put this code in the template –Template:Template name–.

{{Autotranslate|1={{{1|}}}|2={{{2|}}}|3={{{3|}}}|base=template name}}
<noinclude>{{documentation}}</noinclude>

Protect templates

The main template page is probably already protected. You should probably also protect /layout and /en.

Code snippet

To use this template, include the following code:

{{Autotranslate|1={{{1|}}}|2={{{2|}}}|3={{{3|}}}|4={{{4|}}}|5={{{5|}}}|6={{{6|}}}|7={{{7|}}}|8={{{8|}}}|9={{{9|}}}
|base={{subst:PAGENAME}}
}}