Last modified: 2014-05-06 12:16:11 UTC
In order to provide better feedback to users while entering values, errors reported by value parsers should be localizable (and support message parameters). In particular, ParseException should take an error code string and an optional list of parameters in the constructor. We can then create a ParseErrorLocalizer class and use it in a way simmilar to ValidatorErrorLocalizer.
Change 120007 had a related patch set uploaded by Daniel Kinzler: (bug 62824) ParseValue api to return localized errors. https://gerrit.wikimedia.org/r/120007
Change 120007 had a related patch set uploaded by Siebrand: ParseValue api to return localized errors. https://gerrit.wikimedia.org/r/120007
Change 120775 had a related patch set uploaded by Daniel Kinzler: (bug 62824) generic localization for API errors. https://gerrit.wikimedia.org/r/120775
Change 120007 merged by jenkins-bot: (bug 62824) ParseValue api to return localized errors https://gerrit.wikimedia.org/r/120007
Change 120775 had a related patch set uploaded by Siebrand: Generic localization for API errors. https://gerrit.wikimedia.org/r/120775
Change 120775 merged by jenkins-bot: Generic localization for API errors. https://gerrit.wikimedia.org/r/120775
Commit pushed to augmentParseException at https://github.com/DataValues/Interfaces https://github.com/DataValues/Interfaces/commit/15fd8b396466d44e91a9185167a634c9fa2d66e9 Add rawValue and expectedFormat arguments to ValueParsers\ParseException See bug 62824.
Commit pushed to augmentParseException at https://github.com/DataValues/Number https://github.com/DataValues/Number/commit/175b3743bb18be60547ddde3903abd2c5b32fffa Pass rawValue and expectedFormat arguments to ParseExceptions See bug 62824.
Commit pushed to augmentParseException at https://github.com/DataValues/Common https://github.com/DataValues/Common/commit/f0f6ca3ac134d5b0057544a56afd52c5c9057667 Pass rawValue and expectedFormat arguments to ParseExceptions See bug 62824.
Commit pushed to augmentParseException at https://github.com/DataValues/Time https://github.com/DataValues/Time/commit/0460e777e9fadf39a86d033b4ac34ef695337595 Pass rawValue and expectedFormat arguments to ParseExceptions See bug 62824.
First attempt that got -2'd is here: https://github.com/DataValues/Common/pull/4
Commit pushed to augmentParseException at https://github.com/DataValues/Interfaces https://github.com/DataValues/Interfaces/commit/0fa5b3ef12ee66596368a744879c57f56da3129e Add rawValue and expectedFormat arguments to ValueParsers\ParseException See bug 62824.
Commit pushed to augmentParseException at https://github.com/DataValues/Interfaces https://github.com/DataValues/Interfaces/commit/f957c28d646263fd836ca22dfa6be3df8f7dec0a Add rawValue and expectedFormat arguments to ValueParsers\ParseException See bug 62824.
Commit pushed to augmentParseException at https://github.com/DataValues/Time https://github.com/DataValues/Time/commit/00fce6742af88b9194f6d78e92afaccd0c0e5508 Pass rawValue and expectedFormat arguments to ParseExceptions See bug 62824.
Change 125380 had a related patch set uploaded by Adrian Lang: Use expectedFormat for more specific ParseException localizing https://gerrit.wikimedia.org/r/125380
Commit pushed to augmentParseException at https://github.com/DataValues/Interfaces https://github.com/DataValues/Interfaces/commit/241e5470bb0c01b9cdb26e66bef361b2a11ad4e7 Add rawValue and expectedFormat arguments to ValueParsers\ParseException See bug 62824.
Commit pushed to augmentParseException at https://github.com/DataValues/Time https://github.com/DataValues/Time/commit/72213635b21887d17730f48b81c6b1b582a10943 Pass rawValue and expectedFormat arguments to ParseExceptions See bug 62824.
Change 125380 merged by jenkins-bot: Use expectedFormat for more specific ParseException localizing https://gerrit.wikimedia.org/r/125380
Will be fully supported as soon as data-values/number version 0.6 is released and used in Wikibase.