Debug: Add logging for embedded locale file loading
This commit is contained in:
parent
30786e2cf8
commit
e0f00060cb
1 changed files with 3 additions and 0 deletions
|
|
@ -132,11 +132,14 @@ impl LocaleBundle {
|
||||||
messages: HashMap::new(),
|
messages: HashMap::new(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
log::info!("Loading embedded files for locale: {}", locale_str);
|
||||||
for file in EmbeddedLocales::iter() {
|
for file in EmbeddedLocales::iter() {
|
||||||
if file.starts_with(locale_str) && file.ends_with(".ftl") {
|
if file.starts_with(locale_str) && file.ends_with(".ftl") {
|
||||||
|
log::info!("Found .ftl file for locale {}: {}", locale_str, file);
|
||||||
if let Some(content_bytes) = EmbeddedLocales::get(&file) {
|
if let Some(content_bytes) = EmbeddedLocales::get(&file) {
|
||||||
if let Ok(content) = std::str::from_utf8(content_bytes.data.as_ref()) {
|
if let Ok(content) = std::str::from_utf8(content_bytes.data.as_ref()) {
|
||||||
let file_translations = TranslationFile::parse(content);
|
let file_translations = TranslationFile::parse(content);
|
||||||
|
log::info!("Parsed {} keys from {}", file_translations.messages.len(), file);
|
||||||
translations.merge(file_translations);
|
translations.merge(file_translations);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue