Page MenuHomePhabricator

[Bug] MwTimeIsoParser should not unlocalize based on empty messages
Closed, ResolvedPublic

Description

MwTimeIsoParser kicks in when the user enters a number (and only a number) and there is a message in the current user language that consists of nothing but "$1". Such cases should be skipped.

For the current translations, the following messages do have this problem. They all should be fixed because this does not only cause this bug in the parser, it's also confusing when the formatter shows "2010" for a decade. When a language does not have a concept of "decade", the message should at least say something like "$1 (10 years)".

Event Timeline

thiemowmde triaged this task as Medium priority.Jul 6 2016, 7:09 PM
thiemowmde moved this task from incoming to consider for next sprint on the Wikidata board.

Subtask: Check all existing translations for "$1".

The edit that lead to recognize this problem was this one.

Change 297754 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
MwTimeIsoParser should not unlocalize based on empty messages

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

Patches for review:

I just +2ed/ merged all relevant changes. What we do here is not nice, but seems like the best thing we can do offhand… for example MwTimeIsoParser already has a few shortcomings anyway (it wont be able to parse all formatted dates).

Change 297754 merged by jenkins-bot:
MwTimeIsoParser should not unlocalize based on empty messages

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

hoo removed a project: Patch-For-Review.
hoo moved this task from Review to Done on the Wikidata-Sprint-2016-07-05 board.