Index: src/lang/german.txt =================================================================== --- src/lang/german.txt (Revision 14286) +++ src/lang/german.txt (Arbeitskopie) @@ -3,6 +3,7 @@ ##isocode de_DE ##plural 0 ##gender m w n +##separator . # Index: src/strings.cpp =================================================================== --- src/strings.cpp (Revision 14286) +++ src/strings.cpp (Arbeitskopie) @@ -61,7 +61,8 @@ char isocode[16]; // the ISO code for the language (not country code) uint16 offsets[32]; // the offsets byte plural_form; // how to compute plural forms - byte pad[3]; // pad header to be a multiple of 4 + char separator; // thousand separator + byte pad[2]; // pad header to be a multiple of 4 char data[VARARRAY_SIZE]; // list of strings }; @@ -221,7 +222,7 @@ } if (tot |= quot || i == 19) { *buff++ = '0' + quot; - if ((i % 3) == 1 && i != 19) *buff++ = ','; + if ((i % 3) == 1 && i != 19) *buff++ = _langpack->separator; } divisor /= 10; Index: src/strgen/strgen.cpp =================================================================== --- src/strgen/strgen.cpp (Revision 14286) +++ src/strgen/strgen.cpp (Arbeitskopie) @@ -42,7 +42,8 @@ char isocode[16]; // the ISO code for the language (not country code) uint16 offsets[32]; // the offsets byte plural_form; // plural form index - byte pad[3]; // pad header to be a multiple of 4 + char separator; // thousand separator + byte pad[2]; // pad header to be a multiple of 4 }; struct CmdStruct { @@ -94,6 +95,7 @@ static uint32 _hash; static char _lang_name[32], _lang_ownname[32], _lang_isocode[16]; +static char _lang_separator; static byte _lang_pluralform; #define MAX_NUM_GENDER 8 static char _genders[MAX_NUM_GENDER][8]; @@ -645,6 +647,8 @@ ttd_strlcpy(_lang_ownname, str + 8, sizeof(_lang_ownname)); } else if (!memcmp(str, "isocode ", 8)) { ttd_strlcpy(_lang_isocode, str + 8, sizeof(_lang_isocode)); + } else if (!memcmp(str, "separator ", 10)) { + _lang_separator = str[10]; } else if (!memcmp(str, "plural ", 7)) { _lang_pluralform = atoi(str + 7); if (_lang_pluralform >= lengthof(_plural_form_counts)) @@ -911,6 +915,7 @@ /* For each new file we parse, reset the genders, and language codes */ _numgenders = 0; _lang_name[0] = _lang_ownname[0] = _lang_isocode[0] = '\0'; + _lang_separator = ','; // TODO:!! We can't reset the cases. In case the translated strings // derive some strings from english.... @@ -1159,6 +1164,7 @@ hdr.ident = TO_LE32(0x474E414C); // Big Endian value for 'LANG' hdr.version = TO_LE32(_hash); hdr.plural_form = _lang_pluralform; + hdr.separator = _lang_separator; strcpy(hdr.name, _lang_name); strcpy(hdr.own_name, _lang_ownname); strcpy(hdr.isocode, _lang_isocode); @@ -1258,7 +1264,7 @@ } /** Create a path consisting of an already existing path, a possible - * path seperator and the filename. The seperator is only appended if the path + * path separator and the filename. The seperator is only appended if the path * does not already end with a seperator */ static inline char *mkpath(char *buf, size_t buflen, const char *path, const char *file) {