Page MenuHomePhabricator

Add plural function to Slovenian localization (sl)
Closed, ResolvedPublic

Description

Author: dejan.papez

Description:
For Slovenian Wikipedia and other Slovenian wikiprojects it would be very useful if
the software allowed for:

Entering up to five sentence forms functionally linked (as parameters of a magic
word) with different numbers displayed by a chosen variable (or any "$n") that
generates a number.

Description of the system with an example:

In the Mediawiki:Sitestatstext message (or on any other page) the following sentence
forms would be entered for the variable NUMBEROFFILES:

  • one form for the number 0
  • one form for the number 1
  • one form for the number 2
  • one form for the number 3
  • one form for the number 4
  • one form for the number 5; this form would be used also for any other higher number

up to and including 100

  • Then the cycle should start anew - repeat itself from the second form = the one

used for number 1 - onwards. The form for number 0 should be used only once: for
number 0.

I imagine these sentence forms and the chosen variable would be entered as parameters
of a magic word (like 'plural' or something) and then displayed accordingly to the
autogenerated number they are linked with and the rules described above. The solution
should also allow entering less than five forms as they are not always different.

Reason:

Slovenian language has three grammmatical numbers (singular, dual, plural) and six
grammatical cases. These are obligatory for nouns, verbs, pronouns, adjectives. See
also:
http://nike.users.idler.fi/betawiki/Betawiki:LanguageSl.php_and_MessagesSl.php#section
-a6d538d13b6e5de7912a9eb02882889c


Version: 1.7.x
Severity: normal

Details

Reference
bz5981

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:14 PM
bzimport set Reference to bz5981.
bzimport added a subscriber: Unknown Object (MLST).
  • Bug 5982 has been marked as a duplicate of this bug. ***

dejan.papez wrote:

forms for numbers three and four are the same

dejan.papez wrote:

I've tried using the PLURAL function in Slovenian Wikipedia after being notified
the bug has been fixed, but it seems that this bug has been fixed incorrectly.

  • <nowiki>{{PLURAL:n|0th form|1st form|2nd form|3rd form (numbers 3&4)|5th etc.

form till 100, then restart}}</nowiki>

  • <nowiki>{{PLURAL:0|članov|član|člana|člani|članov}}</nowiki> works correctly
  • <nowiki>{{PLURAL:1|članov|član|člana|člani|članov}}</nowiki> works correctly
  • <nowiki>{{PLURAL:2|članov|član|člana|člani|članov}}</nowiki> works correctly
  • <nowiki>{{PLURAL:3|članov|član|člana|člani|članov}}</nowiki> should generate

3rdform (number 3), but generates the 2nd

  • <nowiki>{{PLURAL:4|članov|član|člana|člani|članov}}</nowiki> should generate

3rd form (number 4), but generates nothing

  • <nowiki>{{PLURAL:5|članov|član|člana|člani|članov}}</nowiki> should generate

4th form (numbers 5 till 100 then restart), but does nothing

Here someone figured out how it should be done, but don't ask me what he did:
http://nike.users.idler.fi/betawiki/Betawiki:LanguageSl.php_and_MessagesSl.php#section-953b017a8bf2b4baf6c5080ffef8e6da

Another fix is now live and plural should work now.

dejan.papez wrote:

Unfortunately it's still incorrect - it seems to be always a form behind. See a
new demo here: http://sl.wikipedia.org/wiki/Uporabnik:Eleassar/Peskovnik

dejan.papez wrote:

Perhaps the number 0 has been forgotten about? It should have it's own form.

The form for 0 is supposed to be the fifth form given.

dejan.papez wrote:

Oh, that's it? Then it's ok and the bug is fixed. Thanks a lot.

dejan.papez wrote:

No, it's not ok yet. It's ok for magic words. However, when I tried to use
'plural' by 'Mediawiki:Categories' and by other messages that include '$n' it
still doesn't work as it is supposed to. I entered the following:
{{plural:$1|kategorija|kategoriji|kategorije|kategorij|kategorij}} which would
be for {{plural:n|1st|2nd|3rd&4th|5th-100th|0th}}. The software always renders
the same form (i.e. the last one). Try using Special:Random/Category in
Slovenian Wikipedia if you wish.

This should be taken care of rather quickly please, as I already inserted plural
in many messages. Thanks very much!

dejan.papez wrote:

Sorry, I have chosen the wrong message. It works ok.