Difference between revisions of "Template:Term"

From Maths
Jump to: navigation, search
(Saving work)
 
(Now plurals should work)
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#ifexist:Template data:Term/List/{{{1|nzdoz (Number Theory)}}}<!--
+
{{#ifexist:Template data:Term/List/{{lcfirst:{{Term/ListingNameTemplate|1={{{1|}}}|t={{{t|}}}|s={{{s|}}}}}}}<!--
 
      
 
      
 
     Macro listing exists
 
     Macro listing exists
Line 7: Line 7:
  
 
         Here we substitute the macro  
 
         Here we substitute the macro  
         -->{{:Template data:Term/List/{{{1|nzdoz (Number Theory)}}}}}<!--
+
         -->{{:Template data:Term/List/{{lcfirst:{{Term/ListingNameTemplate|1={{{1|}}}|t={{{t|}}}|s={{{s|}}}}}}}|cap={{Term/DoCapsTemplate|{{{1|}}}|y|}}|plural={{Term/DoPluralFormTemplate|{{{2|}}}|y}}|link={{Term/DoLinkFormTemplate|{{{2|}}}|y||}}}}<!--
 
          
 
          
 
         -->{{Term/Display/PostSub}}<!--
 
         -->{{Term/Display/PostSub}}<!--
 
      
 
      
 
     Macro listing /DOESN'T/ exist
 
     Macro listing /DOESN'T/ exist
     -->|{{Warning|1=No such [[Template data:Macro/List|macro definition]] found!}}, request: {{#if:{{{1|}}}|"{{{1|}}}"|''(Empty)''}}<!--
+
     -->|{{Warning|1=No such [[Template data:Term/List|terminology definition]] found!}}, request: {{#if:{{lcfirst:{{Term/ListingNameTemplate|1={{{1|}}}|t={{{t|}}}|s={{{s|}}}}}}}|"{{lcfirst:{{Term/ListingNameTemplate|1={{{1|}}}|t={{{t|}}}|s={{{s|}}}}}}}"|''(Empty)''}}<!--
  
 
-->}}<noinclude>
 
-->}}<noinclude>
 +
==Changelog==
 +
* Prototype version, the templates and parameters all exist for flags but are not yet implemented. [[User:Alec|Alec]] ([[User talk:Alec|talk]]) 17:44, 3 February 2018 (UTC)
 +
* Added {{C|<nowiki>{{lcfirst:}}</nowiki>}} to the page names because first-letter-insensitivity to page names does not apply to sub-pages! [[User:Alec|Alec]] ([[User talk:Alec|talk]]) 18:50, 3 February 2018 (UTC)
 
==Purpose==
 
==Purpose==
 
: ''see: [[Template data:Term]]''
 
: ''see: [[Template data:Term]]''
Line 20: Line 23:
 
Handle flags, as the 2nd argument, eg {{C|ls}} or {{M|sl}}, possibly with ''some'' letters capitalised, represents  
 
Handle flags, as the 2nd argument, eg {{C|ls}} or {{M|sl}}, possibly with ''some'' letters capitalised, represents  
 
==Test==
 
==Test==
 +
* [[/TestPage]]
 +
{{/TestPage}}
 +
 +
==Tests==
 
* [[/ListingNameTemplate]]
 
* [[/ListingNameTemplate]]
 
** {{C|<nowiki>{{/ListingNameTemplate|nzdoz|t=number}}</nowiki>}} -> {{/ListingNameTemplate|nzdoz|t=number}}
 
** {{C|<nowiki>{{/ListingNameTemplate|nzdoz|t=number}}</nowiki>}} -> {{/ListingNameTemplate|nzdoz|t=number}}
 
** {{C|<nowiki>{{/ListingNameTemplate|nzdoz|s=Number Theory}}</nowiki>}} -> {{/ListingNameTemplate|nzdoz|s=Number Theory}}
 
** {{C|<nowiki>{{/ListingNameTemplate|nzdoz|s=Number Theory}}</nowiki>}} -> {{/ListingNameTemplate|nzdoz|s=Number Theory}}
 +
** {{C|<nowiki>{{/ListingNameTemplate|nzdoz|t=number|s=}}</nowiki>}} -> {{/ListingNameTemplate|nzdoz|t=number|s=}}
 +
** {{C|<nowiki>{{/ListingNameTemplate|nzdoz|t=|s=Number Theory}}</nowiki>}} -> {{/ListingNameTemplate|nzdoz|s=Number Theory|t=}}
 +
** {{C|<nowiki>{{/ListingNameTemplate|nzdoz|t=|s=}}</nowiki>}} -> {{/ListingNameTemplate|nzdoz|s=|t=}}
 
* Flag stuff
 
* Flag stuff
 
*# Link flag
 
*# Link flag
Line 30: Line 40:
 
*#* {{C|<nowiki>{{/DoLinkFormTemplate||a|b|c}}</nowiki>}} -> {{/DoLinkFormTemplate||a|b|c}}
 
*#* {{C|<nowiki>{{/DoLinkFormTemplate||a|b|c}}</nowiki>}} -> {{/DoLinkFormTemplate||a|b|c}}
 
*#* {{C|<nowiki>{{/DoLinkFormTemplate|s|a|b|c}}</nowiki>}} -> {{/DoLinkFormTemplate|s|a|b|c}}
 
*#* {{C|<nowiki>{{/DoLinkFormTemplate|s|a|b|c}}</nowiki>}} -> {{/DoLinkFormTemplate|s|a|b|c}}
 +
*# Plural stuff
 +
*#* {{C|<nowiki>{{/DoPluralFormTemplate|sl|a|b|c}}</nowiki>}} -> {{/DoPluralFormTemplate|sl|a|b|c}}
 +
*#* {{C|<nowiki>{{/DoPluralFormTemplate|ls|a|b|c}}</nowiki>}} -> {{/DoPluralFormTemplate|ls|a|b|c}}
 +
*#* {{C|<nowiki>{{/DoPluralFormTemplate|l|a|b|c}}</nowiki>}} -> {{/DoPluralFormTemplate|l|a|b|c}}
 +
*#* {{C|<nowiki>{{/DoPluralFormTemplate|s|a|b|c}}</nowiki>}} -> {{/DoPluralFormTemplate|s|a|b|c}}
 +
*#* {{C|<nowiki>{{/DoPluralFormTemplate||a|b|c}}</nowiki>}} -> {{/DoPluralFormTemplate||a|b|c}}
 +
* Capitalisation
 +
** {{C|<nowiki>{{/DoCapsTemplate|xyz|a|b}}</nowiki>}} -> {{/DoCapsTemplate|xyz|a|b}}
 +
** {{C|<nowiki>{{/DoCapsTemplate|Xyz|a|b}}</nowiki>}} -> {{/DoCapsTemplate|Xyz|a|b}}
 
</noinclude>
 
</noinclude>

Latest revision as of 19:27, 3 February 2018

Warning:No such terminology definition found!, request: (Empty)

Changelog

  • Prototype version, the templates and parameters all exist for flags but are not yet implemented. Alec (talk) 17:44, 3 February 2018 (UTC)
  • Added {{lcfirst:}} to the page names because first-letter-insensitivity to page names does not apply to sub-pages! Alec (talk) 18:50, 3 February 2018 (UTC)

Purpose

see: Template data:Term

To do

Handle flags, as the 2nd argument, eg ls or [ilmath]sl[/ilmath], possibly with some letters capitalised, represents

Test

Tests

  • /ListingNameTemplate
    • {{/ListingNameTemplate|nzdoz|t=number}} -> nzdoz (Number Theory)
    • {{/ListingNameTemplate|nzdoz|s=Number Theory}} -> nzdoz (Number Theory)
    • {{/ListingNameTemplate|nzdoz|t=number|s=}} -> nzdoz (Number Theory)
    • {{/ListingNameTemplate|nzdoz|t=|s=Number Theory}} -> nzdoz (Number Theory)
    • {{/ListingNameTemplate|nzdoz|t=|s=}} -> nzdoz
  • Flag stuff
    1. Link flag
      • {{/DoLinkFormTemplate|sl|a|b|c}} -> a
      • {{/DoLinkFormTemplate|LS|a|b|c}} -> a
      • {{/DoLinkFormTemplate|l|a|b|c}} -> a
      • {{/DoLinkFormTemplate||a|b|c}} -> c
      • {{/DoLinkFormTemplate|s|a|b|c}} -> b
    2. Plural stuff
      • {{/DoPluralFormTemplate|sl|a|b|c}} -> a
      • {{/DoPluralFormTemplate|ls|a|b|c}} -> a
      • {{/DoPluralFormTemplate|l|a|b|c}} -> b
      • {{/DoPluralFormTemplate|s|a|b|c}} -> a
      • {{/DoPluralFormTemplate||a|b|c}} -> c
  • Capitalisation
    • {{/DoCapsTemplate|xyz|a|b}} -> b
    • {{/DoCapsTemplate|Xyz|a|b}} -> a