Author: incarus6
Description:
Some advertisings seems to be broken on wikis like WP:FA,
| • bzimport | |
| Mar 9 2013, 6:32 PM |
| F36989159: image.png | |
| May 8 2023, 9:11 PM |
| F36989153: image.png | |
| May 8 2023, 9:11 PM |
| F10755: werbungWP-FA.png | |
| Nov 22 2014, 1:33 AM |
Author: incarus6
Description:
Some advertisings seems to be broken on wikis like WP:FA,
I have updated the banner in question with the Farsi translation [1]. This should have resolved the particular issue shown in the attachment, occurring when viewing fawiki with Farsi as user language, as the reporter appears to have. Any Meta admin could have done so, as described on the translation page linked from the banner [2].
As I understand it, the issue was not that the banner displayed in English (although of course it is preferable to have it available in the local language), but rather that the English banner displayed in a broken way - "?How should...", ".(Comment on proposals...", etc.
It's worth noting the English-language version of this banner displays fine on hewiki, another right-to-left wiki [3], when selecting English as user language. And on the other hand, for some reason selecting a specific banner does not seem to work at all to me on either fawiki [4] or arwiki [5]. Same for other banners, e.g. compare [6] and [7].
This suggests to me that this is a general issue with the display of banners in *some* RTL wikis, in particular when there is no local translation available and the CentralNotice fallback logic selects a LTR version to display, as it was the case here. I'll also note that there is an open bug which may be related [8].
Also, it is my understanding that Bugzilla is for fixes in the software running on Wikimedia sites, or their configuration, rather than for requesting content changes on these wikis (as in this case). In that regard, this bug is better understood as reporting a general problem. For these reasons, I am hesitant to claim the fame of having resolved this bug solely based on my wiki edits that fixed this particular banner. So I am resetting the assignee to default.
[2] https://meta.wikimedia.org/wiki/FDC_portal/CentralNotice2013-1
[3] https://he.wikipedia.org/w/index.php?banner=FDCpropreview20031&uselang=en (note that you have to be logged in to see this and the other banner examples)
[4] https://fa.wikipedia.org/w/index.php?banner=FDCpropreview20031&uselang=en
[5] https://ar.wikipedia.org/w/index.php?banner=FDCpropreview20031&uselang=en
[6] https://ar.wikipedia.org/w/index.php?banner=IndivdualGrantsA
[7] https://he.wikipedia.org/w/index.php?banner=IndivdualGrantsA
[8] https://bugzilla.wikimedia.org/show_bug.cgi?id=21778 "BiDi issue in RTL wikis at site notice with LTR text ending with Unicode characters with neutral directional"
(In reply to comment #2)
This suggests to me that this is a general issue with the display of banners
in *some* RTL wikis, in particular when there is no local translation available
Sidenote: The wrong placement of punctuation marks also happens in other [intentionally] unlocalized strings on RTL wikipages and is not specific to CentralNotice but probably lower in the core stack, e.g. my username "AKlapper (WMF)" is displayed as "(AKlapper (WMF" on https://he.wikipedia.org .
(In reply to comment #3)
(In reply to comment #2)
This suggests to me that this is a general issue with the display of banners
in *some* RTL wikis, in particular when there is no local translation availableSidenote: The wrong placement of punctuation marks also happens in other
[intentionally] unlocalized strings on RTL wikipages and is not specific to
CentralNotice but probably lower in the core stack, e.g. my username
"AKlapper
(WMF)" is displayed as "(AKlapper (WMF" on https://he.wikipedia.org .
That looks similar to https://bugzilla.wikimedia.org/show_bug.cgi?id=45932 , btw.
Bug 49255, bug 45941, bug 45932 might all have the same underlying reason. Anybody who knows the codebase better, feel free to mark as a duplicates.
mwalker wrote:
I wonder if adding a <span lang=""></span> to banner messages would help... I shall try that at some point; writing down here so I dont forget.
incarus6 wrote:
As you can see in the screenshot above, not only brackets are affected by this issue @ Andre. I reverted your misleading changes back to the old.
Are there any potential workarounds we can use within the banner code to solve this problem?
<div dir="ltr" lang="en"> and so on. Or ‎ sprinkled liberally near punctuation characters.
But if you use those in the original (English) text and it is translatable, then one might incorrectly include them in the translation too, causing problem.
I would say the real solution is to engage users who can translate such banners, before they go live.
A good first task is a self-contained, non-controversial task with a clear approach. It should be well-described with pointers to help a completely new contributor. Given the current short task description I'm removing the good first task tag.
@AKanji-WMF The action for the Fundraising team is change the banners so that the language of text correctly marked up, using dir="ltr" lang="en" (or analogously for other languages), as I suggested in T47941#2975303. I'm afraid no one else understands how they are created, or has the ability to edit them.
This is still a problem, here's a banner I saw a few minutes ago when visiting https://fa.wikipedia.org/:
Expected rendering:
Note the comma and quote on the first line of text of the banner.
Thank you @matmarex - I will pull into our next triage so we can discuss. Appreciate the context!
Hi @matmarex , I have checked in with fr-tech and online fundraising, and it doesn't appear that there's anything we can do - the examples given are not fundraising banners. Some notes from my conversations:
"it would be up to the creator of the banner to wrap the English parts in <div dir="ltr" lang="en"></div> or similar to ensure that it showed the correct way. I dont know if we can detect the English language any other way to swap the text direction automatically"
"I think the problem occurs when using translatable messages, so as suggested in https://phabricator.wikimedia.org/T47941#8835010 CentralNotice could be changed to mark up translated messages with their actual language when they are included in a banner. I'm not sure how difficult that would be. The Language engineering team might have some ideas"