-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding missing string table entry #167
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small question. Otherwise looks good.
@@ -71,7 +72,9 @@ protected void addAttribute(Table table, final String text, final Integer curren | |||
attributeName.setWrap(true); | |||
attributeName.setColor(new Color(0.298039215686275f, 0.12156862745098f, 0.12156862745098f, 1f)); | |||
|
|||
final Label value = new Label("Current: " + currentValue.toString(), skin.get(LabelStyle.class)); | |||
String currentStatValueLabel = StringManager.get("overlays.LevelUpOverlay.currentStatValueLabel"); | |||
currentStatValueLabel = MessageFormat.format(currentStatValueLabel, currentValue,toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean currentValue.toString()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, yes I did. 🤦
Though I might not need it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Puh, I don't know? From the usage I think currentValue
comes in as an integer, right? And maybe the toString
method is called automatically?
However, the level up screen is nothing that is called every frame and, therefore, I guess, better safe than sorry :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MessageFormat.format()
takes a string and an arbitrary number of Objects as params, so I've just dropped ,toString()
Summary
Added missing string table entry so translators can translate: "Current: X"