Page MenuHomePhabricator

Add support for ordinal numbers
Open, MediumPublic

Description

Right now, MediaWiki has no way to localize '1st', '2nd', '3rd', etc. The CLDR database includes rules for creating ordinal numbers but these rules are not currently extracted or utilized by the cldr extension.

The rules are ruleset type="digits-ordinal-indicator" in core/common/rbnf. Here is a sample for English:

<ruleset type="digits-ordinal-indicator" access="private">

<rbnfrule value="0">th;</rbnfrule>
<rbnfrule value="1">st;</rbnfrule>
<rbnfrule value="2">nd;</rbnfrule>
<rbnfrule value="3">rd;</rbnfrule>
<rbnfrule value="4">th;</rbnfrule>
<rbnfrule value="20">→→;</rbnfrule>
<rbnfrule value="100">→→;</rbnfrule>

</ruleset>


Version: unspecified
Severity: enhancement

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:41 AM
bzimport set Reference to bz57903.
bzimport added a subscriber: Unknown Object (MLST).

This is being requested for the KeepGoing feature in MobileFrontend (https://www.mediawiki.org/wiki/Extension:MobileFrontend/KeepGoing). We're probably just going to change the requirements for now.

Change 678307 had a related patch set uploaded (by Jon Harald Søby; author: Jon Harald Søby):

[mediawiki/core@master] Add ordinal transformation as GRAMMAR for English

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

Test wiki created on Patch Demo by Jon Harald Søby using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/34a3f67b1f/w/