Last modified: 2013-12-19 19:37:13 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T60374, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58374 - Language-specific webfonts override autonym font
Language-specific webfonts override autonym font
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
UniversalLanguageSelector (Other open bugs)
unspecified
All All
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-12 07:01 UTC by Yair Rand
Modified: 2013-12-19 19:37 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Yair Rand 2013-12-12 07:01:45 UTC
When an element with a lang attribute set to a language that causes a Webfont to load is located in an element with the class "autonym", the non-autonym font loads anyway and is applied to the element, overriding the autonym font. See for an example the Wikidata Main Page ([[d:]]) language box. The fonts for the various languages are loaded even though the box has the autonym class, and the autonym font is not used.
Comment 1 Siebrand Mazeland 2013-12-12 07:09:10 UTC
https://www.wikidata.org/wiki/Wikidata:Hoofdpagina only loads the font Autonym for me.

https://www.wikidata.org/wiki/Wikidata:Main_Page only loads the font Autonym for me.

I'm using OSX 10.9 and Firefox 25.0.1.
Comment 2 Siebrand Mazeland 2013-12-12 08:30:24 UTC
I've created 3 test pages:

1. https://www.mediawiki.org/wiki/User:Siebrand/test
2. https://commons.wikimedia.org/wiki/User:Siebrand/test
3. https://wikidata.org/wiki/User:Siebrand/test

Test results OSX 10.9/Firefox 25.0.1:
1. Autonym and Lohit Kannada downloaded (1 too many)
2. Autonym and Lohit Kannada downloaded (1 too many)
3. Autonym downloaded (expected)

Test results Windows 7/Chrome 31
1. Autonym, Lohit Kannada, Lohit Devanagari downloaded (2 too many)
2. Autonym, Lohit Kannada, Lohit Devanagari downloaded (2 too many)
3. Autonym downloaded (expected)
Comment 3 Siebrand Mazeland 2013-12-12 09:19:08 UTC
I realised I didn't place the text for the test here:

<span class="autonym"><span lang="kn">...</span> | <span lang="sa">...</span></span>

Expected is that only the font Autonym is loaded in this scenario, as happens on wikidata.org.
Comment 4 Gerrit Notification Bot 2013-12-12 10:55:23 UTC
Change 100971 had a related patch set uploaded by Santhosh:
Update the $wgULSNoWebfontsSelectors defaults

https://gerrit.wikimedia.org/r/100971
Comment 5 Siebrand Mazeland 2013-12-12 11:16:48 UTC
Copying commit summary of Gerrit change #100791:

$wgULSNoWebfontsSelectors had default value as '#p-lang li > a' - the interlanguage links. It does not make sense after the class 'autonym' was added to such links. That 'autonym' CSS class has font family definition as Autonym, sans-serif, i.e. Autonym font is applied to the interlanguage links.

So, now it make sense to have default value as .autonym to exclude from parsing.

This also fixes the problems like Bug 58374 where in random cases the default font for the language get applied even if it has 'autonym' class.

This issue was because the js get executed before the css for .autonym class is ready and applied. The jquery.webfonts parser will miss to detect the explicit font family 'Autonym, sans-serif' and the default font is applied.
Comment 6 Niklas Laxström 2013-12-12 11:42:40 UTC
(In reply to comment #5)
> Copying commit summary of Gerrit change #100791:
#100971 is the correct one.

> $wgULSNoWebfontsSelectors had default value as '#p-lang li > a' - the
> interlanguage links. It does not make sense after the class 'autonym' was
> added
> to such links. That 'autonym' CSS class has font family definition as
> Autonym,
> sans-serif, i.e. Autonym font is applied to the interlanguage links.

Just to be explicit, this has backwards compatibility impact from MLEB perspective. Someone running MLEB on older MediaWiki will now get the behavior of downloading all the fonts in interlanguage list.

Though, assuming that there are very few users doing that, and even if they do they wont have have hundreds of links like in Wikipedia, I would say this is acceptable trade off if mentioned on the release notes.
Comment 7 Gerrit Notification Bot 2013-12-12 13:39:30 UTC
Change 100971 merged by jenkins-bot:
Update the $wgULSNoWebfontsSelectors defaults

https://gerrit.wikimedia.org/r/100971
Comment 8 Gerrit Notification Bot 2013-12-12 13:47:09 UTC
Change 100990 had a related patch set uploaded by Siebrand:
Set $wgULSNoWebfontsSelectors

https://gerrit.wikimedia.org/r/100990
Comment 9 Gerrit Notification Bot 2013-12-12 14:09:55 UTC
Change 100990 merged by jenkins-bot:
Set $wgULSNoWebfontsSelectors

https://gerrit.wikimedia.org/r/100990

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links