Difference between revisions of "Template:Decade nationality television seasons category"

From blackwiki
Jump to navigation Jump to search
imported>BrownHairedGirl
(tweaks)
imported>BrownHairedGirl
(err msgs)
 
Line 6: Line 6:
 
             -->{{#ifeq: {{#invoke:String|match|s={{PAGENAME}}|pattern=^%d%d%d0s %a.+ television seasons$|start=1|match=1|plain=false|nomatch=%%nomatch%%}}|%%nomatch%%<!--
 
             -->{{#ifeq: {{#invoke:String|match|s={{PAGENAME}}|pattern=^%d%d%d0s %a.+ television seasons$|start=1|match=1|plain=false|nomatch=%%nomatch%%}}|%%nomatch%%<!--
 
                 -->|<!-- # Doesn't match
 
                 -->|<!-- # Doesn't match
                       -->{{Error|[[Template:Decade nationality television seasons]] is for use only on category pages whose title is of the form "YYY0s Fooish television seasons", where YYYY is a 4-digit decade and "Fooish" is a nationality (e.g. "Russian" or "Egyptian")}}<!--
+
                       -->{{Error|Invalid category name.<br />[[Template:Decade nationality television seasons]] is for use only on category pages whose title is of the form "YYY0s Fooish television seasons", where YYYY is a 4-digit decade and "Fooish" is a nationality (e.g. "Russian" or "Egyptian")}}<!--
 
                       -->[[Category:{{TVChronoCatsErrCatName}}]]<!--
 
                       -->[[Category:{{TVChronoCatsErrCatName}}]]<!--
 
                 -->|<!-- ############### We have a valid category ###############################
 
                 -->|<!-- ############### We have a valid category ###############################
Line 16: Line 16:
 
             -->}}<!--
 
             -->}}<!--
 
       -->|<!-- ############### Not a category ###############################
 
       -->|<!-- ############### Not a category ###############################
           -->{{Error|[[Template:Decade nationality television seasons]] is for use only on category pages whose title is of the form "YYY0s Fooish television seasons", where YYY0s is a 4-digit decade and "Fooish" is a nationality (e.g. "Russian" or "Egyptian")}}<!--
+
           -->{{Error|This is not a category page.<br >[[Template:Decade nationality television seasons]] is for use only on category pages whose title is of the form "YYY0s Fooish television seasons", where YYY0s is a 4-digit decade and "Fooish" is a nationality (e.g. "Russian" or "Egyptian")}}<!--
 
           -->[[Category:{{TVChronoCatsErrCatName}}]]<!--
 
           -->[[Category:{{TVChronoCatsErrCatName}}]]<!--
 
   -->}}</includeonly><noinclude>
 
   -->}}</includeonly><noinclude>

Latest revision as of 19:36, 8 March 2020

Creates a category of the form "YYY0s nationality television seasons", where YYY0s is a 4-digit decade and nationality is a valid nationality.

e.g.

Usage

{{Decade nationality television seasons category}}

No parameters needed

Errors

If the template is used on invalid page, an error message is generated and the page is categorised in:

Script error: No such module "Purge".

Errors include:

  • The page is not in the category namespace
  • The page's title does not take the form form "YYY0s nationality television seasons"
  • The value of "nationality" does not correspond to a country name. The conversion is made using {{GetCountryNameFromAdjective}}, so the problem may be a glitch in that template's lookup table

Template:Television chronology category header templates