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.
This commit is contained in:
bunnie 2026-01-17 01:33:16 +08:00
parent d26ce7fbf1
commit a8d9b53c26

View file

@ -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());