Template:Translation/zh-hans/doc: Difference between revisions

From PZwiki
(Update to new version)
No edit summary
Line 1: Line 1:
<noinclude>{{Documentation subpage}}</noinclude>{{Translate}}
{{tlx|Translation}}模板用于维护项目名称和常用词的英语和非英语的等效列表,以及用于其他模板中并自动翻译页面元素。每个语言的子页面都是一个可编辑的数据库,其中包含英语单词和非英语的等效词。
The {{tlx|Translation}} template is used to maintain a list of English and the non-English equivalent for item names and common words, for use in templates and to translate elements of pages automatically. Each language subpage is a user-editable database containing English words and the non-English equivalents.


Using the database helps in maintaining the same translations uniformly and easy changes in case something changes in the game update, so adding a word there and using proper template is preferred to translating the words directly.
使用数据库有助于在游戏更新时内容发生变化时统一轻松修改相同的翻译单词,因此最好在数据库中添加一个单词并使用适当的模板而不是直接翻译单词。


==Database format==
== 数据库格式 ==
The entries are stored in the <code>| English word | english word = Translated word</code> with each pipe being equivalent to translate (for example different casing of the word).
所有条目以 <code>| 单词 | 英文词 = 翻译词</code> 的形式储存,每一条都有对应的翻译(比如单词的不同大小写)。


HTML comments in the format of  <code><nowiki><</nowiki>!-- Comment --></code> can be stored to aid categorization and finding certain words. These are not included anywhere, but can be translated to help finding proper words for other translators.
可以储存像 <code>&lt;!-- 这是注释 --&gt;</code> 的HTML格式的注释用以帮助分类和查找某些单词。这些单词可能出现在任何地方,但是可以翻译用以帮助其他翻译人员找到合适的词。


==Usage==
== 使用 ==
When incorporating to a page, one of the 3 templates should be used, depending on the situation. Using wrong one can lead to extra work being done in wiki, preventing showing certain pages in extreme cases.
当需要应用到一个页面时,需要根据情况使用以下三个模板之一。使用错误的模板可能导致wiki完成额外的工作,甚至可能阻止页面正常显示。
# {{tlx|Translation}} 应该在不需要链接且只需要翻译单词的情况下使用。此模板将在列表中搜索第一个参数中的单词,然后根据语言代码(对应子页面)显示该单词而不是英语单词。
# {{tlx|T}} 应该在需要链接的情况下使用,它将自动从 {{tlx|Translation}} 列表中获取对应的翻译词。
# {{tlx|Subpage}} 应该用于只需要英文单词和语言代码的链接(例如图片链接)的情况。


#{{tlx|Translation}} Should be used where a link is not required, and just the translated word is needed. This template will search the list (switch) for the word in the first parameter, then display that instead of the English word, based on the language code (subpage).
=== 示例 ===
#{{tlx|T}} Should be used where a link is required. It will automatically get the translated word from the list in {{tlx|Translation}}.
#{{tlx|Subpage}} Should be used for links (such as image links) where just the English word and language code are needed.
 
===Examples===
{{tlx|Translation|Language}}
{{tlx|Translation|Language}}
;Produces:
; 显示效果:
{{Translation|Language}}
{{Translation|Language}}


(Which will show the translated word, if it's in the database).
(如果被翻译的单词在数据库中将会显示。)


==How to add entries==
== 如何添加条目 ==


===Getting started===
=== 开始尝试 ===
#Make sure you're on the correct page – a template and not the documentation subpage ([[Template:Translation{{Subpage}}|this will be a link if you're on the wrong page]]).
# 确保您在正确的页面上————模板页面而不是文档子页面([[Template:Translation{{Subpage}}|如果在错误的页面上,这将会是一个链接]])。
#Click the '''Edit''' button at the very top, not the one next to Template documentation. Or click <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} here]</span> to edit current page.
# 点击最顶部的“'''编辑'''”按钮,而不是“模板文档”旁的按钮,或点击<span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} 这里]</span>编辑当前页面。


===Making the edits===
=== 进行编辑 ===
#Once in the edit screen, you'll see a list of entries that look like: <code>| Language = {{Translation|Language}}</code>
# 进入编辑界面后,您将会看到像 <code>| Language = {{Translation|Language}}</code> 的条目列表。
#Check to see if there is a category for the word(s) you want to add, such as <code><nowiki><</nowiki>!-- Other --></code>, or add a new one.
# 检查是否有需要添加的单词,例如 <code>&lt;!-- 其它 --&gt;</code> ,或者添加一个新单词。
#Add your word(s) in the following format (each entry should be on a new line separated by a pipe <code>|</code>): <code>| Language = {{Translation|Language}}</code>
# 按以下格式添加您的单词(每个条目应该是以 <code>|</code> 分隔的单独一行):<code>| Language = {{Translation|Language}}</code>


==See also==
== 参见 ==
*[[Template:T]]
* [[Template:T]]
*[[Template:Subpage]]
* [[Template:Subpage]]

Revision as of 09:54, 26 July 2023

{{Translation}}模板用于维护项目名称和常用词的英语和非英语的等效列表,以及用于其他模板中并自动翻译页面元素。每个语言的子页面都是一个可编辑的数据库,其中包含英语单词和非英语的等效词。

使用数据库有助于在游戏更新时内容发生变化时统一轻松修改相同的翻译单词,因此最好在数据库中添加一个单词并使用适当的模板而不是直接翻译单词。

数据库格式

所有条目以 | 单词 | 英文词 = 翻译词 的形式储存,每一条都有对应的翻译(比如单词的不同大小写)。

可以储存像 <!-- 这是注释 --> 的HTML格式的注释用以帮助分类和查找某些单词。这些单词可能出现在任何地方,但是可以翻译用以帮助其他翻译人员找到合适的词。

使用

当需要应用到一个页面时,需要根据情况使用以下三个模板之一。使用错误的模板可能导致wiki完成额外的工作,甚至可能阻止页面正常显示。

  1. {{Translation}} 应该在不需要链接且只需要翻译单词的情况下使用。此模板将在列表中搜索第一个参数中的单词,然后根据语言代码(对应子页面)显示该单词而不是英语单词。
  2. {{T}} 应该在需要链接的情况下使用,它将自动从 {{Translation}} 列表中获取对应的翻译词。
  3. {{Subpage}} 应该用于只需要英文单词和语言代码的链接(例如图片链接)的情况。

示例

{{Translation|Language}}

显示效果:

Language

(如果被翻译的单词在数据库中将会显示。)

如何添加条目

开始尝试

  1. 确保您在正确的页面上————模板页面而不是文档子页面(如果在错误的页面上,这将会是一个链接)。
  2. 点击最顶部的“编辑”按钮,而不是“模板文档”旁的按钮,或点击这里编辑当前页面。

进行编辑

  1. 进入编辑界面后,您将会看到像 | Language = Language 的条目列表。
  2. 检查是否有需要添加的单词,例如 <!-- 其它 --> ,或者添加一个新单词。
  3. 按以下格式添加您的单词(每个条目应该是以 | 分隔的单独一行):| Language = Language

参见