Difference between revisions of "Template:Name"

From Yugipedia
Jump to: navigation, search
(only use the module if the name's length is over 1000 characters, to avoid script timeout errors on pages with hundreds of transclusions)
(using #iferror instead lets us skip checking the string's length and just try the #replaces)
Line 18: Line 18:
 
   | sort      = modification date
 
   | sort      = modification date
 
   | order    = desc
 
   | order    = desc
   }} }}{{ #ifexpr: {{ #len: {{ #var: $card_name-localname }} }} < 1000
+
   }} }}{{ #iferror: {{ #explode: {{ #explode: {{ #var: $card_name-localname }} | ]] | 1 }} | {{!((}} }} | {{ #invoke: string | match | {{ #var: $card_name-localname }} | %[%[SMW::off%]%](.*)%[%[SMW::on%]%] }} }}
  | {{ #explode: {{ #explode: {{ #var: $card_name-localname }} | ]] | 1 }} | {{!((}} }}
 
  | {{ #invoke: string | match | {{ #var: $card_name-localname }} | %[%[SMW::off%]%](.*)%[%[SMW::on%]%] }}
 
  }}
 
 
}}<noinclude>
 
}}<noinclude>
 
{{t|Card name}} generates the name of a card from the Semantic property.
 
{{t|Card name}} generates the name of a card from the Semantic property.

Revision as of 21:13, 18 May 2016

{{Card name}} generates the name of a card from the Semantic property.

For example:

  • {{Card name|Dark Magician|en}} → Dark Magician
  • {{Card name|Dark Magician|ae}} → Dark Magician
  • {{Card name|Dark Magician|de}} → Dunkler Magier
  • {{Card name|Dark Magician|ja}} → ブラック・マジシャン
  • {{Card name|Blue-Eyes White Dragon|ja}} → 青眼の白龍ブルーアイズ・ホワイト・ドラゴン
  • {{Card name|Blue-Eyes White Dragon|ae}} → Blue-Eyes White Dragon