From e9efa3f2d30cb64b675c61509f0e5ff9c8c1f433 Mon Sep 17 00:00:00 2001 From: N0tMyFaultOG Date: Sun, 16 Aug 2020 18:24:54 +0200 Subject: [PATCH] Fix some translation issues --- .../plotsquared/core/command/Argument.java | 2 +- .../plotsquared/core/command/DebugPaste.java | 6 +-- .../com/plotsquared/core/command/Music.java | 8 +-- .../plotsquared/core/command/PluginCmd.java | 2 +- .../com/plotsquared/core/command/Relight.java | 4 +- .../com/plotsquared/core/command/Setup.java | 8 +-- Core/src/main/resources/lang/messages_en.json | 51 ++++++++++--------- 7 files changed, 41 insertions(+), 40 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/command/Argument.java b/Core/src/main/java/com/plotsquared/core/command/Argument.java index f342af1c6..3ccd4aed3 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Argument.java +++ b/Core/src/main/java/com/plotsquared/core/command/Argument.java @@ -58,7 +58,7 @@ public abstract class Argument { } }; public static final Argument PlayerName = - new Argument("PlayerName", "") { + new Argument("PlayerName", "") { @Override public String parse(String in) { return in.length() <= 16 ? in : null; } diff --git a/Core/src/main/java/com/plotsquared/core/command/DebugPaste.java b/Core/src/main/java/com/plotsquared/core/command/DebugPaste.java index 462a98c10..c9e70c174 100644 --- a/Core/src/main/java/com/plotsquared/core/command/DebugPaste.java +++ b/Core/src/main/java/com/plotsquared/core/command/DebugPaste.java @@ -158,13 +158,13 @@ public class DebugPaste extends SubCommand { incendoPaster.addFile(new IncendoPaster.PasteFile("settings.yml", readFile(this.configFile))); } catch (final IllegalArgumentException ignored) { - player.sendMessage(StaticCaption.of("&cSkipping settings.yml because it's empty.")); + player.sendMessage(StaticCaption.of("Skipping settings.yml because it's empty.")); } try { incendoPaster.addFile(new IncendoPaster.PasteFile("worlds.yml", readFile(this.worldfile))); } catch (final IllegalArgumentException ignored) { - player.sendMessage(StaticCaption.of("&cSkipping worlds.yml because it's empty.")); + player.sendMessage(StaticCaption.of("Skipping worlds.yml because it's empty.")); } try { @@ -173,7 +173,7 @@ public class DebugPaste extends SubCommand { incendoPaster.addFile(new IncendoPaster.PasteFile("MultiverseCore/worlds.yml", readFile(MultiverseWorlds))); } catch (final IOException ignored) { - player.sendMessage(StaticCaption.of("&cSkipping Multiverse world's.yml because Multiverse is not in use.")); + player.sendMessage(StaticCaption.of("Skipping Multiverse world's.yml because Multiverse is not in use.")); } try { diff --git a/Core/src/main/java/com/plotsquared/core/command/Music.java b/Core/src/main/java/com/plotsquared/core/command/Music.java index 987f34b26..f9404069d 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Music.java +++ b/Core/src/main/java/com/plotsquared/core/command/Music.java @@ -115,16 +115,16 @@ public class Music extends SubCommand { int index = 0; for (final String disc : DISCS) { - final String name = String.format("&r&6%s", disc); - final String[] lore = {"&r&aClick to play!"}; + final String name = String.format("%s", disc); + final String[] lore = {"Click to play!"}; final PlotItemStack item = new PlotItemStack(disc, 1, name, lore); inv.setItem(index++, item); } // Always add the cancel button // if (player.getMeta("music") != null) { - String name = "&r&6Cancel music"; - String[] lore = {"&r&cClick to cancel!"}; + String name = "Cancel music"; + String[] lore = {"Click to cancel!"}; inv.setItem(index, new PlotItemStack("bedrock", 1, name, lore)); // } diff --git a/Core/src/main/java/com/plotsquared/core/command/PluginCmd.java b/Core/src/main/java/com/plotsquared/core/command/PluginCmd.java index fee3fafd8..caa74c347 100644 --- a/Core/src/main/java/com/plotsquared/core/command/PluginCmd.java +++ b/Core/src/main/java/com/plotsquared/core/command/PluginCmd.java @@ -47,7 +47,7 @@ public class PluginCmd extends SubCommand { Template.of("version", String.valueOf(PlotSquared.get().getVersion())) ); player.sendMessage(StaticCaption.of(" >> Authors: Citymonstret & Empire92 & MattBDev & dordsor21 & NotMyFault & SirYwell")); - player.sendMessage(StaticCaption.of(" >> Wiki: https://wiki.intellectualsites.com/plotsquared/home")); + player.sendMessage(StaticCaption.of(" >> Wiki: https://wiki.intellectualsites.com/plotsquared/home")); player.sendMessage( StaticCaption.of(" >> Premium: "), Template.of("value", String.valueOf(PremiumVerification.isPremium())) diff --git a/Core/src/main/java/com/plotsquared/core/command/Relight.java b/Core/src/main/java/com/plotsquared/core/command/Relight.java index 6ae1baae6..7bca69673 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Relight.java +++ b/Core/src/main/java/com/plotsquared/core/command/Relight.java @@ -25,7 +25,7 @@ */ package com.plotsquared.core.command; -import com.plotsquared.core.configuration.caption.StaticCaption; +import com.plotsquared.core.configuration.caption.TranslatableCaption; import com.plotsquared.core.player.PlotPlayer; import com.plotsquared.core.util.task.RunnableVal2; import com.plotsquared.core.util.task.RunnableVal3; @@ -46,7 +46,7 @@ public class Relight extends Command { public CompletableFuture execute(final PlotPlayer player, String[] args, RunnableVal3 confirm, RunnableVal2 whenDone) { - player.sendMessage(StaticCaption.of("Not implemented.")); + player.sendMessage(TranslatableCaption.of("errors.not_implemented")); /* final Plot plot = player.getCurrentPlot(); if (plot == null) { player.sendMessage(TranslatableCaption.of("errors.not_in_plot")); diff --git a/Core/src/main/java/com/plotsquared/core/command/Setup.java b/Core/src/main/java/com/plotsquared/core/command/Setup.java index d71b5fb76..aa957553b 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Setup.java +++ b/Core/src/main/java/com/plotsquared/core/command/Setup.java @@ -61,14 +61,14 @@ public class Setup extends SubCommand { public void displayGenerators(PlotPlayer player) { StringBuilder message = new StringBuilder(); - message.append("&6What generator do you want?"); + message.append("What generator do you want?"); for (Entry> entry : SetupUtils.generators.entrySet()) { if (entry.getKey().equals(PlotSquared.platform().getPluginName())) { - message.append("\n&8 - &2").append(entry.getKey()).append(" (Default Generator)"); + message.append("\n - ").append(entry.getKey()).append(" (Default Generator)"); } else if (entry.getValue().isFull()) { - message.append("\n&8 - &7").append(entry.getKey()).append(" (Plot Generator)"); + message.append("\n - ").append(entry.getKey()).append(" (Plot Generator)"); } else { - message.append("\n&8 - &7").append(entry.getKey()).append(" (Unknown structure)"); + message.append("\n - ").append(entry.getKey()).append(" (Unknown structure)"); } } player.sendMessage(StaticCaption.of(message.toString())); diff --git a/Core/src/main/resources/lang/messages_en.json b/Core/src/main/resources/lang/messages_en.json index baa7301ec..ac34e7c2b 100644 --- a/Core/src/main/resources/lang/messages_en.json +++ b/Core/src/main/resources/lang/messages_en.json @@ -127,7 +127,7 @@ "economy.removed_granted_plot": "You used plot grant(s), you've got left.", "setup.setup_not_started": "No setup started.", - "setup.setup_init": "Usage: /plot setup ", + "setup.setup_init": "Usage: /plot setup ", "setup.setup_step": "[Step ] - Expecting: Default: ", "setup.setup_valid_arg": "Value set to .", "setup.setup_finished": "You should have been teleported to the created world. Otherwise you will need to set the generator manually using the bukkit.yml or your chosen world management plugin.", @@ -136,12 +136,12 @@ "setup.setup_world_name": "What do you want your world to be called?", "setup.setup_world_name_error": "You need to choose a world name!", "setup.setup_world_generator_error": "You must choose a generator!", - "setup.setup_world_type": "What world type do you want?\n - normal - Standard plot generation\n - $6augmented - Plot generation with terrain\n - partial - Vanilla with clusters of plots", + "setup.setup_world_type": "What world type do you want?\n - normal - Standard plot generation\n - augmented - Plot generation with terrain\n - partial - Vanilla with clusters of plots", "setup.setup_world_type_error": "You must choose a world type!", "setup.setup_wrong_generator": "The specified generator does not identify as BukkitPlotGenerator - You may need to manually configure the other plugin.", "setup.setup_world_name_format": "Non [a-z0-9_.-] character in the world name: ", "setup.setup_world_apply_plotsquared": "The world you specified already exists. After restarting, new terrain will use PlotSquared, however you may need to reset the world for it to generate correctly!", - "setup.setup_partial_area": "What terrain would you like in plots?\n - NONE - No terrain at all\n - ORE - Just some ore veins and trees\n - ROAD - Terrain separated by roads\n - ALL - Entirely vanilla generation", + "setup.setup_partial_area": "What terrain would you like in plots?\n - NONE - No terrain at all\n - ORE - Just some ore veins and trees\n - ROAD - Terrain separated by roads\n - ALL - Entirely vanilla generation", "setup.setup_partial_area_error": "You must choose the terrain!", "setup.setup_area_name": "What would you like this area called?", "setup.setup_area_non_alphanumerical": "The area ID must be alphanumerical!", @@ -212,8 +212,8 @@ "merge.success_merge": "Plots have been merged!", "merge.merge_requested": "Successfully sent a merge request.", "merge.no_available_automerge": "You do not own any adjacent plots in the specified direction or are not allowed to merge to the required size.", - "merge.unlink_impossible": "You can only unlink a mega-plot.", - "merge.unmerge_cancelled": "Unlink has been cancelled.", + "merge.unlink_impossible": "You can only unlink a mega-plot.", + "merge.unmerge_cancelled": "Unlink has been cancelled.", "merge.unlink_success": "Successfully unlinked plots.", "commandconfig.not_valid_subcommand": "That is not a valid subcommand.", @@ -281,16 +281,16 @@ "debugexec.task_not_running": "Task not running.", "debugexec.expiry_started": "Started plot expiry task.", "debugexec.expiry_already_started": "Plot expiry task already started.", - "debugexec.script_list_item": "[] ", + "debugexec.script_list_item": "[] ", - "expiry.expired_options_clicky": " expired: >>\n - >>Delete this ()\n - >>Remind later ()\n - >>Keep this ()\n - >>Don't show me this ()", + "expiry.expired_options_clicky": " expired: >>\n - >>Delete this ()\n - >>Remind later ()\n - >>Keep this ()\n - >>Don't show me this ()", "debugimportworlds.single_plot_area": "Must be a single plot area.", "debugimportworlds.world_container": "World container must be configured to be a separate directory to your base files.", "debugimportworlds.done": "Done!", - "debugroadregen.regen_done": "Regenerating plot south/east roads: \n - Result: Success!To regen all roads: ", + "debugroadregen.regen_done": "Regenerating plot south/east roads: \n - Result: Success!", + "debugroadregen.regen_all": "To regen all roads: ", "schematics.schematic_road_created": "Saved new road schematic. To test the schematic, fly to a few other plots and run .", "debugroadregen.schematic": "If no schematic is set, the following will not do anything.\n - To set a schematic, stand in a plot and use ", "debugroadregen.regenallroads": "To regenerate all roads: ", @@ -314,13 +314,14 @@ "errors.wait_for_timer": "A set block timer is bound to either the current plot or you. Please wait for it to finish.", "errors.tile_entity_cap_reached": "The total number of tile entities in this chunk may not exceed .", "error.plot_size": "Error: size <= 0.", - "error.command_went_wrong": "Something went wrong when executing that command...", + "error.command_went_wrong": "Something went wrong when executing that command.", + "errors.not_implemented": "Not implemented.", - "debugpaste.debug_report_created": "Uploaded a full debug to: ", + "debugpaste.debug_report_created": "Uploaded a full debug to: >", "debugpaste.creation_failed": "Failed to create the debugpaste: ", "debugsavetest.starting": "Starting debugsavetest.", - "debugsavetest.done": "Database sync finished..", + "debugsavetest.done": "Database sync finished.", "purge.purge_success": "Successfully purged plots.", @@ -331,7 +332,7 @@ "trim.trim_done": "Trim done.", "trim.trim_starting": "Collecting region data...", - "blocklist.block_list_separator": ", ", + "blocklist.block_list_separator": ", ", "biome.need_biome": "You need to specify a valid biome.", "biome.biome_set_to": "Plot biome set to ", @@ -358,7 +359,7 @@ "info.everyone": "Everyone", "info.plot_unowned": "The current plot must have an owner to perform this action.", "info.plot_info_unclaimed": "Plot is not yet claimed.", - "info.plot_info_header": "--------- INFO ---------", + "info.plot_info_header": "--------- INFO ---------", "info.plot_info_hidden": "You cannot view the information about this plot.", "info.plot_info_format": "
\nID: \nArea: \nAlias:\nOwner:\nBiome: \nCan Build: \nRating: \nSeen: \nTrusted:\nMembers:\nDenied:\nFlags:\nDescription: \n