Lucas_Werkmeister_WMDE created this task.
Lucas_Werkmeister_WMDE added a project: Wikidata.
Restricted Application added a subscriber: Aklapper.
TASK DESCRIPTION
Wikibase creates translatable edit summaries by generating special
autocomments –
/* wbsetlabel-set:1|en */ Wikidata sandbox
– which are then turned into HTML via the `FormatAutocomments` hook when the
whole comment/summary is formatted (in the user language):
<span dir="auto"><span class="autocomment">Changed English label:
</span></span> Wikidata sandbox
<span dir="auto"><span
class="autocomment">(wikibase-item-summary-wbsetlabel-set: 1,
en)(colon-separator)</span></span> Wikidata sandbox
There are two spaces before the label value: one inside the autocomment, from
the `colon-separator` message (which is `: ` in English), and one outside the
autocomment, which is the original space between the `*/` and the new label.
That’s fine, since in HTML adjacent spaces are collapsed (even across elements).
However, this means that the outer space will still be present even if the
`colon-separator` message doesn’t include one. This is the case, for example,
in Chinese languages (example edit
<https://www.wikidata.org/w/index.php?title=Q956&diff=414837688&oldid=414833564&uselang=zh>):
<span dir="auto"><span
class="autocomment">已更改[zh-hk]的标签、描述和别名:</span></span> 北京, 中華人民共和國首都, 北京, 京, 北京市
Though my knowledge of Chinese languages is limited, I believe this is
incorrect: they don’t use space characters, that’s why the `colon-separator`
message doesn’t include a space character there (it’s just an U+FF1A FULLWIDTH
COLON). The visual difference is minor, but it does exist:
F28509561: Screenshot_2019-03-29 “北京市 (Q956)”的版本间的差异 - Wikidata.png
<https://phabricator.wikimedia.org/F28509561>
This can be fixed by removing the space after the `*/`:
/* wbsetlabel-set:1|en */Wikidata sandbox
This would still look correct in English, since the `colon-separator` message
includes the space there:
<span dir="auto"><span class="autocomment">Changed English label:
</span></span>Wikidata sandbox
TASK DETAIL
https://phabricator.wikimedia.org/T219637
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Lucas_Werkmeister_WMDE
Cc: Aklapper, Lucas_Werkmeister_WMDE, alaa_wmde, Nandana, Lahi, Gq86,
GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Wikidata-bugs,
aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs