thiemowmde added a comment.

A very flexible solution that should work with many languages would be to pass an ordinal version of the number as an additional parameter $2 to all messages (no matter if the message needs an ordinal number or not). This way translators are free to use either the regular or ordinal number whenever their language requires it. For example, a German translator can either use $1. Jahrhundert or $2 Jahrhundert, and both would produce the same output.

The biggest concern here is that whatever code is added to MwTimeIsoFormatter, the same feature set must be added to MwTimeIsoParser. In other words, we can only use the existing NumberFormatter if we are able to parser/unlocalize every single string it outputs. If this is not possible, the best we can do for the moment is to introduce our own OrdinalNumberFormatter and OrdinalNumberParser. They don't need to support all languages right from the start. English, German, and maybe French might be a good start for a first version.

Here is something to start with: http://www.typophile.com/node/42577. Look out for Russian. Numbers have a gender there. Uh.


TASK DETAIL
https://phabricator.wikimedia.org/T95553

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: thiemowmde
Cc: PKM, Liuxinyu970226, TheDJ, Lydia_Pintscher, kaldari, Ricordisamoa, daniel, thiemowmde, Lucie, Amire80, Aklapper, Tobi_WMDE_SW, Wikidata-bugs, JulesWinnfield-hu, Addshore, Conny, Lahi, Gq86, GoranSMilovanovic, Soteriaspace, Jayprakash12345, JakeTheDeveloper, QZanden, Zoranzoki21, LawExplorer, Srdjan_m, MuhammadShuaib, LNDDYL, Psychoslave, aude, Gryllida, Shizhao, Arrbee, Mbch331, Jay8g
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to