v0.3.4: externalized all buff strings

This commit is contained in:
Evan Debenham
2015-12-28 20:23:15 -05:00
committed by Evan Debenham
parent 801fd58e7c
commit 77d16d5a93
42 changed files with 239 additions and 305 deletions
@@ -22,6 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import java.text.DecimalFormat;
@@ -85,7 +86,9 @@ public class Buff extends Actor {
//to handle the common case of showing how many turns are remaining in a buff description.
protected String dispTurns(float input){
return input == 1 ? "1 more turn" : new DecimalFormat("#.##").format(input) + " more turns";
return input == 1 ?
Messages.get(Buff.class, "1moreturn") :
Messages.get(Buff.class, "#moreturns", new DecimalFormat("#.##").format(input));
}
//creates a fresh instance of the buff and attaches that, this allows duplication.