Template talk:JapanCityYear

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Template errors

[edit]

Krorokeroro recently reverted my edits to this template, stating in their edit summary, "since not displayed in the Japanese city category." I'm not quite sure what that is supposed to mean. However, in its current form, the template almost certainly contains syntax errors. At lines 39 and 41 the following expression appears: {{#ifeq:{{{addpref|}}}no||, {{ucfirst:{{lc:{{{pref|}}} }} }} }} What this does is evaluate whether the first two expressions after #ifeq: are equal. See mw:Help:Extension:ParserFunctions##ifeq. In this case, the first expression is {{{addpref|}}}no, and the second is an empty string, so they can never be equal. I strongly doubt that that is what the template author(s) intended. More likely they intended to write {{#ifeq:{{{addpref|}}}|no|, {{ucfirst:{{lc:{{{pref|}}} }} }} }}, which would test whether there is a parameter "addpref" with the value "no". --R'n'B (talk) 17:50, 15 March 2022 (UTC)[reply]

@R'n'B: I edited this template because it was in the following state. All year links in the box at the top of Category:2009 in Kyoto were red. The numbers were displayed in red, not blue. I have confirmed this not only in Kyoto but also in Hakone and Yokohama etc. When editing the template, please check it in the preview.--Krorokeroro (talk) 03:20, 16 March 2022 (UTC)[reply]