aboutsummaryrefslogtreecommitdiff
path: root/locale/tools
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-10-01 11:54:10 +0200
committermetamuffin <metamuffin@disroot.org>2024-10-01 11:54:10 +0200
commit01816315f5a30a2fdf7d6a2024b2973ff7e4bb41 (patch)
tree1e142973b03e73038123990a52ed53e7ea95a1ef /locale/tools
parenteb1b1ccc7ce7e943b727d2d2e4edc79a7c51bfc8 (diff)
downloadhurrycurry-01816315f5a30a2fdf7d6a2024b2973ff7e4bb41.tar
hurrycurry-01816315f5a30a2fdf7d6a2024b2973ff7e4bb41.tar.bz2
hurrycurry-01816315f5a30a2fdf7d6a2024b2973ff7e4bb41.tar.zst
dont print all the missing tr keys
Diffstat (limited to 'locale/tools')
-rw-r--r--locale/tools/src/main.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/locale/tools/src/main.rs b/locale/tools/src/main.rs
index 7675b4d6..5e97993b 100644
--- a/locale/tools/src/main.rs
+++ b/locale/tools/src/main.rs
@@ -64,14 +64,19 @@ static NATIVE_LANGUAGE_NAMES: &[(&str, &str)] = &[
fn export_load(input: &Path, fallback: Option<PathBuf>) -> Result<BTreeMap<String, String>> {
let mut ini = load_ini(&input)?;
if let Some(fallback) = fallback {
+ let mut missing = 0;
let f = load_ini(&fallback)?;
for (k, v) in f {
#[allow(clippy::map_entry)]
if !ini.contains_key(&k) {
- eprintln!("fallback: key {k:?} is missing");
+ if option_env!("SHOW_MISSING").is_some() {
+ eprintln!("fallback: key {k:?} is missing");
+ }
+ missing += 1;
ini.insert(k, v);
}
}
+ eprintln!("-- {missing} missing keys were substituted from fallback language")
}
for &(code, name) in NATIVE_LANGUAGE_NAMES {
ini.insert(format!("c.settings.ui.language.{code}"), name.to_owned());