Page MenuHomePhabricator

Update resources/src/mediawiki.skinning/i18n-ordered-lists.less ordered list rules to be more inclusive of other languages
Open, Needs TriagePublic

Description

Currently /resources/src/mediawiki.legacy/shared.css features

/* Localised ordered list numbering for some languages */
ol:lang( azb ) li,
ol:lang( bcc ) li,
ol:lang( bgn ) li,
ol:lang( bqi ) li,
ol:lang( fa ) li,
ol:lang( glk ) li,
ol:lang( kk-arab ) li,
ol:lang( lrc ) li,
ol:lang( luz ) li,
ol:lang( mzn ) li {
	list-style-type: persian;
}

ol:lang( ckb ) li,
ol:lang( sdh ) li {
	list-style-type: arabic-indic;
}

ol:lang( hi ) li,
ol:lang( mai ) li,
ol:lang( mr ) li,
ol:lang( ne ) li {
	list-style-type: devanagari;
}

ol:lang( as ) li,
ol:lang( bn ) li {
	list-style-type: bengali;
}

ol:lang( or ) li {
	list-style-type: oriya;
}

Issues

Test article

https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type#Values

Alternatively without -moz vendor prefixes:
https://www.mediawiki.org/wiki/User:Volker_E._(WMF)/sandbox/Ordered_Lists

Event Timeline

From limited testing at BrowserStack, recent Firefox/Android (v66) shows the right numerals from testing above.

Data on MDN is wrong, -moz prefixes are needed for all languages on Firefox < 33.

Firefox 3/Win XP is the one in browser shares under 33 at 0.1%.
Firefox 25/Win 7 is the next follower at 0.0%.

Change 507635 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[mediawiki/core@master] Remove -moz vendor prefixes

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

Change 507635 merged by jenkins-bot:
[mediawiki/core@master] Remove -moz vendor prefixes

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

Care should be used when adding new languages to this list. Some language communities don't actually want localised numbers (they may be archaic) – this usually is reflected in the PHP side as well. Some languages are just no aware of this possibility and can be added. Some languages just don't have communities that would have asked to be added on this list.

Change 539167 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/core@master] Add i18n feature to ResourceLoaderSkinModule

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

Change 549220 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/core@master] Add i18n feature to ResourceLoaderSkinModule

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

Looking for review on the above 2 patches which also fix T217616 and T169910
@Krinkle should I make you the assignee or is there anybody else you would like to nominate for review?

The conversation is now spread between three patches and four tasks (possibly more). What I know is that the original premise going into this seems to be incompatible with how MediaWiki works. It is unclear to me whether or not this premise has been adjusted since then.

Content language being a page specific property is core to MediaWiki and is exposed on all wikis in production. First and foremost through special pages where the content often is adjusted to match the current user's interface. For user-generated content this is used mediawiki.org, translatewiki.net, meta.wikimedia.org, commons.wikimedia.org, wikidata.org and possibly more. There are also wikis that are multi-lingual for a limited set of languages only. For example, zhwiki and srwiki both feature multiple language variants with can use different alphabets or different number formats. E.g. https://sr.wikipedia.org/sr-el/User:Krinkle/sandbox?oldid=22726377 vs https://sr.wikipedia.org/sr-ec/User:Krinkle/sandbox?oldid=22726377.

One is also free to use multiple languages within a single page. We already do this in one obvious case (user language vs content language). When browsing English Wikipedia with a Hebrew user account, different portions of the page match either lang=en/dir=ltr or lang=he/dir=rtl.

It is unclear to me whether or not this premise has been adjusted since then.

The premise has been adjusted and split out into a separate patch. Please see https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/549220/12/resources/src/mediawiki.skinning/i18n-ordered-lists.less,unified and note its consistency with the styles we currently ship.

Jdlrobson renamed this task from Update shared.css ordered list rules to Update resources/src/mediawiki.skinning/i18n-ordered-lists.less ordered list rules to be more inclusive of other languages.Mar 26 2021, 6:25 PM

This task is listed as an open subtask of these week's train blocker task (T281161). Can someone confirm that this is indeed a blocker?

This task is listed as an open subtask of these week's train blocker task (T281161). Can someone confirm that this is indeed a blocker?

Nevermind. I see that this task is a subtask of a closed subtask of the train blocker task. :-)