summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2013-03-10 11:02:11 +0000
committerplanetmaker <planetmaker@openttd.org>2013-03-10 11:02:11 +0000
commit3c2d8cc28d4fda299a15f67d13bf1af01c44cc5a (patch)
tree2a246a5831463fd948d3bcc970abf9e6c75f625e /src
parentf1c53da2565a3623f727f7d5da654fd5eed95681 (diff)
downloadopenttd-3c2d8cc28d4fda299a15f67d13bf1af01c44cc5a.tar.xz
(svn r25078) -Add: New plural form to be used by Scottish Gaelic (1,11; 2,12; 3..10, 13..19; other)
Diffstat (limited to 'src')
-rw-r--r--src/strings.cpp5
-rw-r--r--src/table/strgen_tables.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/strings.cpp b/src/strings.cpp
index 94de57f6f..054ebb5ca 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -617,6 +617,11 @@ static int DeterminePluralForm(int64 count, int plural_form)
* Maltese */
case 12:
return (n == 1 ? 0 : n == 0 || (n % 100 > 1 && n % 100 < 11) ? 1 : (n % 100 > 10 && n % 100 < 20) ? 2 : 3);
+ /* Four forms: special cases for 1 and 11, 2 and 12, 3 .. 10 and 13 .. 19, other
+ * Used in:
+ * Scottish Gaelic */
+ case 13:
+ return ((n == 1 || n == 11) ? 0 : (n == 2 || n == 12) ? 1 : ((n > 2 && n < 11) || (n > 12 && n < 20)) ? 2 : 3);
}
}
diff --git a/src/table/strgen_tables.h b/src/table/strgen_tables.h
index ed405aa48..274d70abf 100644
--- a/src/table/strgen_tables.h
+++ b/src/table/strgen_tables.h
@@ -174,6 +174,7 @@ static const PluralForm _plural_forms[] = {
{ 3, "Three forms: special cases for 1, and 2 to 4.", "\"1\" \"2..4\" \"other\"" },
{ 2, "Two forms: cases for numbers ending with a consonant, and with a vowel.", "\"yeong,il,sam,yuk,chil,pal\" \"i,sa,o,gu\"" },
{ 4, "Four forms: special cases for 1, 0 and numbers ending in 02 to 10, and numbers ending in 11 to 19.", "\"1\" \"0,2..10,102..110,202..210,...\" \"11..19,111..119,211..219,...\" \"other\"" },
+ { 4, "Four forms: special cases for 1 and 11, 2 and 12, 3..10 and 13..19.", "\"1,11\" \"2,12\" \"3..10,13..19\" \"other\"" },
};
/* Flags: