Last modified: 2014-01-27 13:05:15 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T58685, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 56685 - Apply localization when parsing or formatting quantities
Apply localization when parsing or formatting quantities
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: High major (vote)
: ---
Assigned To: Wikidata bugs
quantityvalue
:
Depends on:
Blocks: 54318
  Show dependency treegraph
 
Reported: 2013-11-06 19:25 UTC by Daniel Kinzler
Modified: 2014-01-27 13:05 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Daniel Kinzler 2013-11-06 19:25:05 UTC
QuantityParser and QuantityRenderer currently only support the US style number format. We should use the interface language to determined the locale to use for formatting and parsing numbers.
Comment 1 Gerrit Notification Bot 2013-11-26 19:42:47 UTC
Change 97776 had a related patch set uploaded by Daniel Kinzler:
(bug #56685) make sure commafy can deal with strings.

https://gerrit.wikimedia.org/r/97776
Comment 2 Gerrit Notification Bot 2013-11-26 19:47:02 UTC
Change 97778 had a related patch set uploaded by Daniel Kinzler:
(bug #56685) allow localized output of decimal values.

https://gerrit.wikimedia.org/r/97778
Comment 3 Gerrit Notification Bot 2013-11-26 19:57:48 UTC
Change 97776 merged by jenkins-bot:
(bug #56685) make sure commafy can deal with strings.

https://gerrit.wikimedia.org/r/97776
Comment 4 Gerrit Notification Bot 2013-11-26 20:16:18 UTC
Change 97789 had a related patch set uploaded by Daniel Kinzler:
(bug #56685) localize quantities when formatting

https://gerrit.wikimedia.org/r/97789
Comment 5 Daniel Kinzler 2013-11-26 20:30:27 UTC
Note that Ie0ea0d5b921 and Ia6701a20 only cover formatting, not parsing.

For parsing, a bit of refactoring and infrastructure is needed: we have to 1) allow builder callbacks instead of class names in ValueParserFactory and 2) inject an appropriate builder for DecimalParser and QuantityParser into wgValueParsers. Then we can inject a DecimalParser into the QuantityParser, and a Unlocalizer into the DecimalParser. 

Only then can we register an appropriate builder wgValueParsers when Wikibase is initialized. 

Ideally, the builder(s) for parsers would be constructed and managed in a same way as the builders for formatters. That would however not work with ApiParseValue, which would then need to also be moved into mediawiki... or all the Parsing/Formatting logic could be factored out into a separate module.
Comment 6 Gerrit Notification Bot 2013-11-28 15:01:37 UTC
Change 98100 had a related patch set uploaded by Daniel Kinzler:
(bug #56685) Parsing of localized decimal values.

https://gerrit.wikimedia.org/r/98100
Comment 7 Gerrit Notification Bot 2013-11-28 15:05:04 UTC
Change 98101 had a related patch set uploaded by Daniel Kinzler:
(bug #56685) Parsing of localized quantities.

https://gerrit.wikimedia.org/r/98101
Comment 8 Gerrit Notification Bot 2013-12-04 12:53:59 UTC
Change 97778 merged by jenkins-bot:
(bug #56685) allow localized output of decimal values.

https://gerrit.wikimedia.org/r/97778
Comment 9 Gerrit Notification Bot 2013-12-04 16:13:25 UTC
Change 98100 merged by jenkins-bot:
(bug #56685) Parsing of localized decimal values.

https://gerrit.wikimedia.org/r/98100
Comment 10 Gerrit Notification Bot 2013-12-06 16:18:51 UTC
Change 97789 merged by jenkins-bot:
(bug #56685) localize quantities when formatting.

https://gerrit.wikimedia.org/r/97789
Comment 11 Gerrit Notification Bot 2013-12-06 16:28:04 UTC
Change 98101 merged by jenkins-bot:
(bug #56685) Parsing of localized quantities.

https://gerrit.wikimedia.org/r/98101
Comment 12 Lydia Pintscher 2014-01-22 15:35:51 UTC
During today's demo time we found issues when editing quantities in German.
Comment 13 Lydia Pintscher 2014-01-27 13:05:04 UTC
Ok it seems the issues we were having were based on the difference between setlang and uselang during demo while switching language a lot. This should work fine.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links