From 525e2c9e73ecab8913d4eafc6685d89e1653d151 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 21 Aug 2011 19:21:38 +0000 Subject: (svn r22806) -Codechange: store the number of untranslated strings in the language file --- src/strgen/strgen.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/strgen') diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp index d3b86c4ec..9dd5b6fb6 100644 --- a/src/strgen/strgen.cpp +++ b/src/strgen/strgen.cpp @@ -1061,10 +1061,16 @@ static void WriteLangfile(const char *filename) in_use[i] = n; _lang.offsets[i] = TO_LE16(n); + + for (uint j = 0; j != in_use[i]; j++) { + const LangString *ls = _strings[(i << 11) + j]; + if (ls != NULL && ls->translated == NULL) _lang.missing++; + } } _lang.ident = TO_LE32(LanguagePackHeader::IDENT); _lang.version = TO_LE32(_hash); + _lang.missing = TO_LE16(_lang.missing); _lang.winlangid = TO_LE16(_lang.winlangid); fwrite(&_lang, sizeof(_lang), 1, _output_file); -- cgit v1.2.3-70-g09d2