src/strgen/strgen.cpp
changeset 5725 0ec667093bc1
parent 5609 dc6a58930ba4
child 5832 974703f615e5
--- a/src/strgen/strgen.cpp	Thu Jan 18 15:26:52 2007 +0000
+++ b/src/strgen/strgen.cpp	Thu Jan 18 15:27:57 2007 +0000
@@ -913,12 +913,12 @@
 
 	_file = file;
 
-	// For each new file we parse, reset the genders.
+	/* For each new file we parse, reset the genders, and language codes */
 	_numgenders = 0;
+	_lang_name[0] = _lang_ownname[0] = _lang_isocode[0] = '\0';
 	// TODO:!! We can't reset the cases. In case the translated strings
 	// derive some strings from english....
 
-
 	in = fopen(file, "r");
 	if (in == NULL) fatal("Cannot open file");
 	_cur_line = 1;
@@ -928,6 +928,10 @@
 		_cur_line++;
 	}
 	fclose(in);
+
+	if (StrEmpty(_lang_name) || StrEmpty(_lang_ownname) || StrEmpty(_lang_isocode)) {
+		fatal("Language must include ##name, ##ownname and ##isocode");
+	}
 }