Skip to content
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

Merged
merged 2 commits into from
Nov 3, 2020

Conversation

joshuaskelly
Copy link
Collaborator

image

Summary

Added missing string table entry so translators can translate: "Current: X"

Copy link
Contributor

@PythooonUser PythooonUser left a 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());
Copy link
Contributor

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()?

Copy link
Collaborator Author

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?

Copy link
Contributor

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

Copy link
Collaborator Author

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()

@joshuaskelly joshuaskelly merged commit a4b312d into master Nov 3, 2020
@joshuaskelly joshuaskelly deleted the fixes/level-up-overlay-missing-string branch November 3, 2020 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants