Skip to content

Commit 3a8eb4f

Browse files
committed
Add Overwritten Translation, Fix Extra Line Breaks
1 parent c017259 commit 3a8eb4f

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

worldedit-core/src/main/java/com/sk89q/worldedit/command/SchematicCommands.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,7 @@ public void save(
553553
AsyncCommandBuilder.wrap(task, actor)
554554
.registerWithSupervisor(worldEdit.getSupervisor(), "Saving schematic " + filename)
555555
.setDelayMessage(Caption.of("worldedit.schematic.save.saving"))
556-
.onSuccess(Caption.of("fawe.worldedit.schematic.schematic.saved", filename, (overwrite ?
557-
" (overwriting previous file)." : ".")), null)
556+
.onSuccess(Caption.of("fawe.worldedit.schematic.schematic.saved", filename, (overwrite ? Caption.of("fawe.worldedit.schematic.schematic.overwritten") : ".")), null)
558557
.onFailure(
559558
Caption.of("worldedit.schematic.failed-to-save"),
560559
worldEdit.getPlatformManager().getPlatformCommandManager().getExceptionConverter()
@@ -1018,11 +1017,9 @@ public Void call() throws Exception {
10181017

10191018
if ((curKb) > allocatedKb) {
10201019
file.delete();
1021-
actor.print(Caption.of("fawe.error.schematic.over.disk.limit", String.format("%.1f", curKb)
1022-
, String.format("%dkb", allocatedKb)).color(TextColor.RED));
1020+
actor.print(Caption.of("fawe.error.schematic.over.disk.limit", String.format("%.1f", curKb), String.format("%dkb", allocatedKb)).color(TextColor.RED));
10231021
LOGGER.info(actor.getName() + " failed to save " + SCHEMATIC_NAME + " - not enough space!");
1024-
throw new WorldEditException(Caption.of("fawe.error.schematic.over.disk.limit", String.format("%.1f", curKb)
1025-
, String.format("%dkb", allocatedKb))) {
1022+
throw new WorldEditException(Caption.of("fawe.error.schematic.over.disk.limit", String.format("%.1f", curKb), String.format("%dkb", allocatedKb))) {
10261023
};
10271024
}
10281025
if (overwrite) {

worldedit-core/src/main/resources/lang/strings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"fawe.worldedit.schematic.schematic.move.failed": "{0} no moved: {1}",
6969
"fawe.worldedit.schematic.schematic.loaded": "{0} loaded. Paste it with //paste",
7070
"fawe.worldedit.schematic.schematic.saved": "{0} saved{1}",
71+
"fawe.worldedit.schematic.schematic.overwritten": " (overwriting previous file)",
7172
"fawe.worldedit.schematic.schematic.none": "No files found.",
7273
"fawe.worldedit.schematic.schematic.load-failure": "File could not be read or it does not exist: {0}. If you are specifying a format, you may not be specifying the correct one. Sponge schematic v2 and v3 both use the .schem file extension. To allow FAWE to select the format, do not specify one. If you are using a litematica schematic, it is not supported!",
7374
"fawe.worldedit.schematic.schematic.size": "{0} size {1} kb",

0 commit comments

Comments
 (0)