Adding some more translation strings

This commit is contained in:
NotMyFault 2019-08-16 01:22:24 +02:00
parent 31c81fc9fe
commit 49b7c71fbb
6 changed files with 29 additions and 22 deletions

View File

@ -25,8 +25,7 @@ import com.github.intellectualsites.plotsquared.plot.util.MainUtil;
return sendMessage(player, Captions.NOT_IN_PLOT_WORLD); return sendMessage(player, Captions.NOT_IN_PLOT_WORLD);
} }
HybridUtils.manager.setupRoadSchematic(plot); HybridUtils.manager.setupRoadSchematic(plot);
MainUtil.sendMessage(player, MainUtil.sendMessage(player, Captions.SCHEMATIC_ROAD_CREATED);
"$1Saved new road schematic. To test the road, fly to a few other plots and use /plot debugroadregen");
return true; return true;
} }
} }

View File

@ -76,7 +76,7 @@ import java.net.URL;
Captions.NO_PERMISSION.send(player, Captions.PERMISSION_DOWNLOAD_WORLD); Captions.NO_PERMISSION.send(player, Captions.PERMISSION_DOWNLOAD_WORLD);
return false; return false;
} }
MainUtil.sendMessage(player, "&cNote: The `.mca` files are 512x512"); MainUtil.sendMessage(player, Captions.MCA_FILE_SIZE);
plot.addRunning(); plot.addRunning();
WorldUtil.IMP.saveWorld(world); WorldUtil.IMP.saveWorld(world);
WorldUtil.IMP.upload(plot, null, null, new RunnableVal<URL>() { WorldUtil.IMP.upload(plot, null, null, new RunnableVal<URL>() {

View File

@ -62,7 +62,7 @@ public class SchematicCmd extends SubCommand {
return false; return false;
} }
if (this.running) { if (this.running) {
MainUtil.sendMessage(player, "&cTask is already running."); MainUtil.sendMessage(player, Captions.TASK_IN_PROCESS);
return false; return false;
} }
final String location = args[1]; final String location = args[1];
@ -148,8 +148,7 @@ public class SchematicCmd extends SubCommand {
return false; return false;
} }
if (args.length != 2) { if (args.length != 2) {
MainUtil.sendMessage(player, MainUtil.sendMessage(player, Captions.SCHEMATIC_EXPORTALL_WORLD_ARGS);
"&cNeed world argument. Use &7/plot sch exportall <area>");
return false; return false;
} }
PlotArea area = PlotSquared.get().getPlotAreaByString(args[1]); PlotArea area = PlotSquared.get().getPlotAreaByString(args[1]);
@ -160,19 +159,17 @@ public class SchematicCmd extends SubCommand {
Collection<Plot> plots = area.getPlots(); Collection<Plot> plots = area.getPlots();
if (plots.isEmpty()) { if (plots.isEmpty()) {
MainUtil MainUtil
.sendMessage(player, "&cInvalid world. Use &7/plot sch exportall <area>"); .sendMessage(player, Captions.SCHEMATIC_EXPORTALL_WORLD);
return false; return false;
} }
boolean result = SchematicHandler.manager.exportAll(plots, null, null, boolean result = SchematicHandler.manager.exportAll(plots, null, null,
() -> MainUtil.sendMessage(player, "&aFinished mass export")); () -> MainUtil.sendMessage(player, Captions.SCHEMATIC_EXPORTALL_FINISHED));
if (!result) { if (!result) {
MainUtil.sendMessage(player, "&cTask is already running."); MainUtil.sendMessage(player, Captions.TASK_IN_PROCESS);
return false; return false;
} else { } else {
MainUtil.sendMessage(player, MainUtil.sendMessage(player, Captions.SCHEMATIC_EXPORTALL_STARTED);
"&3Plot&8->&3Schematic&8: &7Mass export has started. This may take a while."); MainUtil.sendMessage(player, Captions.SCHEMATIC_EXPORTALL_COUNT, plots.size());
MainUtil.sendMessage(player,
"&3Plot&8->&3Schematic&8: &7Found &c" + plots.size() + "&7 plots...");
} }
break; break;
} }
@ -184,7 +181,7 @@ public class SchematicCmd extends SubCommand {
return false; return false;
} }
if (this.running) { if (this.running) {
MainUtil.sendMessage(player, "&cTask is already running."); MainUtil.sendMessage(player, Captions.TASK_IN_PROCESS);
return false; return false;
} }
Location location = player.getLocation(); Location location = player.getLocation();
@ -203,14 +200,14 @@ public class SchematicCmd extends SubCommand {
} }
ArrayList<Plot> plots = Lists.newArrayList(plot); ArrayList<Plot> plots = Lists.newArrayList(plot);
boolean result = SchematicHandler.manager.exportAll(plots, null, null, () -> { boolean result = SchematicHandler.manager.exportAll(plots, null, null, () -> {
MainUtil.sendMessage(player, "&aFinished export"); MainUtil.sendMessage(player, Captions.SCHEMATIC_EXPORTALL_SINGLE_FINISHED);
SchematicCmd.this.running = false; SchematicCmd.this.running = false;
}); });
if (!result) { if (!result) {
MainUtil.sendMessage(player, "&cTask is already running."); MainUtil.sendMessage(player, Captions.TASK_IN_PROCESS);
return false; return false;
} else { } else {
MainUtil.sendMessage(player, "&7Starting export..."); MainUtil.sendMessage(player, Captions.SCHEMATIC_EXPORTALL_STARTED);
} }
break; break;
case "list": { case "list": {

View File

@ -41,7 +41,7 @@ public class Unlink extends SubCommand {
} }
Runnable runnable = () -> { Runnable runnable = () -> {
if (!plot.unlinkPlot(createRoad, createRoad)) { if (!plot.unlinkPlot(createRoad, createRoad)) {
MainUtil.sendMessage(player, "&cUnlink has been cancelled"); MainUtil.sendMessage(player, Captions.UNMERGE_CANCELLED);
return; return;
} }
MainUtil.sendMessage(player, Captions.UNLINK_SUCCESS); MainUtil.sendMessage(player, Captions.UNLINK_SUCCESS);

View File

@ -400,6 +400,15 @@ public enum Captions {
"Schematics"), SCHEMATIC_PASTE_SUCCESS("$4The schematic pasted successfully", "Schematics"), "Schematics"), SCHEMATIC_PASTE_SUCCESS("$4The schematic pasted successfully", "Schematics"),
SCHEMATIC_LIST("$4Saved Schematics: $1%s", "Schematics"), SCHEMATIC_LIST("$4Saved Schematics: $1%s", "Schematics"),
SCHEMATIC_ROAD_CREATED("$1Saved new road schematic. To test the schematic, fly to a few other plots and run /plot debugroadregen", "Schematics"),
MCA_FILE_SIZE("$1Note: The `.mca` files are 512x512", "Schematics"),
SCHEMATIC_EXPORTALL_STARTED("$1Starting export...", "Schematics"),
SCHEMATIC_EXPORTALL_WORLD_ARGS("$1Need world argument. Use $3/plot sch exportall <area>", "Schematics"),
SCHEMATIC_EXPORTALL_WORLD("$1Invalid world. Use &3/plot sch exportall <area>", "Schematic"),
SCHEMATIC_EXPORTALL_MASS_STARTED("$1Schematic mass export has been started. This may take a while", "Schematics"),
SCHEMATIC_EXPORTALL_COUNT("$1Found $3%s $1plots...", "Schematics"),
SCHEMATIC_EXPORTALL_FINISHED("$1Finished mass export", "Schematics"),
SCHEMATIC_EXPORTALL_SINGLE_FINISHED("$1Finished export", "Schematics"),
//</editor-fold> //</editor-fold>
//<editor-fold desc="Titles"> //<editor-fold desc="Titles">
TITLE_ENTERED_PLOT("$1Plot: %world%;%x%;%z%", "Titles"), TITLE_ENTERED_PLOT("$1Plot: %world%;%x%;%z%", "Titles"),
@ -470,8 +479,9 @@ public enum Captions {
NO_AVAILABLE_AUTOMERGE( NO_AVAILABLE_AUTOMERGE(
"$2You do not own any adjacent plots in the specified direction or are not allowed to merge to the required size.", "$2You do not own any adjacent plots in the specified direction or are not allowed to merge to the required size.",
"Merge"), UNLINK_REQUIRED("$2An unlink is required to do this.", "Merge"), "Merge"),
UNLINK_REQUIRED("$2An unlink is required to do this.", "Merge"),
UNMERGE_CANCELLED("$1Unlink has been cancelled", "Merge"),
UNLINK_IMPOSSIBLE("$2You can only unlink a mega-plot", "Merge"), UNLINK_SUCCESS( UNLINK_IMPOSSIBLE("$2You can only unlink a mega-plot", "Merge"), UNLINK_SUCCESS(
"$2Successfully unlinked plots.", "Merge"), "$2Successfully unlinked plots.", "Merge"),
//</editor-fold> //</editor-fold>
@ -505,6 +515,7 @@ public enum Captions {
WAIT_FOR_TIMER( WAIT_FOR_TIMER(
"$2A set block timer is bound to either the current plot or you. Please wait for it to finish", "$2A set block timer is bound to either the current plot or you. Please wait for it to finish",
"Errors"), "Errors"),
TASK_IN_PROCESS("$1Task is already running.", "Error"),
//</editor-fold> //</editor-fold>
DEBUG_REPORT_CREATED("$1Uploaded a full debug to: $1%url%", "Paste"), DEBUG_REPORT_CREATED("$1Uploaded a full debug to: $1%url%", "Paste"),

View File

@ -107,7 +107,7 @@ public class ProcessedWEExtent extends AbstractDelegateExtent {
if (this.BScount > Settings.Chunk_Processor.MAX_TILES) { if (this.BScount > Settings.Chunk_Processor.MAX_TILES) {
this.BSblocked = true; this.BSblocked = true;
PlotSquared.debug( PlotSquared.debug(
Captions.PREFIX + "&cdetected unsafe WorldEdit: " + location.getX() + "," Captions.PREFIX + "&cDetected unsafe WorldEdit: " + location.getX() + ","
+ location.getZ()); + location.getZ());
} }
if (WEManager if (WEManager
@ -162,7 +162,7 @@ public class ProcessedWEExtent extends AbstractDelegateExtent {
if (this.Ecount > Settings.Chunk_Processor.MAX_ENTITIES) { if (this.Ecount > Settings.Chunk_Processor.MAX_ENTITIES) {
this.Eblocked = true; this.Eblocked = true;
PlotSquared.debug( PlotSquared.debug(
Captions.PREFIX + "&cdetected unsafe WorldEdit: " + location.getBlockX() + "," Captions.PREFIX + "&cDetected unsafe WorldEdit: " + location.getBlockX() + ","
+ location.getBlockZ()); + location.getBlockZ());
} }
if (WEManager.maskContains(this.mask, location.getBlockX(), location.getBlockY(), if (WEManager.maskContains(this.mask, location.getBlockX(), location.getBlockY(),