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

Restore Objectives as a translatable gamemode #1201

Merged
merged 1 commit into from
Jul 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions core/src/main/java/tc/oc/pgm/api/map/Gamemode.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ public enum Gamemode {
SCOREBOX("scorebox", "Scorebox", "Scorebox"),
SKYWARS("skywars", "Skywars", "Skywars"),
SURVIVAL_GAMES("sg", "Survival Games", "SG"),
DEATHMATCH("tdm", "Deathmatch", "TDM"),
OBJECTIVES("obj", "Objectives", "Objectives");
DEATHMATCH("tdm", "Deathmatch", "TDM");

private final String id;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static net.kyori.adventure.text.Component.empty;
import static net.kyori.adventure.text.Component.space;
import static net.kyori.adventure.text.Component.text;
import static net.kyori.adventure.text.Component.translatable;

import java.util.ArrayList;
import java.util.Collection;
Expand Down Expand Up @@ -84,7 +85,7 @@ public Component renderTitle() {
}

// When there are multiple, primary game modes
games.set(0, text(Gamemode.OBJECTIVES.getFullName(), NamedTextColor.AQUA));
games.set(0, translatable("gamemode.generic.name", NamedTextColor.AQUA));
break;
}

Expand Down
2 changes: 2 additions & 0 deletions util/src/main/i18n/templates/gamemode.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
gamemode.generic.name = Objectives

objective.name.monument = Monument

objective.name.antenna = Antenna
Expand Down