Page MenuHomePhabricator

First character of Wikidata labels incorrectly rendered in some languages on mobile, as the tagline class has ::first-letter { text-transform: capitalize; }
Closed, DuplicatePublic

Description

IMG-20171220-WA0007.jpg (1×800 px, 89 KB)
The first syllable is broken/unable to connect to next properly. Like if you look at example in this screenshot, you can see that first character is not connected while rest of characters are displayed properly

Event Timeline

IMG-20171220-WA0009.jpg (978×798 px, 61 KB)
One more example see "بھارتی" is not correct

Aklapper changed the task status from Open to Stalled.Dec 20 2017, 5:38 PM

Please always provide 1) clear steps to reproduce, 2) what you expected as text, 3) what actually happens as text.
See and follow https://mediawiki.org/wiki/How_to_report_a_bug
Thanks.

IMG-20171220-WA0007.jpg (1×800 px, 89 KB)
The first syllable is broken/unable to connect to next properly. Like if you look at example in this screenshot, you can see that first character is not connected while rest of characters are displayed properly

@BukhariSaeed: Please see my previous comment: Please post what you expected as text, and please post what actually happens as text. Please provide full links, so someone else can try to reproduce the problem. So far it has not even been mentioned which language this is about.
For future reference, please follow the structure on https://mediawiki.org/wiki/How_to_report_a_bug

So if I interpret this correctly:
The problem can be seen on https://ur.m.wikipedia.org/wiki/یسوع_مسیح
The description text we are talking about is مسیحیت کی مرکزی شخصیت
The text is coming from the Description entry for the Language Urdu on https://www.wikidata.org/wiki/Q302
There, using Firefox 57 on Fedora Linux, the first character looks correctly connected to me.

@BukhariSaeed: Which browser, which browser version, and which operating system did you use to test?
If you go to https://www.wikidata.org/wiki/Q302 , is the first character connected correctly for you?

For the records, as this might be related: https://www.mediawiki.org/wiki/Extension:UniversalLanguageSelector#Overriding_default_fonts

Aklapper renamed this task from Correct the wikidata label for mobile site to Some wikidata labels in Urdu have incorrectly rendered Urdu characters on the mobile site.Dec 23 2017, 10:48 PM
Aklapper changed the task status from Stalled to Open.
Aklapper added projects: I18n, MediaWiki-General.
Aklapper added subscribers: santhosh, Amire80.

I am using chrome, and all mobile users are facing same problem

I understand the bug, I can reproduce it on all browsers with MobileFrontend view, and I know why does this happen: because the tagline class has ::first-letter { text-transform: capitalize; }.

Here's a simple fiddle that demonstrates it:

https://jsfiddle.net/amire80/0uzq39ja/

This causes the first letter to have different styling from the rest of the word, and unfortunately both Firefox and Chrome break the rendering.

Capitalization only has useful effect in these alphabets: Latin, Cyrillic, Greek, Armenian, and Cherokee (and the rarer Coptic, Adlam, Warang Citi, and Osage, which are not used much in MediaWiki). In all other writing systems it either has no effect, or it is harmful, as it is the case with Arabic.

This capitalize effect should be either removed or limited to the alphabets above. Unfortunately there are many languages that are written in the Latin and Cyrillic alphabets, so it won't be easy (that's why I suggested to T59045: Add CSS classes based on writing system code a long time ago).

I'd be bold and just remove it completely, so that the description from Wikidata would be shown as-is. But if any particular language communities are actually interested in it, perhaps it can be added only to them.

I'll also try to report this to W3C and the major browsers' bug trackers. Ideally, browsers should just do nothing for languages in which capitalization is irrelevant, and it should probably be part of the standard, although it's quite possible that the standards people discussed it already...

It happens in both Firefox and Chrome.

I attempted to report this upstream:

However, this is still a MediaWiki bug and not an upstream bug. The right thing to do is definitely not to apply capitalize to text in languages that don't have capitalization, and perhaps not to apply it to text that was not supposed to be capitalized. Resolving this issue upstream is only something that should prevent rendering bugs on web pages that apply the rules incorrectly.

Aklapper renamed this task from Some wikidata labels in Urdu have incorrectly rendered Urdu characters on the mobile site to First character of Wikidata labels incorrectly rendered in some languages on mobile, as the tagline class has ::first-letter { text-transform: capitalize; }.Dec 25 2017, 10:58 AM