diff --git a/Makefile.in b/Makefile.in index d21458bc93..b9c14d553a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -14778,14 +14778,14 @@ locale_install: $(INSTALL_DIR) $(DESTDIR)$(datadir)/locale/$$l ; \ $(INSTALL_DIR) $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES ; \ if test -f $(srcdir)/locale/$$l.mo ; then \ - $(INSTALL_DATA) $(srcdir)/locale/$$l.mo $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxstd.mo ; \ + $(INSTALL_DATA) $(srcdir)/locale/$$l.mo $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxstd-$(WX_RELEASE).mo ; \ fi ; \ done locale_uninstall: for l in $(LOCALE_LINGUAS) ; do \ - if test -f $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxstd.mo ; then \ - rm -f $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxstd.mo ; \ + if test -f $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxstd-$(WX_RELEASE).mo ; then \ + rm -f $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxstd-$(WX_RELEASE).mo ; \ fi ; \ done diff --git a/build/bakefiles/wx.bkl b/build/bakefiles/wx.bkl index 4165e1a849..8107a99d4a 100644 --- a/build/bakefiles/wx.bkl +++ b/build/bakefiles/wx.bkl @@ -137,7 +137,7 @@ $(SRCDIR)/locale - wxstd + wxstd-$(WX_RELEASE) ca cs da de el es fi fr hu id it ja nl pl ru sl sv tr uk zh zh_CN zh_TW diff --git a/src/common/translation.cpp b/src/common/translation.cpp index d1fc7f5c1f..dc06114bdc 100644 --- a/src/common/translation.cpp +++ b/src/common/translation.cpp @@ -45,6 +45,7 @@ #include "wx/fontmap.h" #include "wx/scopedptr.h" #include "wx/stdpaths.h" +#include "wx/version.h" #include "wx/private/threadinfo.h" #ifdef __WINDOWS__ @@ -1519,10 +1520,17 @@ wxArrayString wxTranslations::GetAvailableTranslations(const wxString& domain) c bool wxTranslations::AddStdCatalog() { - if ( !AddCatalog(wxS("wxstd")) ) - return false; + // Try loading the message catalog for this version first, but fall back to + // the name without the version if it's not found, as message catalogs + // typically won't have the version in their names under non-Unix platforms + // (i.e. where they're not installed by our own "make install"). + if ( AddCatalog("wxstd-" wxSTRINGIZE(wxMAJOR_VERSION) "." wxSTRINGIZE(wxMINOR_VERSION)) ) + return true; - return true; + if ( AddCatalog(wxS("wxstd")) ) + return true; + + return false; } #if !wxUSE_UNICODE