Page MenuHomePhabricator

Parser function #ifeq with #property gives wrong result on zhwp
Closed, DeclinedPublic

Description

Author: mmyangfl

Description:
Parser function #ifeq with #property as one of the strings can give wrong result on zhwp. For example, on the article OpenBSD, {{#property:P373}} gives OpenBSD, but {{#ifeq:{{#property:P373}}|OpenBSD|a|b}} gives b. There's no such problem on enwp.


Version: unspecified
Severity: minor

Details

Reference
bz67988

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:29 AM
bzimport set Reference to bz67988.
bzimport added a subscriber: Unknown Object (MLST).

{{#property: }} emits wikitext with language conversion syntax in it if the wiki uses Language Converter. I remember I brought up a topic in wikidata-tech@lists about the expected output of {{#property: }} but got no response. :/

Yes, the problem over here is that we use a language variant aware output format (which only gets transformed into the actual output after parser functions like ifeq are being executed).

You can use Lua to get the raw values without variant conversion.

Per above, this is not anything we can easily change... the parser function should only be used for very simply display logic. Once you want to more, please use Lua.