From a8d9b53c26c9e438474d666a431324e8235a67d3 Mon Sep 17 00:00:00 2001 From: bunnie Date: Sat, 17 Jan 2026 01:33:16 +0800 Subject: [PATCH] Fix for #779 This patch removes the option to scan out-of-tree json files for locales resolution. When the time comes to have to incorporate out-of-tree apps with locales, a method should be devised that doesn't expand the dependency surface of the project beyond the immediate repository. --- locales/build.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/locales/build.rs b/locales/build.rs index 46c9a7c5f..dfcfb1056 100644 --- a/locales/build.rs +++ b/locales/build.rs @@ -27,19 +27,12 @@ macro_rules! build_debug { fn read_locales() -> Translations { let mut translations: Translations = HashMap::new(); - let mut project_dir = project_root(); + let project_dir = project_root(); let build_directory = project_dir.to_str().unwrap(); let locales = format!("{}/**/i18n.json", build_directory); build_debug!("Reading {}", &locales); - // TODO: once this works, get from external directory/location arguments from xtask script - project_dir.pop(); //sibling directory - project_dir.push("sigchat"); - let external_directory = project_dir.to_str().unwrap(); - let external_locales = format!("{}/**/i18n.json", external_directory); - build_debug!("Reading external {}", &external_locales); let paths = glob(&locales).expect("Failed to read glob pattern for in tree files"); - let external_paths = glob(&external_locales).expect("Filed to read glob pattern for external files"); - for entry in paths.chain(external_paths) { + for entry in paths { let entry = entry.unwrap(); build_debug!("{:?}", entry); println!("cargo:rerun-if-changed={}", entry.display());