From ed2a07598a9a9d1c9e890a1f6bcb88ec6e86323b Mon Sep 17 00:00:00 2001 From: Cherry Date: Tue, 25 Jun 2024 20:59:06 -0400 Subject: [PATCH] update dg and fix narrator bug --- pets-gd/i18n/translations.csv | 1 - pets-lib/Cargo.toml | 2 +- pets-lib/src/dialogue/dbox/mod.rs | 10 +++++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/pets-gd/i18n/translations.csv b/pets-gd/i18n/translations.csv index c0469337..e5077bac 100644 --- a/pets-gd/i18n/translations.csv +++ b/pets-gd/i18n/translations.csv @@ -121,7 +121,6 @@ SKILL_SHIELD_HITS_MANY,It could easily stand quite a few hits. SKILL_SHIELD_HITS_WHILE,It'd take enemies a while to break through this one. SKILL_SHIELD_COMBINE_PARTS,{part1} {hits_str} , -DG_SPK_NARRATOR,"" DG_SPK_UNKNOWN,??? DG_SPK_RODRICK,"Rodrick Sign Co." DG_SPK_MOM,Mom diff --git a/pets-lib/Cargo.toml b/pets-lib/Cargo.toml index 16bfe8d5..3925218b 100644 --- a/pets-lib/Cargo.toml +++ b/pets-lib/Cargo.toml @@ -25,5 +25,5 @@ strum = { version = "0.26.1", features = ["derive"] } typetag = "0.2.15" [build-dependencies] -dialogical = "0.13.0" +dialogical = "0.13.1" diff --git a/pets-lib/src/dialogue/dbox/mod.rs b/pets-lib/src/dialogue/dbox/mod.rs index f6be58cb..b8fbcdc9 100644 --- a/pets-lib/src/dialogue/dbox/mod.rs +++ b/pets-lib/src/dialogue/dbox/mod.rs @@ -177,15 +177,15 @@ impl DialogBox { use Speaker::*; - tr(match &self.speaker.temporary { + match &self.speaker.temporary { Named(v) => { let name = replace_str_all(v, &self.replaces); - placeholders::process_placeholders(&name).into() + tr(placeholders::process_placeholders(&name)) } - Narrator => "DG_SPK_NARRATOR".to_owned(), - Unknown => "DG_SPK_UNKNOWN".to_owned(), - }) + Narrator => "".into(), + Unknown => tr("DG_SPK_UNKNOWN"), + } } fn translated_message(&self) -> GString {