Name which map name has a conflict when importing (#1844)
This commit is contained in:
committed by
GitHub
parent
e47dcd75ff
commit
9e811be477
@@ -380,7 +380,7 @@ editor.unsaved = [scarlet]You have unsaved changes![]\nAre you sure you want to
|
|||||||
editor.resizemap = Resize Map
|
editor.resizemap = Resize Map
|
||||||
editor.mapname = Map Name:
|
editor.mapname = Map Name:
|
||||||
editor.overwrite = [accent]Warning!\nThis overwrites an existing map.
|
editor.overwrite = [accent]Warning!\nThis overwrites an existing map.
|
||||||
editor.overwrite.confirm = [scarlet]Warning![] A map with this name already exists. Are you sure you want to overwrite it?
|
editor.overwrite.confirm = [scarlet]Warning![] A map with this name already exists. Are you sure you want to overwrite it?\n"[accent]{0}[]"
|
||||||
editor.exists = A map with this name already exists.
|
editor.exists = A map with this name already exists.
|
||||||
editor.selectmap = Select a map to load:
|
editor.selectmap = Select a map to load:
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ public class MapsDialog extends FloatingDialog{
|
|||||||
if(conflict != null && !conflict.custom){
|
if(conflict != null && !conflict.custom){
|
||||||
ui.showInfo(Core.bundle.format("editor.import.exists", name));
|
ui.showInfo(Core.bundle.format("editor.import.exists", name));
|
||||||
}else if(conflict != null){
|
}else if(conflict != null){
|
||||||
ui.showConfirm("$confirm", "$editor.overwrite.confirm", () -> {
|
ui.showConfirm("$confirm", Core.bundle.format("editor.overwrite.confirm", map.name()), () -> {
|
||||||
maps.tryCatchMapError(() -> {
|
maps.tryCatchMapError(() -> {
|
||||||
maps.removeMap(conflict);
|
maps.removeMap(conflict);
|
||||||
maps.importMap(map.file);
|
maps.importMap(map.file);
|
||||||
|
|||||||
Reference in New Issue
Block a user