feat(i18n/favorite): translate item

This commit is contained in:
ineanto 2025-06-08 22:32:06 +02:00
parent c6f37579a0
commit d8f183146b
Signed by: ineanto
GPG key ID: E511F9CAA2F9CE84
6 changed files with 32 additions and 5 deletions

View file

@ -47,7 +47,7 @@ public class FavoriteAddItem {
); );
final ItemBuilder builder = new ItemBuilder(banner); final ItemBuilder builder = new ItemBuilder(banner);
return playerLanguage.translateItem(builder, LanguageKey.GUI.Home.FAVORITES); return playerLanguage.translateItem(builder, LanguageKey.GUI.Favorites.ADD);
}, click -> { }, click -> {
final ClickType clickType = click.getClickType(); final ClickType clickType = click.getClickType();
if (clickType.isLeftClick() || clickType.isRightClick()) { if (clickType.isLeftClick() || clickType.isRightClick()) {

View file

@ -42,7 +42,7 @@ public class FavoriteRemoveItem {
); );
final ItemBuilder builder = new ItemBuilder(banner); final ItemBuilder builder = new ItemBuilder(banner);
return playerLanguage.translateItem(builder, LanguageKey.GUI.Home.FAVORITES); return playerLanguage.translateItem(builder, LanguageKey.GUI.Favorites.REMOVE);
}, click -> { }, click -> {
final ClickType clickType = click.getClickType(); final ClickType clickType = click.getClickType();
if (clickType.isLeftClick() || clickType.isRightClick()) { if (clickType.isLeftClick() || clickType.isRightClick()) {

View file

@ -9,7 +9,7 @@ public enum Language implements Serializable {
FRENCH("fr", "Français"), FRENCH("fr", "Français"),
CUSTOM("cm", "Server Custom"); CUSTOM("cm", "Server Custom");
public static final Version VERSION = new Version(1, 3, 1); public static final Version VERSION = new Version(1, 4, 0);
private final String code; private final String code;
private transient final String name; private transient final String name;

View file

@ -142,5 +142,12 @@ public class LanguageKey {
public static final String ENTRY = CACHE_KEY + "entry"; public static final String ENTRY = CACHE_KEY + "entry";
} }
} }
public static class Favorites {
private static final String FAVORITES_KEY = GUI_KEY + "favorites.";
public static final String ADD = FAVORITES_KEY + "add";
public static final String REMOVE = FAVORITES_KEY + "remove";
}
} }
} }

View file

@ -1,7 +1,7 @@
# Nicko ${version} - Language File: # Nicko ${version} - Language File:
# Specifies the configuration version, don't change. # Specifies the configuration version, don't change.
version: "1.3.1" version: "1.4.0"
prefix: "<b><gradient:#01a97c:#8ffd54>NICKO</gradient></b>" prefix: "<b><gradient:#01a97c:#8ffd54>NICKO</gradient></b>"
whoosh: "<b><gradient:#01a97c:#8ffd54>WHOOSH!</gradient></b>" whoosh: "<b><gradient:#01a97c:#8ffd54>WHOOSH!</gradient></b>"
@ -149,6 +149,26 @@ gui:
lore: lore:
- "{0} Disabled" - "{0} Disabled"
- "{1} Enabled" - "{1} Enabled"
cycling_choices:
lore:
- "<gray><i>Cycle through the values</i></gray>"
- "<gray><i>by left or right clicking.</i></gray>"
language:
name: "Language"
random_skin:
name: "Random skin on login"
favorites:
add:
name: "Add a favorite"
lore:
- "<grey>Add a new favorite appearance to the list.</grey>"
- "<grey>Hold <gold><b>SHIFT</b></gold> to add your current disguise!</grey>"
remove:
name: "Toggle deletion mode"
lore:
- "<grey>Clicking on any disguise as this mode is</grey>"
- "<grey>active will remove it from your favorites.</grey>"
cycling_choices: cycling_choices:
lore: lore:
- "<gray><i>Cycle through the values</i></gray>" - "<gray><i>Cycle through the values</i></gray>"

View file

@ -1,7 +1,7 @@
# Nicko ${version} - Fichier de langue: # Nicko ${version} - Fichier de langue:
# Précise la version de la configuration, ne pas changer. # Précise la version de la configuration, ne pas changer.
version: "1.3.1" version: "1.4.0"
prefix: "<b><gradient:#01a97c:#8ffd54>NICKO</gradient></b>" prefix: "<b><gradient:#01a97c:#8ffd54>NICKO</gradient></b>"
whoosh: "<b><gradient:#01a97c:#8ffd54>WHOOSH!</gradient></b>" whoosh: "<b><gradient:#01a97c:#8ffd54>WHOOSH!</gradient></b>"