hoo added a comment. |
In T173194#3679769, @Jarekt wrote:The input to the template:label is q-code and the language. Language is optional and the code you highlighted will not be used if the language of the user matches the language returned by mw.wikibase.getLabelWithLang, which supposed to happen if language is not provided to the template. So that code would only be used in a rare case someone requests label in some specific language different than what is returned by mw.wikibase.getLabelWithLang.
Ah, I seeā¦ that's good. But in that case you probably want the code to read:
-- hard way to get label if not label and $LangExplicitlyGiven$ then entity = entity or mw.wikibase.getEntity(item) label = entity:getLabel(lang) end
- No need to do this if lang was not explicitly asked for. 2. No need to go through the whole list again.
TASK DETAIL
EMAIL PREFERENCES
To: Jarekt, hoo
Cc: Izno, daniel, Multichill, Aklapper, Ricordisamoa, JeanFred, Jarekt, ValterVB, Elitre, Jheald, Daniel_Mietchen, Nemo_bis, Liuxinyu970226, Aschroet, zhuyifei1999, Steinsplitter, Matanya, RP88, El_Grafo, Revent, Sjoerddebruin, Jane023, Susannaanas, Mike_Peel, Lydia_Pintscher, Micru, intracer, Poyekhali, Nizil, PokestarFan, hoo, E1presidente, Ramsey-WMF, Jmmuguerza, SandraF_WMF, GoranSMilovanovic, QZanden, Acer, Vali.matei, Volker_E, Wong128hk, Wikidata-bugs, PKM, Base, matthiasmullie, aude, GWicke, Fabrice_Florin, Raymond, Mbch331, Jay8g
Cc: Izno, daniel, Multichill, Aklapper, Ricordisamoa, JeanFred, Jarekt, ValterVB, Elitre, Jheald, Daniel_Mietchen, Nemo_bis, Liuxinyu970226, Aschroet, zhuyifei1999, Steinsplitter, Matanya, RP88, El_Grafo, Revent, Sjoerddebruin, Jane023, Susannaanas, Mike_Peel, Lydia_Pintscher, Micru, intracer, Poyekhali, Nizil, PokestarFan, hoo, E1presidente, Ramsey-WMF, Jmmuguerza, SandraF_WMF, GoranSMilovanovic, QZanden, Acer, Vali.matei, Volker_E, Wong128hk, Wikidata-bugs, PKM, Base, matthiasmullie, aude, GWicke, Fabrice_Florin, Raymond, Mbch331, Jay8g
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs