Page MenuHomePhabricator

English doesn't show number of categories
Closed, InvalidPublic

Description

Gentlemen, there I was scratching my head as to why English users are
deprived of knowing just how many categories there are, vs. Chinese
users.

$ cat script
for i in '' ?uselang=zh-tw
do w3m -dump http://en.wikipedia.org/wiki/Hobart,_Tasmania$i
done|grep 'Settlements established in 1803'
$ sh script
Categories: Settlements established in 1803 | Australian capital cities |
6個分類: Settlements established in 1803 | Australian capital cities | Coastal

Note how the 6 is gone in English.
That's because you need to do:

  • MessagesEn.php (revision 50070)

+++ MessagesEn.php (working copy)
-'pagecategories' => '{{PLURAL:$1|Category|Categories}}',
+'pagecategories' => '$1 {{PLURAL:$1|Category|Categories}}',

Probably you blew it for many other strings and languages too.
Or maybe it was on purpose, "too much clutter"?

P.S. Consider adding a space after the number for all Chinese varieties,
not just MessagesYue.php.


Version: 1.15.x
Severity: minor
URL: http://en.wikipedia.org/wiki/Hobart,_Tasmania

Details

Reference
bz18631

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:34 PM
bzimport set Reference to bz18631.
bzimport added a subscriber: Unknown Object (MLST).

The question is why Chinese is showing this mostly non-useful information compared to English translations. Translations should be translations, not customisations. If this information would be deemed useful (I don't think it is[1]), one language departing from the source leaves the other three hundred languages without the improvement.

Also the number must be passed trough $wgLang->formatNum() if it were to be used like this, but it is currently not:

$msg = wfMsgExt( 'pagecategories', array( 'parsemag', 'escapenoentities' ), count( $allCats['normal'] ) );

[1] If people can't count the few categories there is, there is probably too many, imho.

Az, Gan, Gan_hans, Gan_hant, Hak, Lzh, Yue, Zh_hans, Zh_hant all seem to be using $1 outside of the {{PLURAL:}} and need fixing per comment #1

Geez. Next time I'll keep my big mouth shut. "Over here, we need a
doctor." never thinking the perpetrators were just around the corner
with their machine guns, returning to wipe out any remaining
survivors...

(In reply to comment #3)
Didn't meant to sound nasty, but just to state that these kinds of changes should be discussed for the benefit of all languages.

FYI, The Chinese languages does not have the plural word on there so that word usage would be the same for both singular and plural.