wxLocale::AddCatalog() has changed behavior from 2.8.4 to 2.9.3 (and on)
|Reported by:||tmsorensen||Owned by:|
In wx 2.8.4 the "main" wxLocale::AddCatalog() function will always attempt to load a translation no matter which msgIdLanguage argument it is given (specifically wxLANGUAGE_ENGLISH_US). Only if the loading of a translation file fails is msgIdLanguage compared to m_language and, if they are the same, it is deemed OK to just use the text embedded in the code (and the function returns true)
In wx 2.9.3 and up, this behavior has been changed: wxLocale::AddCatalog() uses wxTranslations::AddCatalog() and this function simply says that if the msgIdLanguage argument is the same as the domain language, the program should always use the text embedded in the code. No attempt is made at loading a translation file.
I believe this is a bug. Our product is localized into nine different languages, one being English. We write the text embedded in the code in English but none of the developers are native English speakers so this text may not always be correct. Therefore we have hired a company to do the translations and this scheme kinda fails when the English .mo file is not loaded :-)
I have provided a patch against trunk for "include/wx/translation.h" and "src/common/translation.cpp" that fixes this problem and implements the behavior intended in wx 2.8.4 (which I believe is the right one, of course :-)