[wp-meta] [Making WordPress.org] #7959: Changing thousands separator on download counter page
Making WordPress.org
noreply at wordpress.org
Sat Apr 19 12:37:43 UTC 2025
#7959: Changing thousands separator on download counter page
--------------------------------+--------------------
Reporter: threadi | Owner: (none)
Type: defect (bug) | Status: new
Priority: low | Milestone:
Component: WordPress.org Site | Keywords:
--------------------------------+--------------------
I have noticed the following with https://wordpress.org/download/counter/
for some time now:
When loading for the first time, the number is displayed with a comma as a
thousands separator. Example:
{{{
7,438,998
}}}
As soon as the AJAX request for updating runs, it is suddenly a point as a
separator. Example:
{{{
7.439.094
}}}
You probably have to open the page with a non-English browser to reproduce
this, especially if the language uses thousands separators other than “,”.
I would have liked to offer a solution for this directly, but I am unsure
how this is done in wporg-main-2022.
I assume (!) the AJAX request already does it correctly. Here the function
https://developer.wordpress.org/reference/functions/number_format_i18n/ is
used which uses the language-specific “thousands_sep”. Since I have a
German-language browser, I assume (!) that the dot is used in the AJAX
request. If this is the case, the problem would rather be the initial call
of the page, which uses exactly the same function:
https://github.com/WordPress/wporg-main-2022/blob/trunk/source/wp-
content/themes/wporg-main-2022/src/download-counter/index.php#L41
My assumption is therefore: in one of the two cases, $wp_locale is not
set, which results in the difference.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/7959>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list