From 33cef58705bec600cc546238ef91aed0dcdc4e47 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 19 Oct 2021 18:43:45 -0400 Subject: [PATCH] v1.1.0: added translation code for ratmog heroic energy title --- core/src/main/assets/messages/actors/actors.properties | 1 + .../shatteredpixeldungeon/actors/hero/Talent.java | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index d3fd984b1..bfa2fe0f4 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -742,6 +742,7 @@ actors.hero.talent.swift_spirit.desc=_+1:_ The spirit hawk's movement speed is i #universal actors.hero.talent.heroic_energy.title=heroic energy +actors.hero.talent.heroic_energy.rat_title=ratroic energy actors.hero.talent.heroic_energy.desc=_+1:_ The hero's armor ability has a _13% reduced_ charge cost.\n\n_+2:_ The hero's armor ability has a _24% reduced_ charge cost.\n\n_+3:_ The hero's armor ability has a _34% reduced_ charge cost.\n\n_+4:_ The hero's armor ability has a _43% reduced_ charge cost actors.hero.talent.ratsistance.title=ratsistance diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java index d0c2605b3..895645889 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java @@ -219,12 +219,10 @@ public enum Talent { } public String title(){ - //TODO translate this - if (this == HEROIC_ENERGY && - Messages.lang() == Languages.ENGLISH + if (this == HEROIC_ENERGY && Dungeon.hero != null && Dungeon.hero.armorAbility instanceof Ratmogrify){ - return "ratroic energy"; + return Messages.get(this, name() + ".rat_title"); } return Messages.get(this, name() + ".title"); }