Template:Case preserving encode/doc
m (iw no) |
m (una revisione importata) |
Versione attuale delle 23:16, 4 nov 2012
{{#ifeq: case preserving encode/doc | doc
|
{{
#ifeq: show | show | {{ {{#switch: {{#if: | | {{#if: | {{#ifeq:| | talk | }} | {{#ifeq:template|discussioni template | talk | template }} }} }}
| main | = ambox | talk = tmbox | user = ombox | wikipedia = ombox | file | image = imbox | mediawiki = ombox | template = ombox | help = ombox | category = cmbox | portal = ombox | book = ombox | other | #default = ombox
}}
| type = notice
| image = 40px
| imageright =
| class =
| style =
| textstyle =
| text = This is a documentation subpage for Template:Case preserving encode/doc.
It contains usage information, categories, interlanguage links and other content that is not part of the original {{ #if: | {{{text2}}} | {{ #if: | {{{text1}}} | {{ #ifeq: Template | Utente | template template page | {{ #if: Template |template page|article}}}}}}}}.
| small =
| smallimage =
| smallimageright =
| smalltext =
| subst =
| date =
| name =
}}
}}{{ #if: | | {{#ifexist:Template:Case preserving encode/doc|[[Category:{{ #switch: Template | Template = Template | User = User | #default = Wikipedia }} documentation pages]]|}} }}
| }} {{#ifeq:|yes
|| |
{{#if:{{#if:| {{{smallimage}}} | }} | {{#if:| {{{smallimage}}} | }} | [[Image:{{#switch:content | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:yes|yes | 30x30px | 40x40px }}|link=|alt=]]}} |
}}
{{#if:| {{{smalltext}}} | This template is used {{#if:|{{{1}}}|in system messages}}. Changes to it can cause immediate changes to the Wikipedia user interface. To avoid large-scale disruption, any changes should first be tested in this template's [[{{#ifeq:Case preserving encode/doc|doc| Template:Case preserving encode/doc | Template:Case preserving encode/doc }}/sandbox|/sandbox]] or [[{{#ifeq:Case preserving encode/doc|doc| Template:Case preserving encode/doc | Template:Case preserving encode/doc }}/testcases|/testcases]] subpage, or in your own user space. The tested changes can then be added in one single edit to this template. Please discuss any changes at {{#if:|[[{{{2}}}]]|the [[{{#ifeq:Case preserving encode/doc|doc| Discussioni template:Case preserving encode/doc | Discussioni template:Case preserving encode/doc }}|talk page]]}} before implementing them. }} |
{{#if: | {{{smallimageright}}} | }} |
| | speedy | delete | content | style | move | protection | notice =
| #default =}}
|| |
{{#if: | | [[Image:{{#switch:content | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:|yes | 30x30px | 40x40px }}|link=|alt=]]}} |
}}
This template is used {{#if:|{{{1}}}|in system messages}}. Changes to it can cause immediate changes to the Wikipedia user interface. To avoid large-scale disruption, any changes should first be tested in this template's [[{{#ifeq:Case preserving encode/doc|doc| Template:Case preserving encode/doc | Template:Case preserving encode/doc }}/sandbox|/sandbox]] or [[{{#ifeq:Case preserving encode/doc|doc| Template:Case preserving encode/doc | Template:Case preserving encode/doc }}/testcases|/testcases]] subpage, or in your own user space. The tested changes can then be added in one single edit to this template. Please discuss any changes at {{#if:|[[{{{2}}}]]|the [[{{#ifeq:Case preserving encode/doc|doc| Discussioni template:Case preserving encode/doc | Discussioni template:Case preserving encode/doc }}|talk page]]}} before implementing them. |
| | speedy | delete | content | style | move | protection | notice =
| #default =}} }}
This is the {{case preserving encode}} meta-template.
This template is used inside the templates {{sec link}}, {{sec link auto}}, and {{sec link image}}. (And it might be used in other templates too.)
This template is used to URL-encode wiki page names for external links to other MediaWiki wikis. Since MediaWiki's own URL-encode functions don't work when making links to other MediaWiki wikis.
This template preserves the case of the first character, and it correctly preserves the namespace name.
[modifica] Usage
-
{{{{#if:|subst:}}Case preserving encode{{#if:São Paulo|
|São Paulo }}{{#if:| | }}{{#if:| | }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} gives: {{#ifeq:São Paulo|são Paulo |s%C3%A3o_Paulo |S%C3%A3o_Paulo }}
-
{{{{#if:|subst:}}Case preserving encode{{#if:são Paulo|
|são Paulo }}{{#if:| | }}{{#if:| | }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} gives: {{#ifeq:são Paulo|são Paulo |s%C3%A3o_Paulo |S%C3%A3o_Paulo }}
[modifica] Technical details
For a detailed explanation of the methods used in this template see the talkpage of {{sec link}}.