Difference between revisions of "Template:MW src"

From RobotX
Jump to navigation Jump to search
m (Text replacement - "</translate>" to "")
m (Text replacement - "<!--T:(.*)-->" to "")
Line 3: Line 3:
 
</noinclude>{{#switch:
 
</noinclude>{{#switch:
 
| =
 
| =
<!--T:1--> [<tvar|1>https://doc.wikimedia.org/mediawiki-core/master/php/{{{1}}}_8{{{2}}}_source.html</> <tvar|file>{{#if:{{{1|}}}|{{{1}}}.{{{2}}}|{{BASEPAGENAME}}}}</> source code] on MediaWiki master.
+
[<tvar|1>https://doc.wikimedia.org/mediawiki-core/master/php/{{{1}}}_8{{{2}}}_source.html</> <tvar|file>{{#if:{{{1|}}}|{{{1}}}.{{{2}}}|{{BASEPAGENAME}}}}</> source code] on MediaWiki master.
 
| #default =
 
| #default =
 
   {{#invoke:Template translation|renderTranslatedTemplate|template=Template:MW src|noshift=1}}
 
   {{#invoke:Template translation|renderTranslatedTemplate|template=Template:MW src|noshift=1}}
Line 10: Line 10:
  
  
== Usage == <!--T:2-->
+
== Usage ==  
 +
 
  
<!--T:3-->
 
 
This template generates a link to the source code of the file in MediaWiki master in the generated PHP [[Doxygen]] documentation.
 
This template generates a link to the source code of the file in MediaWiki master in the generated PHP [[Doxygen]] documentation.
  
{{Note|1=<!--T:4--> Doxygen's treatment of source files tends to be... odd. <!--T:5--> It strips all comments that look like Doxygen tags and structure commands, assuming you'll follow its link "Go to the documentation of this file." <!--T:6--> Instead of this template you can use <tvar|file>{{tl|git file}}</>.}}
+
{{Note|1= Doxygen's treatment of source files tends to be... odd. It strips all comments that look like Doxygen tags and structure commands, assuming you'll follow its link "Go to the documentation of this file." Instead of this template you can use <tvar|file>{{tl|git file}}</>.}}
  
  
== Parameters == <!--T:7-->
+
== Parameters ==  
  
  
Line 24: Line 24:
  
  
<!--T:8-->
+
 
 
where:
 
where:
  
  
* ''name'' - <!--T:9--> file name.
+
* ''name'' - file name.
* ''ext'' - <!--T:10--> file extension, e.g. <code>.php</code>, <code>.inc</code>, etc.
+
* ''ext'' - file extension, e.g. <code>.php</code>, <code>.inc</code>, etc.
  
  
== Examples == <!--T:11-->
+
== Examples ==  
  
 
* <nowiki>{{MW src|Maintenance|php}}</nowiki>
 
* <nowiki>{{MW src|Maintenance|php}}</nowiki>

Revision as of 14:35, 21 December 2019


[<tvar

Template documentation

Usage

This template generates a link to the source code of the file in MediaWiki master in the generated PHP Doxygen documentation.

file>{{git file}}</>.


Parameters

{{MW src|name|ext}}


where:


  • name - file name.
  • ext - file extension, e.g. .php, .inc, etc.


Examples

  • {{MW src|Maintenance|php}}

[<tvar