テンプレート:Igen/top

< テンプレート:Igen
2020年6月18日 (木) 07:08時点におけるbsd>Ruthvenによる版 (it)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)


Internationalization page, used by e.g. the SVG created with ... templates and others

This template is used by many templates like e.g. Created with Other tool/de with two parameters:
  1. the short code (mostly one letter, or a few letters) like for Igen/sub,
  2. the default value if no code fits. To avoid the wrong use of "en" the |#default= option is necessary.
Igen/sub often spreads short codes to different subcategories while Igen/top uses fewer names.
The short code defined with s= is passed from Image generation and other templates;
if another code should be used it can be defined with w=; to just suppress the usage of s= use w= without a value.
テンプレート:0
For languages with different genders (like de, fr, it, pl, pt...) the names must be defined with the demonstratives.

テンプレート:Use sandbox See also the talk page for a table of all codes.

ファイル:Dialog-warning-orange.svg
Note: This テンプレート is used on a lot of pages. In order not to put too much load on the servers, edits should be kept to a bare minimum. Please discuss proposed changes on the talk page first.
  • Editing a テンプレート causes all pages that use the テンプレート to be re-rendered. If the テンプレート is used often, this can put a lot of load on the servers since it fills up the job queue.
  • Keep in mind that templates that are used on file description pages also show up on other wikis.

The system can only display topics (f=flags, i=icons, l=logos, m=maps, ...) when a translation is provided within this template for that topic in that language.
When the translation fails, the output depends on

when the code exists in that template, but no translation for that language, it depends on the value of parameter 2:
  • (none) an error code like "_?_" is returned (that should never happen!)
  • "~" the (always existing) English translation is returned
  • otherwise the value of parameter 2 (the standard text) is returned.
when the code does not exist in that template, parameter 1 is checked:
  • when it contains more than 3 characters it is displayed; otherwise it depends on the value of parameter 2:
    • (none) the untranslated value of parameter 1 is returned,
    • "~" an error code like "~?~" is returned,
    • otherwise the value of parameter 2 (the standard text) is returned,
and categorization to a maintenance category occurs.

The skeleton is prepared, and when users want to see things in their language they ought to maintain and to expand that template.
If a translation is missing in the current display language, only the standard text is shown, as it had been before.