Changeset - r8733:46dfc2fe0147
[Not reviewed]
master
0 3 0
maedhros - 16 years ago 2008-03-25 17:39:02
maedhros@openttd.org
(svn r12417) -Fix: Add a new plural rule for Icelandic.
3 files changed with 8 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/lang/icelandic.txt
Show inline comments
 
##name Icelandic
 
##ownname Íslenska
 
##isocode is_IS
 
##plural 0
 
##plural 9
 
##gender karlkyn kvenkyn hvorugkyn
 

	
 
#
src/strgen/strgen.cpp
Show inline comments
 
@@ -103,7 +103,7 @@ static char _cases[MAX_NUM_CASES][16];
 
static int _numcases;
 

	
 
// for each plural value, this is the number of plural forms.
 
static const byte _plural_form_counts[] = { 2, 1, 2, 3, 3, 3, 3, 3, 4 };
 
static const byte _plural_form_counts[] = { 2, 1, 2, 3, 3, 3, 3, 3, 4, 2 };
 

	
 
static const char *_cur_ident;
 

	
src/strings.cpp
Show inline comments
 
@@ -462,6 +462,12 @@ static int DeterminePluralForm(int64 cnt
 
	 *   Slovenian */
 
	case 8:
 
		return n % 100 == 1 ? 0 : n % 100 == 2 ? 1 : n % 100 == 3 || n % 100 == 4 ? 2 : 3;
 

	
 
	/* Two forms; singular used for everything ending in 1 but not in 11.
 
	 * Used in:
 
	 *   Icelandic */
 
	case 9:
 
		return n % 10 == 1 && n % 100 != 11 ? 0 : 1;
 
	}
 
}
 

	
0 comments (0 inline, 0 general)