62.40 KB, image/jpeg
1011 bytes, patch
|Details | Diff | Splinter Review|
315.57 KB, image/png
339.63 KB, image/png
Created attachment 387400 [details] Screenshot 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  knows. Marking this major, because non-English users will stumble across this almost inevitably.  http://us2.php.net/manual/en/function.localeconv.php
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.
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?
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...
I changed it to "0.00" etc in de: r29515.
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
Last Resolved: 9 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?
(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.
if you like
(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
Created attachment 389913 [details] [diff] [review] Patch, rev. 1 This patch converts localized "commas" to the point we currently require on the fly.
Attachment #389913 - Flags: review?(clouserw)
Comment on attachment 389913 [details] [diff] [review] Patch, rev. 1 typo: $local_info
Attachment #389913 - Flags: review?(clouserw) → review-
Created attachment 389969 [details] [diff] [review] Patch, rev. 2 Whoops. Thanks.
Attachment #389969 - Flags: review?(clouserw) → review+
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago → 9 years ago
Resolution: --- → FIXED
Created attachment 390295 [details] Post-fix screenshot, part deux, showing that "1,25" gets rewritten as "1.25" 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
(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.
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.