Template:Parse source

From OpenMedia
Revision as of 04:21, 8 February 2012 by Jarekt (Talk) (Imported 2013-03-10 from http://commons.wikimedia.org/wiki/[SAME-NAME-AS-HERE] to enable licence display of reused media. See there for complete license and author attribution!)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


[edit]

Documentation

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