Jump to content
Wikimedia Commons

Template:Parse source

From Wikimedia Commons, the free media repository
Note: This template 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 template causes all pages that use the template to be re-rendered. If the template 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.
  • This page is template-protected from editing to prevent vandalism. Only template editors and administrators can edit it. Get their attention by placing {{Edit protected}} at the talk page.
Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Parse source/doc.


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

AltStyle によって変換されたページ (->オリジナル) /