Skip to content

Commit

Permalink
Update i18n.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
loomstyla committed Nov 3, 2023
1 parent bb5ff76 commit fc019e0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions compiler/src/i18n.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -58,10 +64,6 @@ impl I18n {
wtr.serialize(record)?;
}

for record in &database.config.other_texts {
wtr.serialize(record)?;
}

Ok(())
}
}

0 comments on commit fc019e0

Please sign in to comment.