From 24934638fdddb3188b5293f0d062dbc390b79ef0 Mon Sep 17 00:00:00 2001 From: Sollace Date: Fri, 27 Jul 2018 20:07:49 +0200 Subject: [PATCH] (requested by Poly) Use translation strings for all the options! --- .../java/com/voxelmodpack/hdskins/gui/GuiSkins.java | 10 +++++----- .../voxelmodpack/hdskins/gui/HDSkinsConfigPanel.java | 5 ++--- src/hdskins/resources/assets/hdskins/lang/en_us.lang | 8 ++++++++ 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/hdskins/java/com/voxelmodpack/hdskins/gui/GuiSkins.java b/src/hdskins/java/com/voxelmodpack/hdskins/gui/GuiSkins.java index 29b3cc43..c3d48531 100644 --- a/src/hdskins/java/com/voxelmodpack/hdskins/gui/GuiSkins.java +++ b/src/hdskins/java/com/voxelmodpack/hdskins/gui/GuiSkins.java @@ -197,7 +197,7 @@ public class GuiSkins extends GameGui { addButton(new Label(width / 2, 10, "hdskins.manager", 0xffffff, true)); - addButton(new Button(width / 2 - 150, height - 27, 90, 20, "Browse...", sender ->{ + addButton(new Button(width / 2 - 150, height - 27, 90, 20, "hdskins.options.browse", sender ->{ selectedSkin = null; localPlayer.releaseTextures(); openFileThread = new ThreadOpenFilePNG(mc, format("hdskins.open.title"), (fileDialog, dialogResult) -> { @@ -211,23 +211,23 @@ public class GuiSkins extends GameGui { sender.enabled = false; })).setEnabled(!mc.isFullScreen()); - addButton(btnUpload = new Button(width / 2 - 24, height / 2 - 10, 48, 20, ">>", sender -> { + addButton(btnUpload = new Button(width / 2 - 24, height / 2 - 10, 48, 20, "hdskins.options.chevy", sender -> { if (selectedSkin != null) { punchServer("hdskins.upload", selectedSkin.toURI()); sender.enabled = false; } else { setUploadError(format("hdskins.error.select")); } - })).setEnabled(false); + })).setEnabled(false).setTooltip("hdskins.options.chevy.title"); - addButton(btnClear = new Button(width / 2 + 60, height - 27, 90, 20, "Clear", sender -> { + addButton(btnClear = new Button(width / 2 + 60, height - 27, 90, 20, "hdskins.options.clear", sender -> { if (remotePlayer.isTextureSetupComplete()) { punchServer("hdskins.request", null); btnUpload.enabled = selectedSkin != null; } })); - addButton(new Button(width / 2 - 50, height - 25, 100, 20, "Close", sender -> { + addButton(new Button(width / 2 - 50, height - 25, 100, 20, "hdskins.options.close", sender -> { mc.displayGuiScreen(new GuiMainMenu()); })); diff --git a/src/hdskins/java/com/voxelmodpack/hdskins/gui/HDSkinsConfigPanel.java b/src/hdskins/java/com/voxelmodpack/hdskins/gui/HDSkinsConfigPanel.java index ed659e82..707e36c8 100644 --- a/src/hdskins/java/com/voxelmodpack/hdskins/gui/HDSkinsConfigPanel.java +++ b/src/hdskins/java/com/voxelmodpack/hdskins/gui/HDSkinsConfigPanel.java @@ -12,11 +12,10 @@ public class HDSkinsConfigPanel extends SettingsPanel { public void initGui() { final LiteModHDSkins mod = LiteLoader.getInstance().getMod(LiteModHDSkins.class); - addButton(new Button(40, 70, 100, 20, "Clear Skin Cache", sender ->{ + addButton(new Button(40, 70, 100, 20, "hdskins.options.cache", sender ->{ HDSkinManager.INSTANCE.clearSkinCache(); })); - addButton(new Checkbox(40, 40, "Experimental Skin Drop", mod.experimentalSkinDrop, checked -> { - System.out.println(checked); + addButton(new Checkbox(40, 40, "hdskins.options.skindrops", mod.experimentalSkinDrop, checked -> { mod.experimentalSkinDrop = checked; LiteLoader.getInstance().writeConfig(mod); diff --git a/src/hdskins/resources/assets/hdskins/lang/en_us.lang b/src/hdskins/resources/assets/hdskins/lang/en_us.lang index 623a37cd..40d0ce38 100644 --- a/src/hdskins/resources/assets/hdskins/lang/en_us.lang +++ b/src/hdskins/resources/assets/hdskins/lang/en_us.lang @@ -21,3 +21,11 @@ hdskins.mode.skin=Skin (Steve) hdskins.mode.skinny=Skin (Alex) hdskins.mode.elytra=Elytra +hdskins.options.chevy=>> +hdskins.options.chevy.title=Upload Skin +hdskins.options.close=Close +hdskins.options.clear=Clear +hdskins.options.browse=Browse + +hdskins.options.skindrops=Experimental Skin Drop +hdskins.options.cache=Clear Skin Cache