Template:Parse source: Difference between revisions
More actions
m Protected "Template:Parse source": Widely used template: I plan on using this template in Template:Information ([edit=sysop] (indefinite) [move=sysop] (indefinite)) |
+2 en |
||
| Line 10: | Line 10: | ||
|<!-- MediaWiki:UploadFormOwnWorkLabel/de --> Eigenes werk (own work) | |<!-- MediaWiki:UploadFormOwnWorkLabel/de --> Eigenes werk (own work) | ||
|<!-- MediaWiki:UploadFormOwnWorkLabel/el --> Έργο αυτού που το ανεβάζει (own work) | |<!-- MediaWiki:UploadFormOwnWorkLabel/el --> Έργο αυτού που το ανεβάζει (own work) | ||
|<!-- MediaWiki:UploadFormOwnWorkLabel --> Own work by uploader | |||
|<!-- MediaWiki:UploadFormOwnWorkLabel/eo --> Propra verko de la alŝutanto (own work by uploader) | |<!-- MediaWiki:UploadFormOwnWorkLabel/eo --> Propra verko de la alŝutanto (own work by uploader) | ||
|<!-- MediaWiki:UploadFormOwnWorkLabel/es --> Trabajo propio (own work) | |<!-- MediaWiki:UploadFormOwnWorkLabel/es --> Trabajo propio (own work) | ||
| Line 56: | Line 57: | ||
|<!-- el -->Έργο αυτού που το ανεβάζει | |<!-- el -->Έργο αυτού που το ανεβάζει | ||
|<!-- en -->Own work | |<!-- en -->Own work | ||
|<!-- en -->Self-made | |||
|<!-- eo -->Propra verko | |<!-- eo -->Propra verko | ||
|<!-- es -->Trabajo propio | |<!-- es -->Trabajo propio | ||
Revision as of 17:37, 6 February 2009
Usage
This template should only be used in {{Information}} to parse the source field.
The template tries to match the message based on MediaWiki:UploadFormOwnWorkLabel or {{Own}}. When a match is made, the message is returned in the user's interface language.
To add a match based on MediaWiki:UploadFormOwnWorkLabel:
|<!-- MediaWiki:UploadFormOwnWorkLabel/<lang> --> {{subst:ucfirst:{{subst:lc:{{subst:MediaWiki:UploadFormOwnWorkLabel/<lang>}}}}}}
You might want to keep older revisions around or add them.
To add a match based on {{Own}} add:
|<!-- <lang> -->{{subst:ucfirst:{{subst:lc:Own work}}}}
//fhdjuf.hedhefd//!
You have to use the lc and ucfirst functions because the switch statement first converts all characters to lowercase and than the first character to uppercase again (to have case insensitive matching).
The use of {{Own}} in the information template won't cause a template loop ({{Own}} won't match and will just return).
See also
- {{ISOdate}} - Template used to parse the date in {{Information}}