Closed
Bug 503033
Opened 15 years ago
Closed 15 years ago
Contributions page does not accept non-en-US decimal points
Categories
(addons.mozilla.org Graveyard :: Developer Pages, defect, P3)
addons.mozilla.org Graveyard
Developer Pages
Tracking
(Not tracked)
VERIFIED
FIXED
5.0.8
People
(Reporter: wenzel, Assigned: wenzel)
Details
Attachments
(4 files, 1 obsolete file)
See attached screenshot: When setting up contributions, the localized decimal point should be supported. I suggest we always support the dot, and in addition to that allow whatever the local decimal point is (in German, that would be a comma). localeconv [1] knows. Marking this major, because non-English users will stumble across this almost inevitably. [1] http://us2.php.net/manual/en/function.localeconv.php
Assignee | ||
Comment 1•15 years ago
|
||
In fact, I am unsure why we use a regex for valid money? is_numeric does the separator-thing automatically. Note though that it would not support the point anymore if the correct one for your locale is a comma. May need to str_replace the point to the appropriate local decimal separator before checking with is_numeric.
Comment 2•15 years ago
|
||
We're only supporting USD for this initial launch as we're just testing it out. I thought there was a "(USD)" label after the box but apparently not. Would adding that label be enough for people to realize they need to use decimal points?
Assignee | ||
Comment 3•15 years ago
|
||
Sorry, don't want to sound self-centered, but I don't think all people know that English-speaking countries use a point as a decimal point. I could change the German error message for invalid numbers so that it shows "0.00", which would hopefully make people realize that they need to write it like that, but it feels like a duct-tape fix to me :-/ From what I can tell, however, all other localizers that have translated the string preserved the decimal point rather than localizing the value. I'll change it in the German l10n, but I'd feel bad calling the issue FIXED after this...
Comment 5•15 years ago
|
||
Jeff added an example in r29519. Since we're only supporting USD for this run I'm calling this fixed (or wontfix if you like). If/when we support other currencies we'll make the system more robust, including accepting appropriate decimal points.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
(In reply to comment #5) > Jeff added an example in r29519. Since we're only supporting USD for this run > I'm calling this fixed (or wontfix if you like). If/when we support other > currencies we'll make the system more robust, including accepting appropriate > decimal points. Although I was a bad student in the German class, I would like to point out that the fact that USD is the only supported currency here has nothing to do with this issue. In some languages including German, the decimal separator in a number is represented by a comma no matter which unit the number is in. This is just in the same way that we do not write “12,34 EUR” in the American/British English. See e.g. http://news.google.com/news?ned=de&hl=de&q=USD For now, the current hack (writing “0.00”) is probably much better than no hack. But I wish that this bug will be really fixed in future. > msgstr "Sollte eine positive Zahl zwischen 0.00 and 99.99 sein." and -> und?
Assignee | ||
Comment 7•15 years ago
|
||
(In reply to comment #6) > > msgstr "Sollte eine positive Zahl zwischen 0.00 and 99.99 sein." > and -> und? Haha, wow, thanks ;) r29546. I also agree that this has nothing to do with the currency. Commas stay commas :) Wil, should we add this to an upcoming milestone? I can probably write a simple patch.
Comment 8•15 years ago
|
||
if you like
Assignee | ||
Comment 9•15 years ago
|
||
(In reply to comment #8) > if you like Oh, you know I do.
Severity: major → minor
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 5.0.7 → 5.0.8
Updated•15 years ago
|
Assignee: nobody → fwenzel
Priority: -- → P3
Assignee | ||
Comment 10•15 years ago
|
||
This patch converts localized "commas" to the point we currently require on the fly.
Attachment #389913 -
Flags: review?(clouserw)
Assignee | ||
Updated•15 years ago
|
Status: REOPENED → ASSIGNED
Comment 11•15 years ago
|
||
Comment on attachment 389913 [details] [diff] [review] Patch, rev. 1 typo: $local_info
Attachment #389913 -
Flags: review?(clouserw) → review-
Assignee | ||
Comment 12•15 years ago
|
||
Whoops. Thanks.
Attachment #389913 -
Attachment is obsolete: true
Attachment #389969 -
Flags: review?(clouserw)
Updated•15 years ago
|
Attachment #389969 -
Flags: review?(clouserw) → review+
Assignee | ||
Comment 13•15 years ago
|
||
r30240, thanks.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago → 15 years ago
Keywords: push-needed
Resolution: --- → FIXED
Is it expected that, even on /de/, the "1,25" I entered gets normalized back to "1.25"?
Verified FIXED per the scope of this bug and comment 14; comment 15, if desired, should be a separate bug.
Status: RESOLVED → VERIFIED
Assignee | ||
Comment 17•15 years ago
|
||
(In reply to comment #16) > Verified FIXED per the scope of this bug and comment 14; comment 15, if > desired, should be a separate bug. I agree, thanks. For the scope of this bug, normalizing back to '.' is expected. I intentionally wanted to allow localized decimal points to be *entered* without screwing with the PayPal side of things. Choosing the right decimal point when displaying it on the page, that is probably indeed another bug.
Updated•15 years ago
|
Keywords: push-needed
Updated•8 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•