ssastry added a comment.

@thiemowmde
I think the second solution is maybe better. And I think that we can check the data type of property to confirm whether it is URL or not. If the date type of property is URL and the site have enabled Language Converter, the output does not format with variant code block.

This is not related to the preprocessor change, it is long-standing bug in php LanguageConverter (to wit, conversion is applied at an awkward point in the parser pipeline, so it doesn't properly respect other syntactic structures). Sadly, LanguageConverter is riddled with these, although I've been making slow progress fixing them.

I personally prefer solution three above: there is no reason to make the URL vary by selected variant, only the link caption should change. Effectively solution three would wrap the language variant inside the <a> tag, while the autolink behavior would emit multiple <a> tags inside the variant markup.

A combination of 2 and 3 is ideal. Where there is no reason to emit a language variant (as in this example), it makes sense to adopt 2. But, when necessary, I think we should generate wikitext that parses to a reasonable looking DOM structure. So, [URL -{text1;text2}-] is preferable to -{link1;link2}- ... the principle being to restrict variant code to the smallest well-formed DOM construct.


TASK DETAIL
https://phabricator.wikimedia.org/T166429

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: thiemowmde, ssastry
Cc: cscott, ssastry, Elitre, gerritbot, fireattack, Shizhao, liangent, Aleksey_WMDE, Jonas, Jakob_WMDE, WMDE-leszek, hoo, aude, thiemowmde, Lydia_Pintscher, Liuxinyu970226, Aklapper, Cwek, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Lewizho99, JJMC89, Maathavan, Izno, LNDDYL, Fuzheado, Wikidata-bugs, zhuyifei1999, Arlolra, Jackmcbarn, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to