summaryrefslogtreecommitdiff
path: root/src/strings.cpp
diff options
context:
space:
mode:
authorNicolae Crefelean <kneekoo@yahoo.com>2021-04-10 17:33:27 +0200
committerGitHub <noreply@github.com>2021-04-10 17:33:27 +0200
commitd4c3d01d07980708e86c3532422b4bf437aabb64 (patch)
tree61e4390b9364a412169497a80aba23f05dd66f45 /src/strings.cpp
parent5a14bf3a6ccf08c26b63b4f68d1cdae66f732770 (diff)
downloadopenttd-d4c3d01d07980708e86c3532422b4bf437aabb64.tar.xz
Add: new plural form for Romanian translation (#8936)
Diffstat (limited to 'src/strings.cpp')
-rw-r--r--src/strings.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/strings.cpp b/src/strings.cpp
index 7cbdc3cb0..1f288d308 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -628,6 +628,12 @@ static int DeterminePluralForm(int64 count, int plural_form)
* 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);
+
+ /* Three forms: special cases for 1, 0 and numbers ending in 01 to 19.
+ * Used in:
+ * Romanian */
+ case 14:
+ return n == 1 ? 0 : (n == 0 || (n % 100 > 0 && n % 100 < 20)) ? 1 : 2;
}
}