translation fix

This commit is contained in:
Pfauenauge90 2020-04-10 00:07:46 +02:00
parent 0a52dc61d6
commit 88a938653b
3 changed files with 43 additions and 31 deletions

View File

@ -195,8 +195,8 @@ um dieses Fenster zu schließen? Drückt 'TAB'!
Viel Spaß in der Welt von Veloren, Abenteurer!"#,
// Inventory
"hud.bag.inventory": "s Inventar",
"hud.bag.stats_title": "s Werte",
"hud.bag.inventory": "{name}s Inventar",
"hud.bag.stats_title": "{playername}s Werte",
"hud.bag.exp": "Erf",
"hud.bag.armor": "Rüstung",
"hud.bag.stats": "Werte",

View File

@ -190,8 +190,8 @@ Enjoy your stay in the World of Veloren."#,
// Inventory
"hud.bag.inventory": "'s Inventory",
"hud.bag.stats_title": "'s Stats",
"hud.bag.inventory": "{playername}'s Inventory",
"hud.bag.stats_title": "{playername}'s Stats",
"hud.bag.exp": "Exp",
"hud.bag.armor": "Armor",
"hud.bag.stats": "Stats",

View File

@ -94,6 +94,7 @@ pub struct Bag<'a> {
slot_manager: &'a mut HudSlotManager,
_pulse: f32,
localized_strings: &'a std::sync::Arc<VoxygenLocalization>,
stats: &'a Stats,
show: &'a Show,
}
@ -217,21 +218,28 @@ impl<'a> Widget for Bag<'a> {
.color(Some(UI_HIGHLIGHT_0))
.set(state.ids.bg_frame, ui);
// Title
Text::new(&format!(
/*Text::new(&format!(
"{}{}",
&self.stats.name,
&self.localized_strings.get("hud.bag.inventory")
))
))*/
Text::new(
&self
.localized_strings
.get("hud.bag.inventory")
.replace("{playername}", &self.stats.name.to_string().as_str()),
)
.mid_top_with_margin_on(state.ids.bg_frame, 9.0)
.font_id(self.fonts.cyri.conrod_id)
.font_size(self.fonts.cyri.scale(22))
.color(Color::Rgba(0.0, 0.0, 0.0, 1.0))
.set(state.ids.inventory_title_bg, ui);
Text::new(&format!(
"{}{}",
&self.stats.name,
&self.localized_strings.get("hud.bag.inventory")
))
Text::new(
&self
.localized_strings
.get("hud.bag.inventory")
.replace("{playername}", &self.stats.name.to_string().as_str()),
)
.top_left_with_margins_on(state.ids.inventory_title_bg, 2.0, 2.0)
.font_id(self.fonts.cyri.conrod_id)
.font_size(self.fonts.cyri.scale(22))
@ -280,21 +288,23 @@ impl<'a> Widget for Bag<'a> {
if !self.show.stats {
// Title
Text::new(&format!(
"{}{}",
&self.stats.name,
&self.localized_strings.get("hud.bag.inventory")
))
Text::new(
&self
.localized_strings
.get("hud.bag.inventory")
.replace("{playername}", &self.stats.name.to_string().as_str()),
)
.mid_top_with_margin_on(state.ids.bg_frame, 9.0)
.font_id(self.fonts.cyri.conrod_id)
.font_size(self.fonts.cyri.scale(22))
.color(Color::Rgba(0.0, 0.0, 0.0, 1.0))
.set(state.ids.inventory_title_bg, ui);
Text::new(&format!(
"{}{}",
&self.stats.name,
&self.localized_strings.get("hud.bag.inventory")
))
Text::new(
&self
.localized_strings
.get("hud.bag.inventory")
.replace("{playername}", &self.stats.name.to_string().as_str()),
)
.top_left_with_margins_on(state.ids.inventory_title_bg, 2.0, 2.0)
.font_id(self.fonts.cyri.conrod_id)
.font_size(self.fonts.cyri.scale(22))
@ -510,21 +520,23 @@ impl<'a> Widget for Bag<'a> {
} else {
// Stats
// Title
Text::new(&format!(
"{}{}",
&self.stats.name,
&self.localized_strings.get("hud.bag.stats_title")
))
Text::new(
&self
.localized_strings
.get("hud.bag.stats_title")
.replace("{playername}", &self.stats.name.to_string().as_str()),
)
.mid_top_with_margin_on(state.ids.bg_frame, 9.0)
.font_id(self.fonts.cyri.conrod_id)
.font_size(self.fonts.cyri.scale(22))
.color(Color::Rgba(0.0, 0.0, 0.0, 1.0))
.set(state.ids.inventory_title_bg, ui);
Text::new(&format!(
"{}{}",
&self.stats.name,
&self.localized_strings.get("hud.bag.stats_title")
))
Text::new(
&self
.localized_strings
.get("hud.bag.stats_title")
.replace("{playername}", &self.stats.name.to_string().as_str()),
)
.top_left_with_margins_on(state.ids.inventory_title_bg, 2.0, 2.0)
.font_id(self.fonts.cyri.conrod_id)
.font_size(self.fonts.cyri.scale(22))