From fc019e003a6d935675d7978bdac5afa2c87747af Mon Sep 17 00:00:00 2001 From: loomstyla Date: Fri, 3 Nov 2023 12:50:41 -0300 Subject: [PATCH] Update i18n.rs --- compiler/src/i18n.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/compiler/src/i18n.rs b/compiler/src/i18n.rs index bea266c..64c9eb8 100644 --- a/compiler/src/i18n.rs +++ b/compiler/src/i18n.rs @@ -40,6 +40,12 @@ impl I18n { } } + for record in &database.config.other_texts { + if let Some(locale) = database.i18n.strings.get_mut(&database.i18n.default_locale) { + locale.insert(record.0.clone(), record.1.clone()); + } + } + // Generate main translation file let mut path = destination_path.as_ref().to_path_buf(); @@ -58,10 +64,6 @@ impl I18n { wtr.serialize(record)?; } - for record in &database.config.other_texts { - wtr.serialize(record)?; - } - Ok(()) } }