Guest User

wx locale sufffix impl

a guest
Feb 1st, 2021
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.39 KB | None | 0 0
  1. diff --git a/Makefile.in b/Makefile.in
  2. index 82c179b..6628a7d 100644
  3. --- a/Makefile.in
  4. +++ b/Makefile.in
  5. @@ -14721,14 +14721,14 @@ locale_install:
  6.     $(INSTALL_DIR) $(DESTDIR)$(datadir)/locale/$$l ; \
  7.     $(INSTALL_DIR) $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES ; \
  8.     if test -f $(srcdir)/locale/$$l.mo ; then \
  9. -   $(INSTALL_DATA) $(srcdir)/locale/$$l.mo $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxstd.mo ; \
  10. +   $(INSTALL_DATA) $(srcdir)/locale/$$l.mo $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxstd-$(WX_RELEASE).mo ; \
  11.     fi ; \
  12.     done
  13.  
  14.  locale_uninstall:
  15.     for l in $(LOCALE_LINGUAS) ; do \
  16. -   if test -f $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxstd.mo ; then \
  17. -   rm -f $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxstd.mo ; \
  18. +   if test -f $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxstd-$(WX_RELEASE).mo ; then \
  19. +   rm -f $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxstd-$(WX_RELEASE).mo ; \
  20.     fi ; \
  21.     done
  22.  
  23. @@ -14738,14 +14738,14 @@ locale_msw_install:
  24.     $(INSTALL_DIR) $(DESTDIR)$(datadir)/locale/$$l ; \
  25.     $(INSTALL_DIR) $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES ; \
  26.     if test -f $(srcdir)/locale/msw/$$l.mo ; then \
  27. -   $(INSTALL_DATA) $(srcdir)/locale/msw/$$l.mo $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxmsw.mo ; \
  28. +   $(INSTALL_DATA) $(srcdir)/locale/msw/$$l.mo $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxmsw-$(WX_RELEASE).mo ; \
  29.     fi ; \
  30.     done
  31.  
  32.  locale_msw_uninstall:
  33.     for l in $(LOCALE_MSW_LINGUAS) ; do \
  34. -   if test -f $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxmsw.mo ; then \
  35. -   rm -f $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxmsw.mo ; \
  36. +   if test -f $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxmsw-$(WX_RELEASE).mo ; then \
  37. +   rm -f $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxmsw-$(WX_RELEASE).mo ; \
  38.     fi ; \
  39.     done
  40.  
  41. diff --git a/build/bakefiles/wx.bkl b/build/bakefiles/wx.bkl
  42. index 806b11a..891ad1d 100644
  43. --- a/build/bakefiles/wx.bkl
  44. +++ b/build/bakefiles/wx.bkl
  45. @@ -137,7 +137,7 @@
  46.          <using module="gettext"/>
  47.          <gettext-catalogs id="locale">
  48.              <srcdir>$(SRCDIR)/locale</srcdir>
  49. -            <catalog-name>wxstd</catalog-name>
  50. +            <catalog-name>wxstd-$(WX_RELEASE)</catalog-name>
  51.              <linguas>
  52.                  ca cs da de el es fi fr hu id it ja nl pl ru sl sv tr uk
  53.                  zh zh_CN zh_TW
  54. @@ -146,7 +146,7 @@
  55.          </gettext-catalogs>
  56.          <gettext-catalogs id="locale_msw">
  57.              <srcdir>$(SRCDIR)/locale/msw</srcdir>
  58. -            <catalog-name>wxmsw</catalog-name>
  59. +            <catalog-name>wxmsw-$(WX_RELEASE)</catalog-name>
  60.              <linguas>it</linguas>
  61.              <install-to>$(LOCALEDIR)</install-to>
  62.          </gettext-catalogs>
  63. diff --git a/src/common/translation.cpp b/src/common/translation.cpp
  64. index ee8b586..c7aa90a 100644
  65. --- a/src/common/translation.cpp
  66. +++ b/src/common/translation.cpp
  67. @@ -48,6 +48,7 @@
  68.  #include "wx/fontmap.h"
  69.  #include "wx/scopedptr.h"
  70.  #include "wx/stdpaths.h"
  71. +#include "wx/version.h"
  72.  #include "wx/private/threadinfo.h"
  73.  
  74.  #ifdef __WINDOWS__
  75. @@ -1522,7 +1523,7 @@ wxArrayString wxTranslations::GetAvailableTranslations(const wxString& domain) c
  76.  
  77.  bool wxTranslations::AddStdCatalog()
  78.  {
  79. -    if ( !AddCatalog(wxS("wxstd")) )
  80. +    if ( !AddCatalog(wxS("wxstd-" wxSTRINGIZE(wxMAJOR_VERSION) "." wxSTRINGIZE(wxMINOR_VERSION))) )
  81.          return false;
  82.  
  83.      // there may be a catalog with toolkit specific overrides, it is not
Advertisement
Add Comment
Please, Sign In to add comment