Commons:Localization/zh

“COM:LOC”重定向至此。對於美国国会图书馆相关信息,請參閱Commons:Library of Congress

Shortcuts: COM:I18N COM:INT

维基共享资源是一项国际化并因而多语言的计划。虽然本站默认语言为英语,但无论使用者阅读何种本地语言,该项目都旨在为其提供可用性与实用性。

国际化是指设计软件应用程序的过程,使其无需工程级改动即可适配不同语言和地区。本地化则是通过添加特定区域组件和翻译文本来使国际化软件适应特定区域或语言的过程。针对Commons的国际化与本地化工作包含以下几个组成部分:

  1. 软件
    1. MediaWiki软件(及其用于共享资源的扩展)
    2. MediaWiki界面的可定制部分
    3. 用户脚本(特别是小工具脚本,可通过您的首选项安装)
  2. 内容
    1. 项目页面
    2. 内容页面(文件、分类、图库)
    3. 内容页面与项目页面所使用的模板

软件

MediaWiki默认信息

MediaWiki是共享资源运行的软件。MediaWiki的界面翻译(翻译在MediaWiki安装时提供)由Translatewiki接管和进行;请点击左侧链接进行贡献。

要检查特定MediaWiki消息在translatewiki上的本地化内容,请访问translatewiki:Special:Translations/MediaWiki:并输入该MediaWiki消息的名称。若需查找特定MediaWiki消息的名称,请访问显示该消息的共享资源页面,并在URL中添加?uselang=qqx参数。重新加载页面后,所有消息文本将被替换为生成该文本的消息名称。(示例:使用Commons:Localization

MediaWiki消息可在共享资源站内(例如模板中)通过{{int:消息名称}}调用,例如通过{{int:edit-conflict}}获取MediaWiki:edit-conflict。本地化的MediaWiki消息存储在以对应语言代码命名的子页面中,例如MediaWiki:edit-conflict/deMediaWiki:edit-conflict/fr。若调用不存在的消息(包括对实际消息的错误拼写),系统将显示尖括号包裹的标识符(<消息名称>),例如常见的将"{{int:license}}"误写为"{{int:licensing}}"的情况(此时会显示带尖括号的错误结果:⧼licensing⧽)。

有关模板中可能用到的部分MediaWiki系统消息,请参阅Commons:Localization/useful MediaWiki messages。另请参见mw:Localisation其系统消息

Commons MediaWiki: namespace custom messages

MediaWiki安装时提供的默认消息文本可在本地被覆盖。[1]此外,为本地化目的可在MediaWiki:命名空间中创建全新消息。这两种情况下,此类“自定义消息”仅在Commons的MediaWiki安装中可用。

用户脚本

内容

About localization text in images see Translation text in images. For localization read below.

项目页面

项目页面(位于Commons:Help:命名空间中)的翻译至关重要。初访维基共享的用户可能对该平台及其宗旨了解有限,而项目页面正是阐明维基共享内容范围、适宜内容标准、上传流程及操作规范的核心说明文档。

重要页面翻译:

内容页面

内容页包括分类、图库和文件描述页。这些页面的本地化包含两个要素:

  1. 标准文本元素。通常应通过相应的内容模板来引入。例如,分类页可包含{{See also}}模板,该模板能以多种语言提供“参见”文本。少数情况下,可直接调用MediaWiki软件内置的标准文本元素,使用{{int:mediawiki-message-name}}结构即可实现。
  2. 非标准文本元素。这些内容直接包含在页面中,但应当用翻译模板进行包装,以便在添加翻译时,软件能够识别它们。通常采用的方式是简单的语言模板,或者使用{{LangSwitch}}{{Mld}}等模板。

内容模板

模板是出现在数十、数千甚至数百万页面上的文本字符串。通过翻译最广泛使用的模板,您可以极大地方便那些不懂英语或更习惯使用母语的用户,提升 Commons 页面的实用价值。例如Template:Information模板就被超过两百万个文件描述页面所使用。虽然只是几段简短的文字,却能显著提升描述页面信息的可读性。(并非所有模板都需要翻译,有些语言中立的模板无需处理)

若模板已实现国际化,新增语言本地化的方法应清晰明了(模板文档中应有说明,或在编辑模式下查看模板时即可明确操作方式)。若模板尚未国际化,请参阅下文相关章节。

See most used translatable templates and modules.

內容國際化的方法

The major methods for internationalization are

  1. Autotranslate, using the {{Autotranslate}} template, which uses subpages in the standard /xx language code format to store localizations
  2. LangSwitch, using the {{LangSwitch}} template, which stores localizations within the page or template being translated.
  3. Simple list, using a header linking to different language versions of a page.
  1. Language templates, using the individual templates listed at Commons:Language templates
  2. Multilingual tags are templates devoted to translating a particular message, without providing any formatting, for re-use in multiple templates.
  3. MediaWiki messages– in a few cases, standard text elements that are part of the MediaWiki software can be accessed directly, using the construction {{int:mediawiki-message-name}}

Many of them are discussed in more details on Commons:Template i18n page.

Content templates with complex layouts tend to use {{Autotranslate}}, whilst simpler ones use {{LangSwitch}}. Content pages largely use LangSwitch or language templates, with a handful of MediaWiki messages. The "simple list" method is generally used only by project pages. Multilingual tags and most MediaWiki messages are normally used only by templates. For templates, {{TemplateBox}} facilitates creating a documentation page, including providing a standard explanation of how to localise the template for a new language version, given the specified internationalization method.

An additional method is demonstrated by {{Talkbox}}, which supports the construction of talkpage templates (e.g., {{Permprot}}). Here, the translations are stored in subpages of the calling template, and {{Talkbox}} switches the content as needed. The approach is similar to autotranslate, but the setup of the subpages is slightly different, and there is no /layout subpage.

自動翻譯

其他

  • Simple list: some templates/categories are localised using the simple list approach demonstrated by {{Lang-CatHelp}}, allowing each page to have its own localised name. The list template should be referenced using {{Header}}, for example {{header|Lang-CatHelp}}.
  • Commons:Language templates are used for galleries, categories description, file description pages. Each is simply the ISO code of the language. Example: {{en|English description}}.

备注

  1. “默认消息”包括作为MediaWiki一部分提供的消息,以及由mw:Extension:WikimediaMessages提供的额外wm-消息(例如MediaWiki:wm-license-information-description)。

參閱

帮助

Category:Commons help/zh Category:Commons internationalization/Translations#*
Category:Commons help/zh Category:Commons internationalization/Translations