From d4c3d01d07980708e86c3532422b4bf437aabb64 Mon Sep 17 00:00:00 2001 From: Nicolae Crefelean Date: Sat, 10 Apr 2021 17:33:27 +0200 Subject: Add: new plural form for Romanian translation (#8936) --- src/lang/romanian.txt | 2 +- src/strings.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lang/romanian.txt b/src/lang/romanian.txt index 889268e22..42ec4d24b 100644 --- a/src/lang/romanian.txt +++ b/src/lang/romanian.txt @@ -1,7 +1,7 @@ ##name Romanian ##ownname Românӑ ##isocode ro_RO -##plural 0 +##plural 14 ##textdir ltr ##digitsep . ##digitsepcur . 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; } } -- cgit v1.2.3-70-g09d2