Difference between revisions of "Moegirlpedia:Template guidelines"

From Moegirlpedia
Jump to: navigation, search
(Created page with "{{Translation in progress|~~~~~|progress=63%}} == Commonly-used templates == === Information templates === * Character information template: {{color|red|{{tl|Characterinfo}}}}...")
 
(Translated more sections, corrected phrases)
 
Line 1: Line 1:
{{Translation in progress|16:51, 3 July 2023 (UTC)|progress=63%}}
+
{{Translation in progress|16:51, 3 July 2023 (UTC)|progress=78%}}
 
== Commonly-used templates ==
 
== Commonly-used templates ==
 
=== Information templates ===
 
=== Information templates ===
* Character information template: {{color|red|{{tl|Characterinfo}}}}
+
* '''Character information template:''' {{color|red|{{tl|Characterinfo}}}}
For fictional characters, the parameters "'''From Where'''" and "'''Act Range'''" refer to the birthplace of the character and their scope of activities, respectively, rather than the body of work they originated in/the medium they appear in.
+
:For fictional characters, the parameters "'''From Where'''" and "'''Act Range'''" refer to the birthplace of the character and their scope of activities, respectively, rather than the body of work they originated in/the medium they appear in.
  
 
{{Hide|Title=Here are a few examples:|Text=
 
{{Hide|Title=Here are a few examples:|Text=
 
* [[Green Dam Girl]]'s "birthplace" and "scope of activities" can be written as "China" or "Mainland China", instead of "Internet" and "Baidu Tieba".
 
* [[Green Dam Girl]]'s "birthplace" and "scope of activities" can be written as "China" or "Mainland China", instead of "Internet" and "Baidu Tieba".
* [[Marisa Kirisame]]'s "birthplace" and "scope of activities" can be written as "[[Gensokyo]]", instead of "Touhou Games or "PCs".
+
* [[Marisa Kirisame]]'s "birthplace" and "scope of activities" can be written as "[[Gensokyo]]", instead of "Touhou Games" or "PC".
 
}}
 
}}
  
 
=== Common page-top templates ===
 
=== Common page-top templates ===
 
* Edit-welcoming template: {{color|red|{{tl|Welcome participation}}}}
 
* Edit-welcoming template: {{color|red|{{tl|Welcome participation}}}}
;For pages whose content isn't yet perfect, and there is a clear need for editors to improve it.
+
:For pages whose content isn't yet complete or perfected, and there is a clear need for editors to improve it.
;Note: Do not abuse; please try to give reasons and ways to improve the page.
+
:Note: Do not abuse. When other editors think the content can be improved, they can edit it themselves; please try to give reasons and ways to improve the page.
:For certain popular works, this template can serve as the basis for creating your own page-top template, for references: [[:Category:Serial works page-top templates]].
+
:This template can serve as the basis for creating your own page-top templates for certain popular works, for references: [[:Category:Serial works page-top templates]].
 
* '''Urgent improvement template:''' {{color|red|{{tl|Urgent improvement}}}}
 
* '''Urgent improvement template:''' {{color|red|{{tl|Urgent improvement}}}}
:For articles of low quality, confusing formatting, which have an urgent need to be edited and reformatted, even left black and rewritten.
+
:For articles of low quality, confusing formatting, which have an urgent need to be edited and reformatted, even blanked and rewritten.
  
 
=== Other notice templates ===
 
=== Other notice templates ===
Line 23: Line 23:
 
:It is recommended to use <nowiki>{{Hide}}</nowiki> to hide the spoiler text, example:
 
:It is recommended to use <nowiki>{{Hide}}</nowiki> to hide the spoiler text, example:
 
{{Hide|Title={{SpoilerBar}}|Text=It isn't necessary to use strikethroughs at this point.}}
 
{{Hide|Title={{SpoilerBar}}|Text=It isn't necessary to use strikethroughs at this point.}}
 +
 +
=== Common functional templates ===
 +
* '''Template for translation requests:''' {{tl|NeedsTranslating}}
 +
:For text in Japanese or another foreign language that needs to be translated into English. This template can be input if the editor doesn't know how to translate or doesn't have the energy to do so at the moment, so that it can be translated by someone else.
  
 
=== Navigation templates ===
 
=== Navigation templates ===
 
* '''Navbox template:''' {{color|red|<nowiki>{{Navbox template name}}</nowiki>}}
 
* '''Navbox template:''' {{color|red|<nowiki>{{Navbox template name}}</nowiki>}}
Navigation templates for the same type of articles, also includes a list of links for such articles.
+
Navigation templates for articles of the same type, also includes a list of links for such articles.
  
 
Example: {{tl|Touhou Project}}, {{tl|Moe points}}, {{tl|Key}}, etc.
 
Example: {{tl|Touhou Project}}, {{tl|Moe points}}, {{tl|Key}}, etc.
 
  
 
== Template usage ==
 
== Template usage ==
 
=== Sorted by page-top templates ===
 
=== Sorted by page-top templates ===
* {{tl|Under construction}}/{{tl|Edit war}}
+
Note: The top template sorting method described in this paragraph is only available for pages in the '''Main namespace'''.
 +
* {{tl|Work in progress}}/{{tl|Edit war}}
 
* [[:Category:Disambiguation templates|Disambiguation templates]] (except for ({{tl|Disambiguation}})
 
* [[:Category:Disambiguation templates|Disambiguation templates]] (except for ({{tl|Disambiguation}})
* Topic navigation templates (e.g. {{tl|Touhou Project/TopicNavbar}})
+
* Topic navigation templates (e.g. {{tl|Touhou Project navbar}})
* {{tl|Disambiguation}}
+
* {{tl|Smallnav}}
 
* Edit/maintenance related templates
 
* Edit/maintenance related templates
 
** Special maintenance templates
 
** Special maintenance templates
** {{tl|Welcome participation}} (including topical templates and customized templates that play a similar role, templates in the category [[:Category:Serial works page-top templates]]), {{tl|Urgent improvement}}
+
** {{tl|Welcome participation}} (including topic templates and customized templates that play a similar role, templates in the category [[:Category:Serial works page-top templates]]), {{tl|Urgent improvement}}
***Welcome participaiton/Urgent improvement/Topic top templates are not to be reused.
+
***Welcome participation/Urgent improvement/Topic top templates are not to be reused.
 
* Other templates
 
* Other templates
**
 
 
** Templates for marking work/real person status (Example; {{tl|Dead}}, {{tl|End}})
 
** Templates for marking work/real person status (Example; {{tl|Dead}}, {{tl|End}})
** {{tl|Outdated}}, {{tl|Unfinished}}
+
** {{tl|Outdated}}
 
*Quote templates similar to {{tl|Cquote}}, and other templates that play a similar quoting role.
 
*Quote templates similar to {{tl|Cquote}}, and other templates that play a similar quoting role.
 +
 
== Template creation ==
 
== Template creation ==
 +
Moegirlpedia has a large number of templates, the existing templates can fit most of the needs. When an existing template is not suitable, you can create a new template.
 +
 +
It is not recommended to copy a template directly from another wiki, because other templates, JS, CSS, or specific plugins that the template depends on, may make it impossible to use them directly.
 +
 +
=== Syntax ===
 +
See [[mw:Help:Templates|MediaWiki's official description]].
 +
 
=== Style guidelines ===
 
=== Style guidelines ===
Template width should use percentages (80%, etc.). If a fixed width is used, the template should less than 260px wide, the image inside the template should be less than 250px (the mobile version shows an error if it is larger than this size). Icons should be smaller than 100px.
+
Template width should use percentages (80%, etc.). If a fixed width is used, the template should be less than 260px wide, the image inside the template should be less than 250px (the mobile version shows an error if it is larger than this size). Icons should be smaller than 100px.
  
 
In general, the horizontal bar type uses a percentage to determine the width. Information templates on top of pages use pixels (px) to determine the width.
 
In general, the horizontal bar type uses a percentage to determine the width. Information templates on top of pages use pixels (px) to determine the width.
  
 
=== Documentation ===
 
=== Documentation ===
To make the template easier to use, documentation is often required when writing functional templates. There are two ways to embed documentation, one is directly through inlining with the template <code><nowiki><noinclude>Template documentation</noinclude></nowiki></code>, the other is adding <code><nowiki>{{Documentation}}</nowiki></code>.
+
To make the template easier to use, documentation is often required when writing functional templates. There are two ways to embed documentation, one is through inlining <code><nowiki><noinclude>Template documentation</noinclude></nowiki></code>to the template directly, the other is adding <code><nowiki>{{Documentation}}</nowiki></code>.
  
 
{{Moegirlpedia policies}}
 
{{Moegirlpedia policies}}
  
 
[[Category:Moegirlpedia policies]]
 
[[Category:Moegirlpedia policies]]

Latest revision as of 21:58, 3 July 2023

Translation in progress
This page is currently being translated; it may be incomplete, inaccurate or obfuscating.
Moegirlpedia hopes that you can help with translating, proofreading, or copy editing this page.
Progress:
78%
This template was placed on 16:51, 3 July 2023 (UTC). The last edit was on 21:58, 03 July 2023 (CST).

Commonly-used templates

Information templates

For fictional characters, the parameters "From Where" and "Act Range" refer to the birthplace of the character and their scope of activities, respectively, rather than the body of work they originated in/the medium they appear in.
Here are a few examples:
  • Green Dam Girl's "birthplace" and "scope of activities" can be written as "China" or "Mainland China", instead of "Internet" and "Baidu Tieba".
  • Marisa Kirisame's "birthplace" and "scope of activities" can be written as "Gensokyo", instead of "Touhou Games" or "PC".


Common page-top templates

For pages whose content isn't yet complete or perfected, and there is a clear need for editors to improve it.
Note: Do not abuse. When other editors think the content can be improved, they can edit it themselves; please try to give reasons and ways to improve the page.
This template can serve as the basis for creating your own page-top templates for certain popular works, for references: Category:Serial works page-top templates.
For articles of low quality, confusing formatting, which have an urgent need to be edited and reformatted, even blanked and rewritten.

Other notice templates

Used for articles that contain unmarked spoilers. On a case-by-case basis, input this template below the title of sections involving spoilers (i.e. above the spoiler text).
It is recommended to use {{Hide}} to hide the spoiler text, example:
Nuvola apps important blue.svg
This section may contain major spoilers!
Consider skipping these contents if you are not yet familiar with all the latest media releases.

It isn't necessary to use strikethroughs at this point.


Common functional templates

For text in Japanese or another foreign language that needs to be translated into English. This template can be input if the editor doesn't know how to translate or doesn't have the energy to do so at the moment, so that it can be translated by someone else.

Navigation templates

  • Navbox template: {{Navbox template name}}

Navigation templates for articles of the same type, also includes a list of links for such articles.

Example: {{Touhou Project}}, {{Moe points}}, {{Key}}, etc.

Template usage

Sorted by page-top templates

Note: The top template sorting method described in this paragraph is only available for pages in the Main namespace.

Template creation

Moegirlpedia has a large number of templates, the existing templates can fit most of the needs. When an existing template is not suitable, you can create a new template.

It is not recommended to copy a template directly from another wiki, because other templates, JS, CSS, or specific plugins that the template depends on, may make it impossible to use them directly.

Syntax

See MediaWiki's official description.

Style guidelines

Template width should use percentages (80%, etc.). If a fixed width is used, the template should be less than 260px wide, the image inside the template should be less than 250px (the mobile version shows an error if it is larger than this size). Icons should be smaller than 100px.

In general, the horizontal bar type uses a percentage to determine the width. Information templates on top of pages use pixels (px) to determine the width.

Documentation

To make the template easier to use, documentation is often required when writing functional templates. There are two ways to embed documentation, one is through inlining <noinclude>Template documentation</noinclude>to the template directly, the other is adding {{Documentation}}.