mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fixed an error where '{amount} Exp' floater was displayed only in English despite localizations being available
This commit is contained in:
parent
c3d4f9972d
commit
d37db03270
@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Fix a bug causing NPCs to jitter on interaction and randomly run away.
|
- Fix a bug causing NPCs to jitter on interaction and randomly run away.
|
||||||
- Harvester boss arenas should be more accessible and easier to exit
|
- Harvester boss arenas should be more accessible and easier to exit
|
||||||
- Fix agents not idling
|
- Fix agents not idling
|
||||||
|
- Fixed an error where '{amount} Exp' floater did not use existing localizations
|
||||||
|
|
||||||
## [0.12.0] - 2022-02-19
|
## [0.12.0] - 2022-02-19
|
||||||
|
|
||||||
|
@ -1522,7 +1522,10 @@ impl Hud {
|
|||||||
if floater.exp_change > 0 {
|
if floater.exp_change > 0 {
|
||||||
let xp_pool = &floater.xp_pools;
|
let xp_pool = &floater.xp_pools;
|
||||||
// Don't show 0 Exp
|
// Don't show 0 Exp
|
||||||
Text::new(&format!("{} Exp", floater.exp_change.max(1)))
|
let exp_string = &i18n
|
||||||
|
.get("hud.sct.experience")
|
||||||
|
.replace("{amount}", &floater.exp_change.max(1).to_string());
|
||||||
|
Text::new(exp_string)
|
||||||
.font_size(font_size_xp)
|
.font_size(font_size_xp)
|
||||||
.font_id(self.fonts.cyri.conrod_id)
|
.font_id(self.fonts.cyri.conrod_id)
|
||||||
.color(Color::Rgba(0.0, 0.0, 0.0, fade))
|
.color(Color::Rgba(0.0, 0.0, 0.0, fade))
|
||||||
@ -1532,7 +1535,7 @@ impl Hud {
|
|||||||
- 3.0,
|
- 3.0,
|
||||||
)
|
)
|
||||||
.set(player_sct_bg_id, ui_widgets);
|
.set(player_sct_bg_id, ui_widgets);
|
||||||
Text::new(&format!("{} Exp", floater.exp_change.max(1)))
|
Text::new(exp_string)
|
||||||
.font_size(font_size_xp)
|
.font_size(font_size_xp)
|
||||||
.font_id(self.fonts.cyri.conrod_id)
|
.font_id(self.fonts.cyri.conrod_id)
|
||||||
.color(
|
.color(
|
||||||
|
Loading…
Reference in New Issue
Block a user