Page MenuHomePhabricator

Minor grammar problem with MediaWiki:Viewcount
Closed, ResolvedPublic

Description

Author: patrick

Description:
When the view count of a page=1, the associated "viewcount" string in the translation is still in plural form, so you end up with something like "This page has
been accessed 1 times". Minor, but pretty easy to fix. Easiest fix may be to add a second translation string, e.g. viewcount_s (for singular) that's used when
present.


Version: 1.7.x
Severity: normal

Details

Reference
bz4737

Event Timeline

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

ezyang wrote:

Note that by editing [[MediaWiki:Viewcount]], you can simply put "time(s)".

gangleri wrote:

Hallo!

This is similar to [[MediaWiki:Categories]] and
[[MediaWiki:Categories1]].

Some LanguagesXx.php support {{PLURAL:foo}}.

If [[MediaWiki:Viewcount]] suports wikitext why not use
This page has been accessed $1 {{PLURAL:$1|time}}.
or {{PLURAL:time|$1}} depending on the syntax.

best regards reinhardt [[user:gangleri]]

I tried patching mw trunk using the following patch:

Index: languages/Messages.php

  • languages/Messages.php (revision 13910)

+++ languages/Messages.php (working copy)
@@ -211,7 +211,7 @@
'redirectedfrom' => '(Redirected from $1)',
'redirectpagesub' => 'Redirect page',
'lastmodified' => 'This page was last modified $1.',
-'viewcount' => 'This page has been accessed $1 times.',
+'viewcount' => 'This page has been accessed $1
{{plural:$1|time|times}}.',
'copyright' => 'Content is available under $1.',
'protectedpage' => 'Protected page',
'administrators' => 'Project:Administrators',

But it didnt work! (always showing 'times').

Should be fixed in the trunk now, thanks to help of Ashar.

I have put
This page has been accessed {{plural:$1|once|$1 times}}.
as a slight improvement, although we don't see it.

Ideally a little work with expr: would give a robust soln.