summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-05-14 01:05:39 +0200
committerCarl Hetherington <cth@carlh.net>2025-05-24 00:43:55 +0200
commit46a8db8e9473586da43d779fc614208136260132 (patch)
tree8bd6e1c29735596edc6a122a1092d405dd2680a3 /src/wx
parentbe5d332f9492865456befc0992520191b8b57769 (diff)
Fix lib i18n code for Windows and maybe Linux.
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/wx_util.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc
index e4229c1b7..e261a527e 100644
--- a/src/wx/wx_util.cc
+++ b/src/wx/wx_util.cc
@@ -468,11 +468,20 @@ dcpomatic_setup_i18n()
}
}
+ auto add_source_tree_prefixes = []() {
+ wxFileTranslationsLoader::AddCatalogLookupPathPrefix(char_to_wx("build/src/wx/mo"));
+ wxFileTranslationsLoader::AddCatalogLookupPathPrefix(char_to_wx("build/src/tools/mo"));
+ };
+
+
#ifdef DCPOMATIC_DEBUG
- wxFileTranslationsLoader::AddCatalogLookupPathPrefix(char_to_wx("build/src/wx/mo"));
- wxFileTranslationsLoader::AddCatalogLookupPathPrefix(char_to_wx("build/src/tools/mo"));
+ add_source_tree_prefixes();
#endif
+ if (running_tests) {
+ add_source_tree_prefixes();
+ }
+
translations->AddStdCatalog();
translations->AddCatalog(char_to_wx("libdcpomatic2-wx"));
translations->AddCatalog(char_to_wx("dcpomatic2"));