Difference between revisions of "Template:MaybePlural"

From Wikispooks
Jump to navigation Jump to search
m (Text replacement - "String manipulation Templates" to "String manipulation templates")
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<noinclude>'''This template is to remove the (s) '''[[category:String Manipulation Templates‎]][[category:Convenience Templates‎]]<br/>
+
<noinclude>'''This template is to avoid the ugly looking "(s)" on the end of labels.'''[[category:String manipulation templates‎]][[category:Convenience Templates‎]]<br/>
It is currently equal to the following code, and takes just one argument, the item which may or may not be plural.<br/>
+
One day it might tackle irregular plurals, but for now it is currently equal to the following code, which takes just one argument, the item which may or may not be plural.<br/>
 
<font face=courier><nowiki>{{#if: {{Contains|,|{{{1|}}}}}|s}}</nowiki></font></noinclude><includeonly>{{#if: {{Contains|,|{{{1|}}}}}|s}}</includeonly>
 
<font face=courier><nowiki>{{#if: {{Contains|,|{{{1|}}}}}|s}}</nowiki></font></noinclude><includeonly>{{#if: {{Contains|,|{{{1|}}}}}|s}}</includeonly>

Latest revision as of 01:29, 4 October 2016

This template is to avoid the ugly looking "(s)" on the end of labels.
One day it might tackle irregular plurals, but for now it is currently equal to the following code, which takes just one argument, the item which may or may not be plural.
{{#if: {{Contains|,|{{{1|}}}}}|s}}