mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r19649) -Add: plural rule for Maltese
-Fix: plural rule for Irish
This commit is contained in:
parent
b907dfdef8
commit
23c9573b64
@ -392,17 +392,17 @@ static int DeterminePluralForm(int64 count)
|
|||||||
case 2:
|
case 2:
|
||||||
return n > 1;
|
return n > 1;
|
||||||
|
|
||||||
/* Three forms, special case for zero
|
/* Three forms, special case for 0 and ending in 1, except those ending in 11
|
||||||
* Used in:
|
* Used in:
|
||||||
* Latvian */
|
* Latvian */
|
||||||
case 3:
|
case 3:
|
||||||
return n % 10 == 1 && n % 100 != 11 ? 0 : n != 0 ? 1 : 2;
|
return n % 10 == 1 && n % 100 != 11 ? 0 : n != 0 ? 1 : 2;
|
||||||
|
|
||||||
/* Three forms, special case for one and two
|
/* Five forms, special case for one, two, 3 to 6 and 7 to 10
|
||||||
* Used in:
|
* Used in:
|
||||||
* Gaelige (Irish) */
|
* Gaelige (Irish) */
|
||||||
case 4:
|
case 4:
|
||||||
return n == 1 ? 0 : n == 2 ? 1 : 2;
|
return n == 1 ? 0 : n == 2 ? 1 : n < 7 ? 2 : n < 11 ? 3 : 4;
|
||||||
|
|
||||||
/* Three forms, special case for numbers ending in 1[2-9]
|
/* Three forms, special case for numbers ending in 1[2-9]
|
||||||
* Used in:
|
* Used in:
|
||||||
@ -465,6 +465,12 @@ static int DeterminePluralForm(int64 count)
|
|||||||
default:
|
default:
|
||||||
NOT_REACHED();
|
NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Four forms: one, 0 and everything ending in 02..10, everything ending in 11..19.
|
||||||
|
* Used in:
|
||||||
|
* Maltese */
|
||||||
|
case 12:
|
||||||
|
return (n == 1 ? 0 : n == 0 || (n % 100 > 1 && n % 100 < 11) ? 1 : (n % 100 > 10 && n % 100 < 20) ? 2 : 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ static const PluralForm _plural_forms[] = {
|
|||||||
{ 1, "Only one form" },
|
{ 1, "Only one form" },
|
||||||
{ 2, "Two forms, singular used for zero and 1" },
|
{ 2, "Two forms, singular used for zero and 1" },
|
||||||
{ 3, "Three forms, special case for 0 and ending in 1, except those ending in 11" },
|
{ 3, "Three forms, special case for 0 and ending in 1, except those ending in 11" },
|
||||||
{ 3, "Three forms, special case for 1 and 2" },
|
{ 5, "Five forms, special case for one, two, 3 to 6 and 7 to 10" },
|
||||||
{ 3, "Three forms, special case for numbers ending in 1[2-9]" },
|
{ 3, "Three forms, special case for numbers ending in 1[2-9]" },
|
||||||
{ 3, "Three forms, special cases for numbers ending in 1 and 2, 3, 4, except those ending in 1[1-4]" },
|
{ 3, "Three forms, special cases for numbers ending in 1 and 2, 3, 4, except those ending in 1[1-4]" },
|
||||||
{ 3, "Three forms, special case for 1 and some numbers ending in 2, 3, or 4" },
|
{ 3, "Three forms, special case for 1 and some numbers ending in 2, 3, or 4" },
|
||||||
@ -163,6 +163,7 @@ static const PluralForm _plural_forms[] = {
|
|||||||
{ 2, "Two forms, singular used for everything ending in 1 but not in 11" },
|
{ 2, "Two forms, singular used for everything ending in 1 but not in 11" },
|
||||||
{ 3, "Three forms, special case for 1 and 2, 3, or 4" },
|
{ 3, "Three forms, special case for 1 and 2, 3, or 4" },
|
||||||
{ 2, "Two forms, cases for numbers ending with a consonant and with a vowel" },
|
{ 2, "Two forms, cases for numbers ending with a consonant and with a vowel" },
|
||||||
|
{ 4, "Four forms: one, 0 and everything ending in 02..10, everything ending in 11..19" },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Flags:
|
/* Flags:
|
||||||
|
Loading…
Reference in New Issue
Block a user