From 7e3ac5386915e2f00c3da73abe96e691ea724072 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 4 Dec 2022 14:25:54 +1000 Subject: [PATCH] Allow unit tests to pass even when Qt translations overridden --- rslib/i18n/build/gather.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rslib/i18n/build/gather.rs b/rslib/i18n/build/gather.rs index 0876a64b3..e28a8b2ea 100644 --- a/rslib/i18n/build/gather.rs +++ b/rslib/i18n/build/gather.rs @@ -26,6 +26,10 @@ pub fn get_ftl_data() -> TranslationsByLang { if let Some(path) = extra_ftl_root() { // Mobile client has requested its own extra translations add_translation_root(&mut map, &path, false); + // In a debug build, also include the Qt translations so that our Python unit tests pass. + if std::env::var("RELEASE").is_err() { + add_folder(&mut map, &ftl_base.join("qt"), "templates"); + } } else { // Qt core templates from this repo add_folder(&mut map, &ftl_base.join("qt"), "templates");