Page MenuHomePhabricator

{{NUMBEROFARTICLES}} is not formatted according to user language
Closed, DeclinedPublic

Description

Author: dbenbenn

Description:
On the Commons, {{NUMBEROFARTICLES}} displays with a comma as the numeric
separator: 29,949. That's fine for English, but Spanish wants to use . and
other languages might use other separators. MediaWiki currently has a very
inflexible support for different separators in a few cases. For example,
[[MediaWiki:Sitestatstext]] takes variable $2 which is NUMBEROFARTICLES with the
localized separator.

A more flexible solution would be if {{NUMBEROFARTICLES|.}} did the obvious
thing (the variable acts like a template, and uses the first argument as the
separator). Then we could localize that number in places that MediaWiki hasn't
thought of, for example the Spanish version of the Main Page, [[Commons:Portada]].

Obviously the same issue applies to all other numeric variables.


Version: unspecified
Severity: minor

Details

Reference
bz5662

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:11 PM
bzimport set Reference to bz5662.
bzimport added a subscriber: Unknown Object (MLST).

On the special page:
http://commons.wikimedia.org/wiki/Special:Statistics
we use $wgLang which can be the user prefered language, that's why
the numbers are correctly formatted.

But {{NUMBEROFARTICLES}} in an article or in a template is formatted
using $wgContLang which is the site language for content. There is
only one such language which is english for commons.

There is no real way to fix this issue :/

dbenbenn wrote:

What's wrong with my proposed solution, taking the separator as a parameter?
That is certainly within the realm of possibility, whether or not it is feasible
in the current MediaWiki code.

sanbec wrote:

To close wiht a "WONTFIX" is not a good solution. There are many solutions: the
proposed by David or i.e. to force the variable to use the language defined in a
parameter, instead the predetermined by $wgContLang

{{NUMBEROFARTICLES}} uses the $wgContLang localization

{{NUMBEROFARTICLES|es}} (or {{NUMBEROFARTICLES/es}}) uses the spanish localization
{{NUMBEROFARTICLES|en}} uses the english localization