Skip to content

Commit

Permalink
other texts support
Browse files Browse the repository at this point in the history
  • Loading branch information
loomstyla committed Nov 3, 2023
1 parent 83bc279 commit bb5ff76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ pub struct Config {
pub locales: Vec<String>,
pub default_locale: String,
#[serde(default)]
pub other_texts: HashMap<String, String>,
#[serde(default)]
pub story_progress_style: StoryProgressStyle,
}

#[derive(Debug, Default, Serialize, Deserialize, PartialEq, Clone, Eq)]
#[serde(rename_all = "lowercase")]
pub enum StoryProgressStyle {
Expand Down
4 changes: 4 additions & 0 deletions compiler/src/i18n.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ impl I18n {
wtr.serialize(record)?;
}

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

Ok(())
}
}

0 comments on commit bb5ff76

Please sign in to comment.