Difference between revisions of "Template:Infobox former country/autocat"

From CWS Planet
Jump to navigation Jump to search
m
m
 
(11 intermediate revisions by the same user not shown)
Line 9: Line 9:
   |Lower Boroso|South Boroso|Southern Boroso = [[Category:Former countries in Lower Boroso|{{{common_name}}}, {{{year_start}}}]]
   |Lower Boroso|South Boroso|Southern Boroso = [[Category:Former countries in Lower Boroso|{{{common_name}}}, {{{year_start}}}]]
   |Akulanen = [[Category:Former countries in Akulanen|{{{common_name}}}, {{{year_start}}}]]
   |Akulanen = [[Category:Former countries in Akulanen|{{{common_name}}}, {{{year_start}}}]]
   |Puzimm = [[Category:Former countries in Puzimm|{{{common_name}}}, {{{year_start}}}]]
   |Puzimm |Püzimm= [[Category:Former countries in Puzimm|{{{common_name}}}, {{{year_start}}}]]
   |Low Letsatia |Letzia = [[Category:Former polities in Letzia|{{{common_name}}}, {{{year_start}}}]]
   |Low Letsatia|Letzia = [[Category:Former polities in Letzian history|{{{common_name}}}, {{{year_start}}}]]
   |Vaniu | Vaniua = [[Category:Former countries in Vaniuan history|{{{common_name}}}, {{{year_start}}}]]
   |Vaniu|Vaniua = [[Category:Former countries in Vaniua|{{{common_name}}}, {{{year_start}}}]]
  |Ekuosia|Upper Ekuosia|Lower Ekuosia = [[Category:Former countries in Ekuosia|{{{common_name}}}, {{{year_start}}}]]
   |Qonklaks = [[Category:Former countries in Qonklese history|{{{common_name}}}, {{{year_start}}}]]
   |Qonklaks = [[Category:Former countries in Qonklese history|{{{common_name}}}, {{{year_start}}}]]
   |Parshita = [[Category:Former countries in Parshitan history|{{{common_name}}}, {{{year_start}}}]]
   |Parshita|Milevia = [[Category:Former countries in Parshita|{{{common_name}}}, {{{year_start}}}]]
   |Soltenna = [[Category:Former countries in Soltennan history|{{{common_name}}}, {{{year_start}}}]]
   |Soltenna = [[Category:Former countries in Soltenna|{{{common_name}}}, {{{year_start}}}]]
   |East Miraria|Northern Miraria = [[Category:Former countries in {{{region}}}|{{{common_name}}}, {{{year_start}}}]]
   |East Miraria|Northern Miraria|North Miraria|Mahavia = [[Category:Former countries in Northern Miraria|{{{common_name}}}, {{{year_start}}}]]
   |#default = {{#switch:{{ucfirst:{{{country}}}}}
   |#default = {{#switch:{{ucfirst:{{{country}}}}}
     |#default = {{#switch:{{{continent}}}
     |#default = {{#switch:{{{continent}}}
Line 30: Line 31:
   |Confederation = [[Category:Former confederations|{{{common_name}}}]]
   |Confederation = [[Category:Former confederations|{{{common_name}}}]]
   |State union |State Union |Union = [[Category:Former state unions|{{{common_name}}}, {{{year_start}}}]]
   |State union |State Union |Union = [[Category:Former state unions|{{{common_name}}}, {{{year_start}}}]]
  |Balkist |Balkist republic = [[Category:Former Balkist republics|{{{common_name}}}, {{{year_start}}}]]
  |Kuulist |Balkist republic = [[Category:Former Kúúlist republics|{{{common_name}}}, {{{year_start}}}]]
   |Unrecognized |Unrecognised |Unrecognized state |Unrecognised state |Unrecognized State |Unrecognised State=[[Category:Former unrecognized countries|{{{common_name}}}]]
   |Unrecognized |Unrecognised |Unrecognized state |Unrecognised state |Unrecognized State |Unrecognised State=[[Category:Former unrecognized countries|{{{common_name}}}]]
   |City-state |City-State |City state |City State |City ={{#switch:{{{empire|}}}
   |City-state |City-State |City state |City State |City ={{#switch:{{{empire|}}}
Line 44: Line 47:
   |#default =  [[Category:Former vassal states|{{{common_name}}}, {{{year_start}}}]]
   |#default =  [[Category:Former vassal states|{{{common_name}}}, {{{year_start}}}]]
   }}
   }}
   |Satellite |Satellite State | Satellite state =[[Category:Soviet satellite states|{{{common_name}}}]]
   |Satellite |Satellite State | Satellite state =[[Category:Helsonian satellite states|{{{common_name}}}]]
   |Colony={{#switch:{{ucfirst:{{{empire}}}}}
   |Colony={{#switch:{{ucfirst:{{{empire}}}}}
     |Terminia |Terminian Empire|Terminian Three Kingdoms|Olboros Terminia=[[Category:Former Terminian colonies|{{{common_name}}}]]
     |Terminia |Terminian Empire|Terminian Three Kingdoms|Olboros Terminia=[[Category:Former Terminian colonies|{{{common_name}}}]]
Line 60: Line 63:
     -->|{{#ifexist:Category:States and territories established in {{{year_start}}}<!--
     -->|{{#ifexist:Category:States and territories established in {{{year_start}}}<!--
       -->|[[Category:States and territories established in {{{year_start}}}|{{{common_name}}}, {{{year_start}}}]]<!--
       -->|[[Category:States and territories established in {{{year_start}}}|{{{common_name}}}, {{{year_start}}}]]<!--
       -->|{{#ifeq:{{Str find| {{{year_start}}} |BC}}|-1<!--
       -->|{{#ifeq:{{Str find| {{{year_start}}} |BCE}}|-1<!--
           -->|{{#ifexist:Category:States and territories established in the {{#expr: {{{year_start}}}-{{{year_start}}}mod10}}s<!--
           -->|{{#ifexist:Category:States and territories established in the {{#expr: {{{year_start}}}-{{{year_start}}}mod10}}s<!--
             -->|[[Category:States and territories established in the {{#expr: {{{year_start}}}-{{{year_start}}}mod10}}s|{{{common_name}}}, {{{year_start}}}]]<!--
             -->|[[Category:States and territories established in the {{#expr: {{{year_start}}}-{{{year_start}}}mod10}}s|{{{common_name}}}, {{{year_start}}}]]<!--
Line 68: Line 71:
                 -->}}<!--
                 -->}}<!--
             -->}}<!--
             -->}}<!--
           -->|{{#ifexist:Category:States and territories established in the {{#expr: {{Str mid| {{{year_start}}}||{{#expr: {{Str find|{{{year_start}}} |BC}}-1}} }}-{{Str mid| {{{year_start}}}||{{#expr: {{Str find|{{{year_start}}} |BC}}-1}} }}mod10}}s BC<!--
           -->|{{#ifexist:Category:States and territories established in the {{#expr: {{Str mid| {{{year_start}}}||{{#expr: {{Str find|{{{year_start}}} |BCE}}-1}} }}-{{Str mid| {{{year_start}}}||{{#expr: {{Str find|{{{year_start}}} |BCE}}-1}} }}mod10}}s BCE<!--
             -->|[[Category:States and territories established in the {{#expr: {{Str mid| {{{year_start}}}||{{#expr: {{Str find|{{{year_start}}} |BC}}-1}} }}-{{Str mid| {{{year_start}}}||{{#expr: {{Str find|{{{year_start}}} |BC}}-1}} }}mod10}}s BC|{{{common_name}}}, {{{year_start}}}]]<!--
             -->|[[Category:States and territories established in the {{#expr: {{Str mid| {{{year_start}}}||{{#expr: {{Str find|{{{year_start}}} |BCE}}-1}} }}-{{Str mid| {{{year_start}}}||{{#expr: {{Str find|{{{year_start}}} |BCE}}-1}} }}mod10}}s BCE|{{{common_name}}}, {{{year_start}}}]]<!--
             -->|{{#ifexist:Category:States and territories established in the {{Ordinal| {{#expr: ({{Str mid| {{{year_start}}}||{{#expr: {{Str find|{{{year_start}}} |BC}}-1}} }} - {{Str mid| {{{year_start}}}||{{#expr: {{Str find|{{{year_start}}} |BC}}-1}} }}mod100)/100+1}}}} century BC<!--
             -->|{{#ifexist:Category:States and territories established in the {{Ordinal|{{#expr: ({{Str mid| {{{year_start}}}||{{#expr: {{Str find|{{{year_start}}} |BCE}}-1}} }} - {{Str mid| {{{year_start}}}||{{#expr: {{Str find|{{{year_start}}} |BCE}}-1}} }}mod100)/100+1}}}} century BCE<!--
                 -->|[[Category:States and territories established in the {{Ordinal|{{#expr: ({{Str mid| {{{year_start}}}||{{#expr: {{Str find|{{{year_start}}} |BC}}-1}} }} - {{Str mid| {{{year_start}}}||{{#expr: {{Str find|{{{year_start}}} |BC}}-1}} }}mod100)/100+1}}}} century BC|{{{common_name}}}, {{{year_start}}}]]<!--
                 -->|[[Category:States and territories established in the {{Ordinal|{{#expr: ({{Str mid| {{{year_start}}}||{{#expr: {{Str find|{{{year_start}}} |BCE}}-1}} }} - {{Str mid| {{{year_start}}}||{{#expr: {{Str find|{{{year_start}}} |BCE}}-1}} }}mod100)/100+1}}}} century BCE|{{{common_name}}}, {{{year_start}}}]]<!--
                 -->|[[Category:Former country articles requiring maintenance|Y1]]<!--
                 -->|[[Category:Former country articles requiring maintenance|Y1]]<!--
                 -->}}<!--
                 -->}}<!--
Line 86: Line 89:
     -->|{{#ifexist:Category:States and territories disestablished in {{{year_end}}}<!--
     -->|{{#ifexist:Category:States and territories disestablished in {{{year_end}}}<!--
       -->|[[Category:States and territories disestablished in {{{year_end}}}|{{{common_name}}}, {{{year_end}}}]]<!--
       -->|[[Category:States and territories disestablished in {{{year_end}}}|{{{common_name}}}, {{{year_end}}}]]<!--
       -->|{{#ifeq:{{Str find| {{{year_end}}} |BC}}|-1<!--
       -->|{{#ifeq:{{Str find| {{{year_end}}} |BCE}}|-1<!--
           -->|{{#ifexist:Category:States and territories disestablished in the {{#expr: {{{year_end}}}-{{{year_end}}}mod10}}s<!--
           -->|{{#ifexist:Category:States and territories disestablished in the {{#expr: {{{year_end}}}-{{{year_end}}}mod10}}s<!--
             -->|[[Category:States and territories disestablished in the {{#expr: {{{year_end}}}-{{{year_end}}}mod10}}s|{{{common_name}}}, {{{year_end}}}]]<!--
             -->|[[Category:States and territories disestablished in the {{#expr: {{{year_end}}}-{{{year_end}}}mod10}}s|{{{common_name}}}, {{{year_end}}}]]<!--
Line 94: Line 97:
                 -->}}<!--
                 -->}}<!--
             -->}}<!--
             -->}}<!--
           -->|{{#ifexist:Category:States and territories disestablished in the {{#expr: {{Str mid| {{{year_end}}}||{{#expr: {{Str find|{{{year_end}}} |BC}}-1}} }}-{{Str mid| {{{year_end}}}||{{#expr: {{Str find|{{{year_end}}} |BC}}-1}} }}mod10}}s BC<!--
           -->|{{#ifexist:Category:States and territories disestablished in the {{#expr: {{Str mid| {{{year_end}}}||{{#expr: {{Str find|{{{year_end}}} |BCE}}-1}} }}-{{Str mid| {{{year_end}}}||{{#expr: {{Str find|{{{year_end}}} |BCE}}-1}} }}mod10}}s BCE<!--
             -->|[[Category:States and territories disestablished in the {{#expr: {{Str mid| {{{year_end}}}||{{#expr: {{Str find|{{{year_end}}} |BC}}-1}} }}-{{Str mid| {{{year_end}}}||{{#expr: {{Str find|{{{year_end}}} |BC}}-1}} }}mod10}}s BC|{{{common_name}}}, {{{year_end}}}]]<!--
             -->|[[Category:States and territories disestablished in the {{#expr: {{Str mid| {{{year_end}}}||{{#expr: {{Str find|{{{year_end}}} |BCE}}-1}} }}-{{Str mid| {{{year_end}}}||{{#expr: {{Str find|{{{year_end}}} |BCE}}-1}} }}mod10}}s BCE|{{{common_name}}}, {{{year_end}}}]]<!--
             -->|{{#ifexist:Category:States and territories disestablished in the {{Ordinal|{{#expr: ({{Str mid| {{{year_end}}}||{{#expr: {{Str find|{{{year_end}}} |BC}}-1}} }} - {{Str mid| {{{year_end}}}||{{#expr: {{Str find|{{{year_end}}} |BC}}-1}} }}mod100)/100+1}}}} century BC<!--
             -->|{{#ifexist:Category:States and territories disestablished in the {{Ordinal|{{#expr: ({{Str mid| {{{year_end}}}||{{#expr: {{Str find|{{{year_end}}} |BCE}}-1}} }} - {{Str mid| {{{year_end}}}||{{#expr: {{Str find|{{{year_end}}} |BCE}}-1}} }}mod100)/100+1}}}} century BCE<!--
                 -->|[[Category:States and territories disestablished in the {{Ordinal|{{#expr: ({{Str mid| {{{year_end}}}||{{#expr: {{Str find|{{{year_end}}} |BC}}-1}} }} - {{Str mid| {{{year_end}}}||{{#expr: {{Str find|{{{year_end}}} |BC}}-1}} }}mod100)/100+1}}}} century BC|{{{common_name}}}, {{{year_end}}}]]<!--
                 -->|[[Category:States and territories disestablished in the {{Ordinal|{{#expr: ({{Str mid| {{{year_end}}}||{{#expr: {{Str find|{{{year_end}}} |BCE}}-1}} }} - {{Str mid| {{{year_end}}}||{{#expr: {{Str find|{{{year_end}}} |BCE}}-1}} }}mod100)/100+1}}}} century BCE|{{{common_name}}}, {{{year_end}}}]]<!--
                 -->|[[Category:Former country articles requiring maintenance|Y2]]<!--
                 -->|[[Category:Former country articles requiring maintenance|Y2]]<!--
                 -->}}<!--
                 -->}}<!--
Line 116: Line 119:
*First the template tests to see if "Category:States and territories established in the {{{year_start}}}" exists.  If so, it is added.
*First the template tests to see if "Category:States and territories established in the {{{year_start}}}" exists.  If so, it is added.
*If not, the template tests to see if "Category:States and territories established in {{{year_start}}}" exists.  If so, it is added.
*If not, the template tests to see if "Category:States and territories established in {{{year_start}}}" exists.  If so, it is added.
*If not, the template tests to see if "Category:States and territories established in the DECADEs" where DECADE is the decade containing {{{year_start}}} (ie {{cl|States and territories established in the 120s BC}}).  If so, it is added.
*If not, the template tests to see if "Category:States and territories established in the DECADEs" where DECADE is the decade containing {{{year_start}}} (ie {{cl|States and territories established in the 120s BCE}}).  If so, it is added.
*If not, the template tests to see if "Category:States and territories established in the Nth century" where N is the century containing {{{year_start}}} (ie {{cl|States and territories established in the 1st century BC}}).  If so, it is added.
*If not, the template tests to see if "Category:States and territories established in the Nth century" where N is the century containing {{{year_start}}} (ie {{cl|States and territories established in the 1st century BCE}}).  If so, it is added.


The reason for the first case is in case an imprecise date is imputed, such as "the 820s" or "the 18th century", before trying exact dates like "1820".
The reason for the first case is in case an imprecise date is imputed, such as "the 820s" or "the 18th century", before trying exact dates like "1820".
Line 124: Line 127:
*First the template tests to see if "Category:States and territories disestablished in the {{{year_start}}}" exists.  If so, it is added.
*First the template tests to see if "Category:States and territories disestablished in the {{{year_start}}}" exists.  If so, it is added.
*If not, the template tests to see if "Category:States and territories disestablished in {{{year_start}}}" exists.  If so, it is added.
*If not, the template tests to see if "Category:States and territories disestablished in {{{year_start}}}" exists.  If so, it is added.
*If not, the template tests to see if "Category:States and territories disestablished in the DECADEs" where DECADE is the decade containing {{{year_start}}} (ie {{cl|States and territories disestablished in the 120s BC}}).  If so, it is added.
*If not, the template tests to see if "Category:States and territories disestablished in the DECADEs" where DECADE is the decade containing {{{year_start}}} (ie {{cl|States and territories disestablished in the 120s BCE}}).  If so, it is added.
*If not, the template tests to see if "Category:States and territories disestablished in the Nth century" where N is the century containing {{{year_start}}} (ie {{cl|States and territories disestablished in the 1st century BC}}).  If so, it is added.
*If not, the template tests to see if "Category:States and territories disestablished in the Nth century" where N is the century containing {{{year_start}}} (ie {{cl|States and territories disestablished in the 1st century BCE}}).  If so, it is added.


The reason for the first case is in case an imprecise date is imputed, such as "the 820s" or "the 18th century", before trying exact dates like "1820".
The reason for the first case is in case an imprecise date is imputed, such as "the 820s" or "the 18th century", before trying exact dates like "1820".
}}
}}
</noinclude>
</noinclude>

Latest revision as of 16:30, 2 June 2024

Script error: The function "main" does not exist.