Opened 12 years ago
Closed 11 years ago
#29819 closed defect (bug) (invalid)
PHP Number Format (Decimal Point) of ru_RU
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 4.0 |
| Component: | I18N | Keywords: | |
| Focuses: | Cc: |
Description
Issue:
Decimals with comma are not accepted by a "padding" value measured in percents.
Details:
There is a data in Russian translation of WP 4.0 (ru_RU.po):
#: wp-includes/locale.php:177 msgid "number_format_decimal_point" msgstr ","
This block changes default "." separator by new "," that is commonly used in Russia.
After that - many things (like "padding" with decimals measured in percents) stops to work at all. For example, some plugins using viewport calculation in their code, and outcome will be wrong with a comma.
Suggestion: It is allowed to use "." with decimals in Russia, so maybe roll it back?
Change History (5)
#2
in reply to:
↑ 1
@
12 years ago
Replying to SergeyBiryukov:
The decimal comma is not only used in Russian, but also in many other languages.
It also depends on PHP locale, see #18460, #19593, #19624.
If there's a particular issue in WordPress core, we should fix it like we did in [18608] or [20675].
If there's an issue with a plugin, it should be reported to the plugin author.
Thank you for an answer, Sergey!
Faulted plugin's author is aware of the issue now, and he probably will try to solve it from his side (override this value somehow, or maybe will not use decimals). But still, it can be a problem with other, different plugins and themes itself that performing calculation of paddings and other style things.
As temporary solution - I had changed "ru_Ru" to "en_EN" in my wp_config.php
Tnx!
#3
@
12 years ago
But still, it can be a problem with other, different plugins and themes itself that performing calculation of paddings and other style things.
The number_format_decimal_point value from the .po file is only used in number_format_i18n() function, built to convert numbers to the format used by a specific locale. It should be used for output and not for calculations.
Calculations, however, depend on PHP locale, and changing that value does not affect it.
We should educate plugin and theme authors and deal with these issues on a case-by-case basis instead of making number_format_decimal_point non-localizable.
The decimal comma is not only used in Russian, but also in many other languages.
It also depends on PHP locale, see #18460, #19593, #19624.
If there's a particular issue in WordPress core, we should fix it like we did in [18608] or [20675].
If there's an issue with a plugin, it should be reported to the plugin author.