bugGNU gettext - Bugs: bug #45591, Slovenian plural string to be...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #45591: Slovenian plural string to be changed in documentation

Submitter:  None
Submitted:  Mon 20 Jul 2015 09:41:28 PM UTC
Votes: 10
 
Category:  Plural forms Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  haible
Open/Closed:  Open

Jump to the original submission

Thu 30 Aug 2018 10:25:17 AM UTC, comment #16: 


> We tried to find a single, simple and general rule for all languages covered by gettext. In the system we have, the singular form is assigned to the first element in the array, and all the others follow. The first element of the array happens to be indexed by 0.


Primoz: what did you adopt for languages that have a plural form for "zero" (like Arabic for example)?

Personally I adopted the order 'zero', 'one', 'two', 'few', 'many', 'others'.
So, if a language has only 'one' and 'other' (like English), we'd have that

  • index 0 is 'one'
  • index 1 is 'others'

If a language has only 'one', 'two', 'few', 'other' (like Slovenian), we'd have

  • index 0 is 'one'
  • index 1 is 'two'
  • index 2 is 'few'
  • index 3 is 'other'


If a language has all the cases, we'd have

  • index 0 is 'zero'
  • index 1 is 'one'
  • index 2 is 'two'
  • index 3 is 'few'
  • index 4 is 'many'
  • index 5 is 'other'



And PS: I think that adding headers describing the plural cases would be very helpful - see http://lists.gnu.org/archive/html/bug-gettext/2015-02/msg00018.html

Michele Locati <mlocati>
Thu 30 Aug 2018 09:30:36 AM UTC, comment #15: 

As someone who has been contributing Slovene translations for GNU programs for over 20 years, let me add my 2 cents. Reading the whole thread, I believe I can summarize the positions of Bruno and Bernard as following:

Bruno: We tried to find a single, simple and general rule for all languages covered by gettext. In the system we have, the singular form is assigned to the first element in the array, and all the others follow. The first element of the array happens to be indexed by 0.

Bernard: In Slovene, the form for "5 or more" happens to coincide with the form for "0", so it is more practical to permute the indices and start with the form which covers both "5 or more" and "0", which is then assigned the index 0, singular form is assigned the index 1, dual form is assigned the index 2, and the form for "3 or 4" is assigned the index 3. The rule for Slovene currently listed is not incorrect, but it is impractical and the translators use the permuted one.

This is not a linguistic issue. It is merely a question whether to stick with a uniform rule for all or allow a small deviation. We are not seeking an universal truth here. The convention to index the first element of an array with 0 is also just a convention used by C and many other programming languages, but in fortran, for example, the first element of the array is indexed by 1 (fortran 90 made this more flexible, though).

I am certainly lacking the broad overview over different languages that I know Bruno has, but at least English would equally benefit from the same rearrangement. The present scheme leads, for example, to:

0: "1 file moved"
1: "0 files moved"

I am not suggesting that other languages should change their rules, though. :)

Primoz Peterlin <peterlin>
Mon 27 Aug 2018 10:52:34 AM UTC, comment #14: 

Exactly! It is not about the grammar. It is all about msgstr order. And yes it could be used for all other languages.

This bug is only for Slovenian as we want to leave the decision for each community to decide for themselves.

The Slovene community has decided in cca 2001 to use the order proposed for mnemonics reasons. It is much less prone to errors; you just translate the sentence for the number in msgstr[n] - otherwise you need to shift it in the brain, which you tend to forget or the visual representation of the number just slips in the translation and you make a mistake.

Unfortunately, the old form keeps to reappearing due to gettext being defacto standard. Each time a new project appears it is started with wrong string or old projects get "harmonised" with the gettext string and this causes us pain.

Bernard Banko <beernarrd>
Mon 27 Aug 2018 09:55:36 AM UTC, comment #13: 

I'm writing this just for the sake of clarity.

Let's start from CLDR. Unicode CLDR defines these rules for the plurals of Slovenian:

one: v = 0 and i % 100 = 1
two: v = 0 and i % 100 = 2
few: v = 0 and i % 100 = 3..4 or v != 0
other: any other case


Translated to gettext (where v == 0 and i is n), we'd have:

one: n % 100 == 1
two: n % 100 == 2
few: n % 100 == 3 || n % 100 == 4
other: any other case


In gettext we currently have:

plural = n % 100 == 1 ? 0 : n % 100 == 2 ? 1 : n % 100 == 3 || n % 100 == 4 ? 2 : 3;


which leads to:

msgstr[0] for 'one' (n % 100 == 1)
msgstr[1] for 'two' (n % 100 == 2)
msgstr[2] for 'few' (n % 100 == 3 || n % 100 == 4)
msgstr[3] for 'other'


The new formula suggesed here is:

plural = n % 100 == 1 ? 1 : n % 100 == 2 ? 2 : n % 100 == 3 || n % 100 == 4 ? 3 : 0;


which leads to:

msgstr[0] for 'other'
msgstr[1] for 'one' (n % 100 == 1)
msgstr[2] for 'two' (n % 100 == 2)
msgstr[3] for 'few' (n % 100 == 3 || n % 100 == 4)


So, what changes here is not the criteria to determine the four plural cases (one, two, few, other), but the order of msgstr:
- in gettext we have 'one', 'two', 'few', 'other'
- the proposed change implies 'other', 'one', 'two', 'few'

So, this change is not strictly about Slovenian (it could be Klingonese for what is worth), but about the order of the plural cases.

And PS: I might be wrong, but it seems to me that currently all the languages follows the order
'zero', 'one', 'two', 'few', 'many', 'others'
and not
'others', 'zero', 'one', 'two', 'few', 'many'

Michele Locati <mlocati>
Sun 26 Aug 2018 09:13:47 PM UTC, comment #12: 

There are more, check the list of Kozma Ahačič:
https://fran.si/slovnice-in-pravopisi/

1 Bajec, Kolarič, Rupel: Slovenska slovnica, DZS 1964, page 194.
2 Breznik: Slovenska slovnica za srednje šole, Mohorjeva 1936, page 103
3 Bohorič: Arcticae horulae succisivae de Latinocarniolana literatura, haeredes Iohan Cratonis 1584, page 71
4 Kopitar: Grammatik der Slavischen Sprache in Krain, Kärnten und Steyermark, Wilhelm Heinrich Horn 1808, page 276
5 Levstik: Die ſloveniſche Sprache nach ihren Redetheilen, Giontini 1866, page 31.

I will not put Toporišič for copyright reasons.

Bernard Banko <beernarrd>
Sun 26 Aug 2018 07:29:58 PM UTC, comment #11: 


> So.. what do I need to do to have this bug reopened?


Pick the 5 (five) most popular books that describe Slovenian grammar, and for each of them
- state the authors, title, edition, and year,
- attach a scan/photo of the page that describes the plural rules with numerals.

Bruno Haible <haible>
Group administrator
Sun 26 Aug 2018 06:47:18 PM UTC, comment #10: 

So.. what do I need to do to have this bug reopened?

Bernard Banko <beernarrd>
Sun 26 Aug 2018 06:41:13 PM UTC, comment #9: 


> I can understand you about the Belarus scenario.


The Belarus issue was tied to the orthography. Now I can read in Wikipedia that in Belarus, the "new" orthography introduced in 1933 is used, but the "Belarusian diaspora abroad" prefers the 'tarask' orthography. But at the time of the dispute, this was not known to me, and the Belarus translation team was dominated by people outside Belarus. - So, I have learned to be careful about whom to believe in language issue disputes.

> See Credits: "Plural rules and families derived from GNU gettext documentation."


OK, I didn't see that :-) I withdraw this reference.

> Declension has not much to do with correspondence of numerals and nouns.


Yes, it's also about adjectives and verbs. I know.

> The last one is wrong, should be n=0||n>=5


This is actually an indication that people think less about the case n=0, and explains why the case n=1 is most often seen as the first one.

Bruno Haible <haible>
Group administrator
Sun 26 Aug 2018 02:23:07 PM UTC, comment #8: 

Your conclusion is wrong.

1) Declension has not much to do with correspondence of numerals and nouns. Which is why it is not present on this wiki page. See Metod Čepar, 2017: Slovenski števniki, poljudna razlaga. Jezikovna svetovalnica, http://svetovalnica.zrc-sazu.si/, Dostop 26. 08. 2018.

2) Your formula does not come from the quoted wiki. The last one is wrong, should be n=0||n>=5

3) Now I am insulted: you qoute a reference that references back to you (which is exactly why your formula is a bug). See Credits: "Plural rules and families derived from GNU gettext documentation."

I can understand you about the Belarus scenario. But this is Slovenian scenario. By keeping 17 years (see http://web.archive.org/web/20060507045614/http://old_www.lugos.si/arhiv/prispevki/gettext/) status quo you are actually voicing your own opinion at expense of majority; you are actively influencing the majority:minority ratio. It's like one country would meddle in another country's election.

Bernard Banko <beernarrd>
Sun 26 Aug 2018 12:34:28 PM UTC, comment #7: 


> I am just letting you know that translators and speakers [insult skipped] decided years ago to use a different plural form expression that the one you are keen to have.


They are free to use any plural form expression they like. That's why the expression can be set in the header of the PO file, by the translator.

You have to prove the validity of what you say. Even the opinion of 5 or 10 translators doesn't count, because I've seen disputes between Belarus advocates where it turned out that an entire Belarus translators team was voicing a minority opinion.

The evidence I can find on the internet is clear:

1) https://en.wikipedia.org/wiki/Slovene_declension#Nouns does not mention the case with numerals.

2) https://en.wikipedia.org/wiki/Dual_(grammatical_number)#Slovene mentions the case with numerals and enumerates them in the order (n=1, n=2, n=3||n=4, n>=5).

3) https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals likewise.

So, I conclude that what you say is a minority position.

Bruno Haible <haible>
Group administrator
Sun 26 Aug 2018 11:02:45 AM UTC, comment #6: 

In gettext documentation examples, I happen to like the last one. I can understand that you might like all the others.

Nevertheless, you are missing the point here. I am not teaching you how to count in English. I am not teaching you what you should use in what you are doing.

I am just letting you know that translators and speakers of a language that you probably have never heard decided years ago to use a different plural form expression that the one you are keen to have. By doing this you are setting a standard that no one wants and inflicting to others a yoke you will never use anyway.
Unhappy translators don't translate. Without translation any plural form expression is pointless.

I have just one popular book though:

Gorjancev naših jezik potujčvavši
si kriv, da kolne kmet molitve bravši

Bernard Banko <beernarrd>
Sun 26 Aug 2018 12:46:03 AM UTC, comment #5: 

When you look through the formulas in the gettext documentation https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html#Plural-forms, you see that all but the last one map n=1 to the number 0. This is because when children learn to count, it is through "one, two, three, ...", not "zero, one, two, three, ...".

If you want to prove that this manner of designating plural forms is unnatural for Slovenian, please pick the 5 (five) most popular books that describe Slovenian grammar, and for each of them
- state the authors, title, and edition,
- attach a scan/photo of the page that describes the plural rules.

Bruno Haible <haible>
Group administrator
Sun 26 Aug 2018 12:40:31 AM UTC, comment #4: 

You can't argue with CLDR here, because in CLDR the plural forms are not designated by integers but by names ('one', 'two', 'few', 'other', 'many', etc.). See http://cldr.unicode.org/index/cldr-spec/plural-rules and https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html

Bruno Haible <haible>
Group administrator
Thu 25 Jan 2018 09:53:54 PM UTC, comment #3: 

Clarification using unicode CLRD table:

We want to have this (for at least 16 years, actually):
msgid[*0*] = CLRD other {*0*, 5..100, 105..200, ...}
msgid[*1*] = CLRD one {*1*, 101, 201, ...}
msgid[*2*] = CLRD two {*2*, 102, 202, ...}
msgid[*3*] = CLRD few {*3*,4; 103,104...}

Bernard Banko <beernarrd>
Thu 25 Jan 2018 06:15:10 PM UTC, comment #2: 

The topic reappears on other opensource projects because they refere to GNU gettext documentation. See https://github.com/translate/l10n-guide/issues/22

We need to change from:

The header entry would look like this:

Plural-Forms: nplurals=4; \
    plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3;


to this:


The header entry could look like this:

Plural-Forms: nplurals=4; \
    plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3;

But it is obsolete. The recomended form is:

Plural-Forms: nplurals=4; \
    plural=n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0;

This form is more intuitive for the translators because msgid index matches to the numeral:

msgid "%d file in directory %s\n"
msgid_plural "%d files in directory %s\n"
msgstr[0] "v imeniku %2$s je %1$d datotek\n"
msgstr[1] "v imeniku %2$s je %1$d datoteka\n"
msgstr[2] "v imeniku %2$s sta %1$d datoteki\n"
msgstr[3] "v imeniku %2$s so %1$d datoteke\n"


Bernard Banko <beernarrd>
Mon 03 Aug 2015 06:30:54 AM UTC, comment #1: 


> 2) msgid(n) index corresponds to gramatical number:
> msgid[1] for 1 apple, msgid[2] for 2 apples .. msgid[0] for 0 or 5 and more apples.


This is not true for Germanic languages whose plural form is:

  Plural-Forms: nplurals=2; plural=n != 1;

where msgid[0] is used if n == 1.

I agree with the change nevertheless, if the rule is already widely used.

Daiki Ueno <ueno>
Group administrator
Mon 20 Jul 2015 09:41:28 PM UTC, original submission:  

Slovenian has for historical reasons two plural-forms strings in circulation. The one cited it gettext documentation should be deprecated.

The good one is:
nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 or n%100==4 ? 3 : 0)

Explanation
1) Used at least since 2001 (http://web.archive.org/web/20060507045614/http://old_www.lugos.si/arhiv/prispevki/gettext/)
2) msgid(n) index corresponds to gramatical number:
msgid[1] for 1 apple, msgid[2] for 2 apples .. msgid[0] for 0 or 5 and more apples.
3) Recommended in slovenian linux users group, Gnome localisation, Launchpad.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #44861:  0001-Slovenian-plural-string-updated.patch added by beernarrd (2KiB - text/x-patch - Patch file for doc and plural table)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by peterlin (Posted a comment)
  • -email is unavailable- added by mlocati (Posted a comment)
  • -email is unavailable- added by beernarrd (Voted in favor of this item)
  • -email is unavailable- added by beernarrd (Posted a comment)
  • -email is unavailable- added by haible (Updated the item)
  • -email is unavailable- added by ueno (Posted a comment)
  •  

    There are 10 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-08-27 haible StatusInvalid None
        Open/ClosedClosed Open
    2018-08-26 haible StatusNeed Info Invalid
        Assigned toNone haible
        Open/ClosedOpen Closed
    2018-08-26 haible StatusNone Need Info
    2018-08-25 beernarrd Attached File- Added 0001-Slovenian-plural-string-updated.patch, #44861
    2018-01-26 beernarrd Carbon-Copy- Added beernarrd
    2016-11-27 haible CategoryNone Plural forms

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code