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)".

Details

Related Gerrit Patches:

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJul 6 2016, 7:07 PM
revi added a subscriber: revi.Jul 6 2016, 7:08 PM
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".

revi added a comment.Jul 6 2016, 7:09 PM

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

thiemowmde updated the task description. (Show Details)Jul 7 2016, 7:28 AM

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:

hoo added a subscriber: hoo.Jul 7 2016, 9:18 AM

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 closed this task as Resolved.Jul 7 2016, 9:20 AM
hoo removed a project: Patch-For-Review.
hoo moved this task from Review to Done on the Wikidata-Sprint-2016-07-05 board.