diff --git a/ZRColaCompile/main.cpp b/ZRColaCompile/main.cpp index c695099..c0a3387 100644 --- a/ZRColaCompile/main.cpp +++ b/ZRColaCompile/main.cpp @@ -385,6 +385,8 @@ int _tmain(int argc, _TCHAR *argv[]) } } + set categories_used; + { // Get characters. ATL::CComPtr rs; @@ -425,6 +427,9 @@ int _tmain(int argc, _TCHAR *argv[]) idxChrDsc .add_keywords(chr.keywords.c_str(), chr.chr, 0); idxChrDscSub.add_keywords(chr.desc .c_str(), chr.chr, 3); idxChrDscSub.add_keywords(chr.keywords.c_str(), chr.chr, 3); + + // Mark category used. + categories_used.insert(chr.cat); } else has_errors = true; @@ -468,21 +473,24 @@ int _tmain(int argc, _TCHAR *argv[]) while (!ZRCola::DBSource::IsEOF(rs)) { // Read character category from the database. if (src.GetCharacterCategory(rs, cc)) { - // Add character category to index and data. - unsigned __int32 idx = db.data.size(); - for (wstring::size_type i = 0; i < sizeof(ZRCola::chrcatid_t)/sizeof(unsigned __int16); i++) - db.data.push_back(((const unsigned __int16*)cc.id.data)[i]); - wxASSERT_MSG((int)0xffff8000 <= cc.rank && cc.rank <= (int)0x00007fff, wxT("character category rank out of bounds")); - db.data.push_back((unsigned __int16)cc.rank); - wstring::size_type n_name = cc.name.length(); - wxASSERT_MSG(n_name <= 0xffff, wxT("character category name too long")); - db.data.push_back((unsigned __int16)n_name); - for (wstring::size_type i = 0; i < n_name; i++) - db.data.push_back(cc.name[i]); - db.idxChrCat.push_back(idx); - db.idxRnk .push_back(idx); - if (build_pot) - pot.insert(cc.name); + if (categories_used.find(cc.id) != categories_used.end()) { + // Add character category to index and data. + unsigned __int32 idx = db.data.size(); + for (wstring::size_type i = 0; i < sizeof(ZRCola::chrcatid_t)/sizeof(unsigned __int16); i++) + db.data.push_back(((const unsigned __int16*)cc.id.data)[i]); + wxASSERT_MSG((int)0xffff8000 <= cc.rank && cc.rank <= (int)0x00007fff, wxT("character category rank out of bounds")); + db.data.push_back((unsigned __int16)cc.rank); + wstring::size_type n_name = cc.name.length(); + wxASSERT_MSG(n_name <= 0xffff, wxT("character category name too long")); + db.data.push_back((unsigned __int16)n_name); + for (wstring::size_type i = 0; i < n_name; i++) + db.data.push_back(cc.name[i]); + db.idxChrCat.push_back(idx); + db.idxRnk .push_back(idx); + if (build_pot) + pot.insert(cc.name); + } else + _ftprintf(stderr, wxT("%s: warning ZCC0019: Ommiting empty category %ls.\n"), (LPCTSTR)filenameIn.c_str(), (LPCWSTR)cc.name.c_str()); } else has_errors = true; diff --git a/output/data/ZRCola.zrcdb b/output/data/ZRCola.zrcdb index 8bd1567..c4e500d 100644 Binary files a/output/data/ZRCola.zrcdb and b/output/data/ZRCola.zrcdb differ diff --git a/output/locale/ZRCola-zrcdb.pot b/output/locale/ZRCola-zrcdb.pot index 5458ff9..6aabf28 100644 --- a/output/locale/ZRCola-zrcdb.pot +++ b/output/locale/ZRCola-zrcdb.pot @@ -5,7 +5,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: ZRColaCompile 2.0-beta\n" +"X-Generator: ZRColaCompile 2.0-beta1\n" msgid "Albanian" msgstr "" @@ -160,6 +160,9 @@ msgstr "" msgid "Letter Z" msgstr "" +msgid "Letter a" +msgstr "" + msgid "Letter e" msgstr "" @@ -205,9 +208,6 @@ msgstr "" msgid "Mark, Non-Spacing" msgstr "" -msgid "Mark, Spacing Combining" -msgstr "" - msgid "Metric" msgstr "" @@ -271,9 +271,6 @@ msgstr "" msgid "Other, Format" msgstr "" -msgid "Other, Surrogate" -msgstr "" - msgid "Parentheses" msgstr "" @@ -313,12 +310,6 @@ msgstr "" msgid "Russian" msgstr "" -msgid "Separator, Line" -msgstr "" - -msgid "Separator, Paragraph" -msgstr "" - msgid "Separator, Space" msgstr "" diff --git a/output/locale/de_DE/ZRCola-zrcdb.po b/output/locale/de_DE/ZRCola-zrcdb.po index 199e0da..5329830 100644 --- a/output/locale/de_DE/ZRCola-zrcdb.po +++ b/output/locale/de_DE/ZRCola-zrcdb.po @@ -167,6 +167,10 @@ msgstr "" msgid "Letter Z" msgstr "" +#, fuzzy +msgid "Letter a" +msgstr "Letter Extra 9 1/2 x 12 Zoll" + msgid "Letter e" msgstr "" @@ -212,9 +216,6 @@ msgstr "" msgid "Mark, Non-Spacing" msgstr "" -msgid "Mark, Spacing Combining" -msgstr "" - msgid "Metric" msgstr "" @@ -279,9 +280,6 @@ msgstr "" msgid "Other, Format" msgstr "" -msgid "Other, Surrogate" -msgstr "" - msgid "Parentheses" msgstr "" @@ -321,12 +319,6 @@ msgstr "" msgid "Russian" msgstr "" -msgid "Separator, Line" -msgstr "" - -msgid "Separator, Paragraph" -msgstr "" - msgid "Separator, Space" msgstr "" @@ -429,7 +421,3 @@ msgstr "Windows Türkisch (CP 1254)" msgid "Ukrainian" msgstr "" - -#, fuzzy -#~ msgid "Letter a" -#~ msgstr "Letter Extra 9 1/2 x 12 Zoll" diff --git a/output/locale/ru_RU/ZRCola-zrcdb.po b/output/locale/ru_RU/ZRCola-zrcdb.po index 80483a4..5c03352 100644 --- a/output/locale/ru_RU/ZRCola-zrcdb.po +++ b/output/locale/ru_RU/ZRCola-zrcdb.po @@ -167,6 +167,9 @@ msgstr "" msgid "Letter Z" msgstr "" +msgid "Letter a" +msgstr "" + msgid "Letter e" msgstr "" @@ -212,9 +215,6 @@ msgstr "" msgid "Mark, Non-Spacing" msgstr "" -msgid "Mark, Spacing Combining" -msgstr "" - msgid "Metric" msgstr "" @@ -278,9 +278,6 @@ msgstr "" msgid "Other, Format" msgstr "" -msgid "Other, Surrogate" -msgstr "" - msgid "Parentheses" msgstr "" @@ -320,12 +317,6 @@ msgstr "" msgid "Russian" msgstr "" -msgid "Separator, Line" -msgstr "" - -msgid "Separator, Paragraph" -msgstr "" - msgid "Separator, Space" msgstr "" diff --git a/output/locale/sl_SI/ZRCola-zrcdb.mo b/output/locale/sl_SI/ZRCola-zrcdb.mo index c514694..2e12434 100644 Binary files a/output/locale/sl_SI/ZRCola-zrcdb.mo and b/output/locale/sl_SI/ZRCola-zrcdb.mo differ diff --git a/output/locale/sl_SI/ZRCola-zrcdb.po b/output/locale/sl_SI/ZRCola-zrcdb.po index 8a7b5e2..cc8794f 100644 --- a/output/locale/sl_SI/ZRCola-zrcdb.po +++ b/output/locale/sl_SI/ZRCola-zrcdb.po @@ -167,6 +167,9 @@ msgstr "Črka Y" msgid "Letter Z" msgstr "Črka Z" +msgid "Letter a" +msgstr "Črka a" + msgid "Letter e" msgstr "Črka e" @@ -212,9 +215,6 @@ msgstr "Ločevalo, obdajajoča" msgid "Mark, Non-Spacing" msgstr "Ločevalo, neločljivo" -msgid "Mark, Spacing Combining" -msgstr "Ločevalo, ločljivo" - msgid "Metric" msgstr "Metrično" @@ -278,9 +278,6 @@ msgstr "Druga spreminjevala" msgid "Other, Format" msgstr "Drugo, oblikovni" -msgid "Other, Surrogate" -msgstr "Drugo, nadomestni" - msgid "Parentheses" msgstr "Oklepaji" @@ -320,12 +317,6 @@ msgstr "romunščina" msgid "Russian" msgstr "ruščina" -msgid "Separator, Line" -msgstr "Ločilo, vrstic" - -msgid "Separator, Paragraph" -msgstr "Ločilo, odstavkov" - msgid "Separator, Space" msgstr "Ločilo, presledek" @@ -416,8 +407,17 @@ msgstr "turščina" msgid "Ukrainian" msgstr "ukrajinščina" -#~ msgid "Letter a" -#~ msgstr "Črka a" +#~ msgid "Mark, Spacing Combining" +#~ msgstr "Ločevalo, ločljivo" + +#~ msgid "Other, Surrogate" +#~ msgstr "Drugo, nadomestni" + +#~ msgid "Separator, Line" +#~ msgstr "Ločilo, vrstic" + +#~ msgid "Separator, Paragraph" +#~ msgstr "Ločilo, odstavkov" #~ msgid "Letter b" #~ msgstr "Črka b"