From cfab5000062770d7df5bbf420111dc198c966963 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 13 Oct 2014 23:27:24 +0100 Subject: [PATCH] Another attempt to fix wxWidgets i18n on Debian/Ubuntu. --- debian/dcpomatic.install | 6 ------ debian/rules | 6 ++++++ src/wx/wx_util.cc | 8 ++++++++ 3 files changed, 14 insertions(+), 6 deletions(-) delete mode 100644 debian/dcpomatic.install diff --git a/debian/dcpomatic.install b/debian/dcpomatic.install deleted file mode 100644 index 67b55ae29..000000000 --- a/debian/dcpomatic.install +++ /dev/null @@ -1,6 +0,0 @@ -usr/local/share/locale/de/LC_MESSAGES/wxstd.mo usr/share/locale/de/LC_MESSAGES/dcpomatic-wxstd.mo -usr/local/share/locale/es/LC_MESSAGES/wxstd.mo usr/share/locale/es/LC_MESSAGES/dcpomatic-wxstd.mo -usr/local/share/locale/fr/LC_MESSAGES/wxstd.mo usr/share/locale/fr/LC_MESSAGES/dcpomatic-wxstd.mo -usr/local/share/locale/it/LC_MESSAGES/wxstd.mo usr/share/locale/it/LC_MESSAGES/dcpomatic-wxstd.mo -usr/local/share/locale/sv/LC_MESSAGES/wxstd.mo usr/share/locale/sv/LC_MESSAGES/dcpomatic-wxstd.mo -usr/local/share/locale/nl/LC_MESSAGES/wxstd.mo usr/share/locale/nl/LC_MESSAGES/dcpomatic-wxstd.mo diff --git a/debian/rules b/debian/rules index 619dfff5e..b8f7b7026 100755 --- a/debian/rules +++ b/debian/rules @@ -21,6 +21,12 @@ override_dh_auto_build: override_dh_auto_install: ./waf --nocache install --destdir=debian/dcpomatic + cp -a /usr/local/share/locale/de/LC_MESSAGES/wxstd.mo debian/dcpomatic/usr/share/locale/de/LC_MESSAGES/dcpomatic-wxstd.mo + cp -a /usr/local/share/locale/es/LC_MESSAGES/wxstd.mo debian/dcpomatic/usr/share/locale/es/LC_MESSAGES/dcpomatic-wxstd.mo + cp -a /usr/local/share/locale/fr/LC_MESSAGES/wxstd.mo debian/dcpomatic/usr/share/locale/fr/LC_MESSAGES/dcpomatic-wxstd.mo + cp -a /usr/local/share/locale/it/LC_MESSAGES/wxstd.mo debian/dcpomatic/usr/share/locale/it/LC_MESSAGES/dcpomatic-wxstd.mo + cp -a /usr/local/share/locale/sv/LC_MESSAGES/wxstd.mo debian/dcpomatic/usr/share/locale/sv/LC_MESSAGES/dcpomatic-wxstd.mo + cp -a /usr/local/share/locale/nl/LC_MESSAGES/wxstd.mo debian/dcpomatic/usr/share/locale/nl/LC_MESSAGES/dcpomatic-wxstd.mo .PHONY: override_dh_strip override_dh_strip: diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc index 1e501f54f..7f15217f1 100644 --- a/src/wx/wx_util.cc +++ b/src/wx/wx_util.cc @@ -280,6 +280,14 @@ dcpomatic_setup_i18n () locale->AddCatalogLookupPathPrefix (POSIX_LOCALE_PREFIX); #endif +#ifdef DCPOMATIC_LINUX + /* We have to include the wxWidgets .mo in our distribution, + so we rename it to avoid clashes with any other installation + of wxWidgets. + */ + locale->AddCatalog (wxT ("dcpomatic-wxstd")); +#endif + locale->AddCatalog (wxT ("libdcpomatic-wx")); locale->AddCatalog (wxT ("dcpomatic")); -- 2.30.2