mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
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.
This commit is contained in:
parent
d26ce7fbf1
commit
a8d9b53c26
1 changed files with 2 additions and 9 deletions
|
|
@ -27,19 +27,12 @@ macro_rules! build_debug {
|
||||||
fn read_locales() -> Translations {
|
fn read_locales() -> Translations {
|
||||||
let mut translations: Translations = HashMap::new();
|
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 build_directory = project_dir.to_str().unwrap();
|
||||||
let locales = format!("{}/**/i18n.json", build_directory);
|
let locales = format!("{}/**/i18n.json", build_directory);
|
||||||
build_debug!("Reading {}", &locales);
|
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 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 {
|
||||||
for entry in paths.chain(external_paths) {
|
|
||||||
let entry = entry.unwrap();
|
let entry = entry.unwrap();
|
||||||
build_debug!("{:?}", entry);
|
build_debug!("{:?}", entry);
|
||||||
println!("cargo:rerun-if-changed={}", entry.display());
|
println!("cargo:rerun-if-changed={}", entry.display());
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue