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,6 +61,7 @@ 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 + char separator[8]; // thousand separator byte pad[3]; // 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 = strecpy(buff, _langpack->separator, last); } divisor /= 10; Index: src/strgen/strgen.cpp =================================================================== --- src/strgen/strgen.cpp (Revision 14286) +++ src/strgen/strgen.cpp (Arbeitskopie) @@ -42,6 +42,7 @@ char isocode[16]; // the ISO code for the language (not country code) uint16 offsets[32]; // the offsets byte plural_form; // plural form index + char separator[8]; // thousand separator byte pad[3]; // pad header to be a multiple of 4 }; @@ -94,6 +95,7 @@ static uint32 _hash; static char _lang_name[32], _lang_ownname[32], _lang_isocode[16]; +static char _lang_separator[8]; 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)) { + ttd_strlcpy(_lang_separator, str + 10, sizeof(_lang_separator)); } else if (!memcmp(str, "plural ", 7)) { _lang_pluralform = atoi(str + 7); if (_lang_pluralform >= lengthof(_plural_form_counts)) @@ -911,6 +915,8 @@ /* 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[0] = ','; + _lang_separator[1] = '\0'; // TODO:!! We can't reset the cases. In case the translated strings // derive some strings from english.... @@ -1159,6 +1165,7 @@ hdr.ident = TO_LE32(0x474E414C); // Big Endian value for 'LANG' hdr.version = TO_LE32(_hash); hdr.plural_form = _lang_pluralform; + strcpy(hdr.separator, _lang_separator); strcpy(hdr.name, _lang_name); strcpy(hdr.own_name, _lang_ownname); strcpy(hdr.isocode, _lang_isocode); @@ -1258,7 +1265,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) {