mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-28 00:34:19 +00:00
Themed chat reports for pack and studio
- Add ChatReport renderer with capped bullets and clickable hints - Group unknown content keys per registry and namespace - Drop unknown-key findings the compat gate already names
This commit is contained in:
1 parent
e0aeabd520
commit
8b98e2a61c
27 files changed
+535
-148
No files matched your search
@@ -32,6 +32,7 @@ import art.arcane.iris.studio.StudioSVC;
|
||||
import art.arcane.iris.world.IrisToolbelt;
|
||||
import art.arcane.iris.world.lifecycle.LifecycleOperationCoordinator;
|
||||
import art.arcane.iris.localization.C;
|
||||
import art.arcane.iris.localization.ChatReport;
|
||||
import art.arcane.iris.generation.terrain.IrisDimension;
|
||||
import art.arcane.iris.command.handlers.DimensionHandler;
|
||||
import art.arcane.iris.platform.bukkit.plugin.VolmitSender;
|
||||
@@ -54,6 +55,8 @@ import art.arcane.volmlib.util.localization.MessageArgument;
|
||||
import art.arcane.iris.localization.BukkitRuntimeMessages;
|
||||
@Director(name = "pack", aliases = {"pk"}, description = "Pack validation and maintenance", descriptionKey = "iris.director.commandpack.director.pack_validation_maintenance")
|
||||
public class CommandPack implements DirectorExecutor {
|
||||
private static final int PATH_REPORT_LIMIT = 10;
|
||||
|
||||
@Director(name = "update-world", description = "Stage an installed pack for a world and request a clean restart", descriptionKey = "iris.director.commanddeveloper.director.stage_world_generation_update")
|
||||
public void updateWorld(
|
||||
@Param(description = "The world to update", descriptionKey = "iris.director.commanddeveloper.param.world_update", contextual = true, contextualOverride = true)
|
||||
@@ -119,13 +122,15 @@ public class CommandPack implements DirectorExecutor {
|
||||
}
|
||||
int broken = 0;
|
||||
for (File dir : dirs) {
|
||||
PackValidationResult result = runValidate(s, dir);
|
||||
if (result != null && !result.isLoadable()) {
|
||||
PackValidationResult result = runValidate(dir);
|
||||
if (!result.isLoadable()) {
|
||||
broken++;
|
||||
reportResult(s, result);
|
||||
}
|
||||
}
|
||||
persistValidationCache(packsRoot);
|
||||
s.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_VALIDATION_COMPLETE_BROKEN_PACKS, MessageArgument.untrusted("broken", String.valueOf(broken)), MessageArgument.untrusted("value", String.valueOf(dirs.size()))));
|
||||
ChatReport.Tone summaryTone = broken == 0 ? ChatReport.Tone.SUCCESS : ChatReport.Tone.ERROR;
|
||||
s.sendMessage(summaryTone.paint(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_VALIDATION_COMPLETE_BROKEN_PACKS, MessageArgument.untrusted("broken", String.valueOf(broken)), MessageArgument.untrusted("value", String.valueOf(dirs.size())))));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -134,7 +139,7 @@ public class CommandPack implements DirectorExecutor {
|
||||
s.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_PACK_NOT_FOUND_UNDER_PACKS, MessageArgument.untrusted("pack", String.valueOf(pack))));
|
||||
return;
|
||||
}
|
||||
runValidate(s, target);
|
||||
reportResult(s, runValidate(target));
|
||||
persistValidationCache(packsRoot);
|
||||
}
|
||||
|
||||
@@ -165,19 +170,18 @@ public class CommandPack implements DirectorExecutor {
|
||||
if ("apply".equalsIgnoreCase(mode)) {
|
||||
PackResourceCleanup.ApplyResult result = PackResourceCleanup.apply(packFolder);
|
||||
if (!result.success()) {
|
||||
s.sendMessage(IrisLanguage.text(
|
||||
reportPaths(s, ChatReport.Tone.ERROR, IrisLanguage.text(
|
||||
BukkitRuntimeMessages.COMMAND_PACK_CLEANUP_FAILED,
|
||||
MessageArgument.untrusted("error", String.valueOf(result.error()))
|
||||
));
|
||||
reportPaths(s, result.quarantinedPaths(), BukkitRuntimeMessages.COMMAND_PACK_PATH_STILL_QUARANTINED);
|
||||
), result.quarantinedPaths(), BukkitRuntimeMessages.COMMAND_PACK_PATH_STILL_QUARANTINED);
|
||||
return;
|
||||
}
|
||||
if (!result.changed()) {
|
||||
s.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_NO_CLEANUP_CANDIDATES_FOUND_PACK, MessageArgument.untrusted("pack", String.valueOf(pack))));
|
||||
return;
|
||||
}
|
||||
s.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_QUARANTINED_CLEANUP_CANDIDATE_S_UNDER, MessageArgument.untrusted("size", String.valueOf(result.quarantinedPaths().size())), MessageArgument.untrusted("quarantinePath", String.valueOf(result.quarantinePath()))));
|
||||
reportPaths(s, result.quarantinedPaths(), BukkitRuntimeMessages.COMMAND_PACK_PATH_QUARANTINED);
|
||||
reportPaths(s, ChatReport.Tone.SUCCESS, IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_QUARANTINED_CLEANUP_CANDIDATE_S_UNDER, MessageArgument.untrusted("size", String.valueOf(result.quarantinedPaths().size())), MessageArgument.untrusted("quarantinePath", String.valueOf(result.quarantinePath()))),
|
||||
result.quarantinedPaths(), BukkitRuntimeMessages.COMMAND_PACK_PATH_QUARANTINED);
|
||||
return;
|
||||
}
|
||||
if (!"preview".equalsIgnoreCase(mode)) {
|
||||
@@ -196,8 +200,8 @@ public class CommandPack implements DirectorExecutor {
|
||||
s.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_NO_CLEANUP_CANDIDATES_FOUND_PACK_2, MessageArgument.untrusted("pack", String.valueOf(pack))));
|
||||
return;
|
||||
}
|
||||
s.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_CLEANUP_PREVIEW_PACK_CANDIDATE_S_NO_FILES_WERE_CHANGED, MessageArgument.untrusted("pack", String.valueOf(pack)), MessageArgument.untrusted("size", String.valueOf(preview.candidatePaths().size()))));
|
||||
reportPaths(s, preview.candidatePaths(), BukkitRuntimeMessages.COMMAND_PACK_PATH_CANDIDATE);
|
||||
reportPaths(s, ChatReport.Tone.INFO, IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_CLEANUP_PREVIEW_PACK_CANDIDATE_S_NO_FILES_WERE_CHANGED, MessageArgument.untrusted("pack", String.valueOf(pack)), MessageArgument.untrusted("size", String.valueOf(preview.candidatePaths().size()))),
|
||||
preview.candidatePaths(), BukkitRuntimeMessages.COMMAND_PACK_PATH_CANDIDATE);
|
||||
s.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_RUN_IRIS_PACK_CLEANUP_MODE_APPLY_QUARANTINE_THESE_CANDIDATES_AFTER_FRESH_SCAN, MessageArgument.untrusted("pack", String.valueOf(pack))));
|
||||
}
|
||||
|
||||
@@ -216,8 +220,8 @@ public class CommandPack implements DirectorExecutor {
|
||||
if ("apply".equalsIgnoreCase(mode)) {
|
||||
PackResourceCleanup.RestoreResult result = PackResourceCleanup.restoreLatest(packFolder);
|
||||
if (!result.conflicts().isEmpty()) {
|
||||
s.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_RESTORE_REFUSED_BECAUSE_DESTINATION_S_ALREADY_EXIST, MessageArgument.untrusted("size", String.valueOf(result.conflicts().size()))));
|
||||
reportPaths(s, result.conflicts(), BukkitRuntimeMessages.COMMAND_PACK_PATH_CONFLICT);
|
||||
reportPaths(s, ChatReport.Tone.ERROR, IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_RESTORE_REFUSED_BECAUSE_DESTINATION_S_ALREADY_EXIST, MessageArgument.untrusted("size", String.valueOf(result.conflicts().size()))),
|
||||
result.conflicts(), BukkitRuntimeMessages.COMMAND_PACK_PATH_CONFLICT);
|
||||
return;
|
||||
}
|
||||
if (!result.success()) {
|
||||
@@ -231,8 +235,8 @@ public class CommandPack implements DirectorExecutor {
|
||||
s.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_NOTHING_RESTORE_PACK, MessageArgument.untrusted("pack", String.valueOf(pack))));
|
||||
return;
|
||||
}
|
||||
s.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_RESTORED_FILE_S_FROM, MessageArgument.untrusted("size", String.valueOf(result.restoredPaths().size())), MessageArgument.untrusted("dumpPath", String.valueOf(result.dumpPath()))));
|
||||
reportPaths(s, result.restoredPaths(), BukkitRuntimeMessages.COMMAND_PACK_PATH_RESTORED);
|
||||
reportPaths(s, ChatReport.Tone.SUCCESS, IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_RESTORED_FILE_S_FROM, MessageArgument.untrusted("size", String.valueOf(result.restoredPaths().size())), MessageArgument.untrusted("dumpPath", String.valueOf(result.dumpPath()))),
|
||||
result.restoredPaths(), BukkitRuntimeMessages.COMMAND_PACK_PATH_RESTORED);
|
||||
return;
|
||||
}
|
||||
if (!"preview".equalsIgnoreCase(mode)) {
|
||||
@@ -251,11 +255,11 @@ public class CommandPack implements DirectorExecutor {
|
||||
s.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_NOTHING_RESTORE_PACK_2, MessageArgument.untrusted("pack", String.valueOf(pack))));
|
||||
return;
|
||||
}
|
||||
s.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_RESTORE_PREVIEW_FILE_S_NO_FILES_WERE_CHANGED, MessageArgument.untrusted("dumpPath", String.valueOf(preview.dumpPath())), MessageArgument.untrusted("size", String.valueOf(preview.filePaths().size()))));
|
||||
reportPaths(s, preview.filePaths(), BukkitRuntimeMessages.COMMAND_PACK_PATH_FILE);
|
||||
reportPaths(s, ChatReport.Tone.INFO, IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_RESTORE_PREVIEW_FILE_S_NO_FILES_WERE_CHANGED, MessageArgument.untrusted("dumpPath", String.valueOf(preview.dumpPath())), MessageArgument.untrusted("size", String.valueOf(preview.filePaths().size()))),
|
||||
preview.filePaths(), BukkitRuntimeMessages.COMMAND_PACK_PATH_FILE);
|
||||
if (!preview.conflicts().isEmpty()) {
|
||||
s.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_RESTORE_IS_BLOCKED_BY_EXISTING_DESTINATION_S, MessageArgument.untrusted("size", String.valueOf(preview.conflicts().size()))));
|
||||
reportPaths(s, preview.conflicts(), BukkitRuntimeMessages.COMMAND_PACK_PATH_CONFLICT);
|
||||
reportPaths(s, ChatReport.Tone.ERROR, IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_RESTORE_IS_BLOCKED_BY_EXISTING_DESTINATION_S, MessageArgument.untrusted("size", String.valueOf(preview.conflicts().size()))),
|
||||
preview.conflicts(), BukkitRuntimeMessages.COMMAND_PACK_PATH_CONFLICT);
|
||||
return;
|
||||
}
|
||||
s.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_RUN_IRIS_PACK_RESTORE_MODE_APPLY_RESTORE_AFTER_FRESH_CONFLICT_CHECK, MessageArgument.untrusted("pack", String.valueOf(pack))));
|
||||
@@ -272,17 +276,9 @@ public class CommandPack implements DirectorExecutor {
|
||||
s.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_NO_VALIDATION_RESULTS_RECORDED_RUN_IRIS_PACK_VALIDATE_FIRST));
|
||||
return;
|
||||
}
|
||||
PackValidationRegistry.snapshot().forEach((name, result) -> {
|
||||
TextKey key = result.isLoadable()
|
||||
? BukkitRuntimeMessages.COMMAND_PACK_STATUS_OK
|
||||
: BukkitRuntimeMessages.COMMAND_PACK_STATUS_BROKEN;
|
||||
s.sendMessage(IrisLanguage.text(
|
||||
key,
|
||||
MessageArgument.untrusted("pack", name),
|
||||
MessageArgument.trusted("blocking", result.getBlockingErrors().size()),
|
||||
MessageArgument.trusted("warnings", result.getWarnings().size())
|
||||
));
|
||||
});
|
||||
ChatReport.Builder report = ChatReport.of(ChatReport.Tone.INFO, "Pack validation status").unlimited();
|
||||
PackValidationRegistry.snapshot().forEach((name, result) -> report.styledItem(statusLine(name, result)));
|
||||
s.sendReport(report.build());
|
||||
return;
|
||||
}
|
||||
PackValidationResult result = PackValidationRegistry.get(pack);
|
||||
@@ -306,15 +302,11 @@ public class CommandPack implements DirectorExecutor {
|
||||
return;
|
||||
}
|
||||
for (Map.Entry<String, PackValidationResult> entry : snapshot.entrySet()) {
|
||||
for (String line : compatOutput(entry.getKey(), entry.getValue())) {
|
||||
s.sendMessage(line);
|
||||
}
|
||||
s.sendReport(compatReport(entry.getKey(), entry.getValue()));
|
||||
}
|
||||
return;
|
||||
}
|
||||
for (String line : compatOutput(pack, PackValidationRegistry.get(pack))) {
|
||||
s.sendMessage(line);
|
||||
}
|
||||
s.sendReport(compatReport(pack, PackValidationRegistry.get(pack)));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -322,33 +314,31 @@ public class CommandPack implements DirectorExecutor {
|
||||
* printed with every subject; the boot listing is the capped form of the same data.
|
||||
*/
|
||||
static List<String> compatOutput(String pack, PackValidationResult result) {
|
||||
List<String> lines = new ArrayList<>();
|
||||
return compatReport(pack, result).lines().stream().map(ChatReport.Line::text).toList();
|
||||
}
|
||||
|
||||
static ChatReport compatReport(String pack, PackValidationResult result) {
|
||||
if (result == null) {
|
||||
lines.add(IrisLanguage.text(
|
||||
return ChatReport.of(ChatReport.Tone.WARNING, IrisLanguage.text(
|
||||
BukkitRuntimeMessages.COMMAND_PACK_NO_VALIDATION_RESULT_RUN_IRIS_PACK_VALIDATE,
|
||||
MessageArgument.untrusted("pack", String.valueOf(pack)),
|
||||
MessageArgument.untrusted("pack2", String.valueOf(pack))));
|
||||
return lines;
|
||||
MessageArgument.untrusted("pack2", String.valueOf(pack)))).build();
|
||||
}
|
||||
String version = compatVersion(result);
|
||||
if (result.getCompatFindings().isEmpty()) {
|
||||
lines.add(IrisLanguage.text(
|
||||
return ChatReport.of(ChatReport.Tone.SUCCESS, IrisLanguage.text(
|
||||
BukkitRuntimeMessages.COMMAND_PACK_COMPAT_NONE,
|
||||
MessageArgument.untrusted("pack", pack),
|
||||
MessageArgument.untrusted("version", version)));
|
||||
return lines;
|
||||
MessageArgument.untrusted("version", version))).build();
|
||||
}
|
||||
lines.add(IrisLanguage.text(
|
||||
BukkitRuntimeMessages.COMMAND_PACK_COMPAT_HEADER,
|
||||
MessageArgument.untrusted("pack", pack),
|
||||
MessageArgument.untrusted("version", version)));
|
||||
for (String line : PackCompatReport.of(result.getCompatFindings()).keyLines(0)) {
|
||||
lines.add(IrisLanguage.text(
|
||||
BukkitRuntimeMessages.COMMAND_PACK_MESSAGE_2,
|
||||
MessageArgument.untrusted("value", line)));
|
||||
}
|
||||
lines.add(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_COMPAT_REMEDY));
|
||||
return lines;
|
||||
return ChatReport.of(ChatReport.Tone.WARNING, IrisLanguage.text(
|
||||
BukkitRuntimeMessages.COMMAND_PACK_COMPAT_HEADER,
|
||||
MessageArgument.untrusted("pack", pack),
|
||||
MessageArgument.untrusted("version", version)))
|
||||
.items(PackCompatReport.of(result.getCompatFindings()).keyLines(0))
|
||||
.unlimited()
|
||||
.hint(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_COMPAT_REMEDY), null)
|
||||
.build();
|
||||
}
|
||||
|
||||
/** The live Minecraft version, falling back to the one the validation ran against. */
|
||||
@@ -363,7 +353,7 @@ public class CommandPack implements DirectorExecutor {
|
||||
return persisted == null || persisted.isBlank() ? "unknown" : persisted;
|
||||
}
|
||||
|
||||
PackValidationResult runValidate(VolmitSender s, File packFolder) {
|
||||
PackValidationResult runValidate(File packFolder) {
|
||||
PackValidationRegistry.ValidationTicket ticket =
|
||||
PackValidationRegistry.tryBeginValidation(packFolder.toPath());
|
||||
PackValidationResult result;
|
||||
@@ -399,7 +389,6 @@ public class CommandPack implements DirectorExecutor {
|
||||
result = new PackValidationResult(packFolder.getName(),
|
||||
List.of("Pack content changed during validation."), List.of(), System.currentTimeMillis());
|
||||
}
|
||||
reportResult(s, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -443,24 +432,38 @@ public class CommandPack implements DirectorExecutor {
|
||||
}
|
||||
|
||||
private void reportResult(VolmitSender s, PackValidationResult result) {
|
||||
if (result.isLoadable()) {
|
||||
s.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_PACK_IS_LOADABLE_WARNINGS, MessageArgument.untrusted("packName", String.valueOf(result.getPackName())), MessageArgument.untrusted("size", String.valueOf(result.getWarnings().size()))));
|
||||
} else {
|
||||
s.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_PACK_IS_BROKEN, MessageArgument.untrusted("packName", String.valueOf(result.getPackName()))));
|
||||
for (String reason : result.getBlockingErrors()) {
|
||||
s.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_MESSAGE, MessageArgument.untrusted("reason", String.valueOf(reason))));
|
||||
}
|
||||
}
|
||||
int wMax = Math.min(10, result.getWarnings().size());
|
||||
for (int i = 0; i < wMax; i++) {
|
||||
s.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_MESSAGE_2, MessageArgument.untrusted("value", String.valueOf(result.getWarnings().get(i)))));
|
||||
}
|
||||
if (result.getWarnings().size() > wMax) {
|
||||
s.sendMessage(IrisLanguage.text(
|
||||
BukkitRuntimeMessages.COMMAND_PACK_MORE_WARNING_S,
|
||||
MessageArgument.trusted("count", result.getWarnings().size() - wMax)
|
||||
));
|
||||
s.sendReport(validationReport(result));
|
||||
}
|
||||
|
||||
private static String statusLine(String name, PackValidationResult result) {
|
||||
TextKey key = result.isLoadable()
|
||||
? BukkitRuntimeMessages.COMMAND_PACK_STATUS_OK
|
||||
: BukkitRuntimeMessages.COMMAND_PACK_STATUS_BROKEN;
|
||||
ChatReport.Tone tone = !result.isLoadable() ? ChatReport.Tone.ERROR
|
||||
: result.getWarnings().isEmpty() ? ChatReport.Tone.SUCCESS : ChatReport.Tone.WARNING;
|
||||
return tone.paint(IrisLanguage.text(
|
||||
key,
|
||||
MessageArgument.untrusted("pack", name),
|
||||
MessageArgument.trusted("blocking", result.getBlockingErrors().size()),
|
||||
MessageArgument.trusted("warnings", result.getWarnings().size())));
|
||||
}
|
||||
|
||||
static ChatReport validationReport(PackValidationResult result) {
|
||||
String packName = String.valueOf(result.getPackName());
|
||||
if (!result.isLoadable()) {
|
||||
String revalidate = "/iris pack validate " + packName;
|
||||
return ChatReport.of(ChatReport.Tone.ERROR, IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_PACK_IS_BROKEN,
|
||||
MessageArgument.untrusted("packName", packName)))
|
||||
.items(result.getBlockingErrors())
|
||||
.hint("Fix the pack, then run " + revalidate, revalidate)
|
||||
.build();
|
||||
}
|
||||
ChatReport.Tone tone = result.getWarnings().isEmpty() ? ChatReport.Tone.SUCCESS : ChatReport.Tone.WARNING;
|
||||
return ChatReport.of(tone, IrisLanguage.text(BukkitRuntimeMessages.COMMAND_PACK_PACK_IS_LOADABLE_WARNINGS,
|
||||
MessageArgument.untrusted("packName", packName),
|
||||
MessageArgument.untrusted("size", String.valueOf(result.getWarnings().size()))))
|
||||
.items(result.getWarnings())
|
||||
.build();
|
||||
}
|
||||
|
||||
private File findPack(VolmitSender sender, String pack) {
|
||||
@@ -476,17 +479,12 @@ public class CommandPack implements DirectorExecutor {
|
||||
return packFolder;
|
||||
}
|
||||
|
||||
private void reportPaths(VolmitSender sender, List<String> paths, TextKey label) {
|
||||
int max = Math.min(10, paths.size());
|
||||
for (int i = 0; i < max; i++) {
|
||||
sender.sendMessage(IrisLanguage.text(
|
||||
BukkitCommandMessages.COMMAND_PACK_MESSAGE,
|
||||
MessageArgument.untrusted("label", IrisLanguage.text(label)),
|
||||
MessageArgument.untrusted("value", paths.get(i))
|
||||
));
|
||||
}
|
||||
if (paths.size() > max) {
|
||||
sender.sendMessage(IrisLanguage.text(BukkitCommandMessages.COMMAND_PACK_MORE, MessageArgument.untrusted("value", (paths.size() - max))));
|
||||
private void reportPaths(VolmitSender sender, ChatReport.Tone tone, String header, List<String> paths, TextKey label) {
|
||||
ChatReport.Builder report = ChatReport.of(tone, header).limit(PATH_REPORT_LIMIT);
|
||||
String labelText = IrisLanguage.plain(label);
|
||||
for (String path : paths) {
|
||||
report.entry(labelText, path);
|
||||
}
|
||||
sender.sendReport(report.build());
|
||||
}
|
||||
}
|
||||
@@ -125,7 +125,6 @@ public class CommandStudio implements DirectorExecutor {
|
||||
long seed,
|
||||
@Param(defaultValue = "false", description = "Attempt to open Studio before a required registry restart", aliases = "f")
|
||||
boolean force) {
|
||||
sender().sendMessage(IrisLanguage.text(BukkitCommandMessagesExtended.COMMAND_STUDIO_OPENING_STUDIO_PACK_SEED, MessageArgument.untrusted("value", dimension.getName()), MessageArgument.untrusted("seed", seed)));
|
||||
Iris.service(StudioSVC.class).open(sender(), seed, dimension.getLoadKey(), force);
|
||||
}
|
||||
|
||||
|
||||
+3
-4
@@ -7,7 +7,6 @@ import art.arcane.iris.pack.PackValidationRegistry;
|
||||
import art.arcane.iris.pack.PackValidationCache;
|
||||
import art.arcane.iris.pack.PackValidationResult;
|
||||
import art.arcane.iris.pack.PackValidator;
|
||||
import art.arcane.iris.platform.bukkit.plugin.VolmitSender;
|
||||
import org.junit.After;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
@@ -83,7 +82,7 @@ public class CommandPackValidationPublicationTest {
|
||||
try (MockedStatic<PackValidator> validator = mockStatic(PackValidator.class)) {
|
||||
validator.when(() -> PackValidator.validate(root)).thenReturn(valid);
|
||||
|
||||
assertSame(valid, new CommandPack().runValidate(mock(VolmitSender.class), root));
|
||||
assertSame(valid, new CommandPack().runValidate(root));
|
||||
|
||||
assertSame(valid, PackValidationRegistry.get(root.toPath()));
|
||||
assertSame(valid, PackValidationRegistry.get(root.getName()));
|
||||
@@ -101,7 +100,7 @@ public class CommandPackValidationPublicationTest {
|
||||
}
|
||||
});
|
||||
|
||||
assertFalse(new CommandPack().runValidate(mock(VolmitSender.class), root).isLoadable());
|
||||
assertFalse(new CommandPack().runValidate(root).isLoadable());
|
||||
assertNull(PackValidationRegistry.get(root.toPath()));
|
||||
assertNull(PackValidationRegistry.get(root.getName()));
|
||||
}
|
||||
@@ -119,7 +118,7 @@ public class CommandPackValidationPublicationTest {
|
||||
return new PackValidationResult(root.getName(), List.of(), List.of(), 1L);
|
||||
});
|
||||
|
||||
assertFalse(new CommandPack().runValidate(mock(VolmitSender.class), root).isLoadable());
|
||||
assertFalse(new CommandPack().runValidate(root).isLoadable());
|
||||
assertFalse(PackValidationRegistry.get(root.toPath()).isLoadable());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,7 +442,7 @@ public final class BukkitRuntimeMessages {
|
||||
);
|
||||
public static final TextKey STUDIO_S_V_C_CANNOT_OPEN_STUDIO_PACK_HAS_BLOCKING_ERRORS = TextKey.of(
|
||||
"iris.bukkit.runtime.studiosvc.cannot_open_studio_pack_has_blocking_errors",
|
||||
"Cannot open studio '" + "{dimm}" + "' - pack has blocking errors:"
|
||||
"Can't open Studio for " + "{dimm}" + ": the pack has blocking errors"
|
||||
);
|
||||
public static final TextKey STUDIO_S_V_C_MESSAGE = TextKey.of(
|
||||
"iris.bukkit.runtime.studiosvc.message",
|
||||
@@ -450,7 +450,7 @@ public final class BukkitRuntimeMessages {
|
||||
);
|
||||
public static final TextKey STUDIO_S_V_C_FIX_PACK_RUN_IRIS_PACK_VALIDATE_REVALIDATE = TextKey.of(
|
||||
"iris.bukkit.runtime.studiosvc.fix_pack_run_iris_pack_validate_revalidate",
|
||||
"Fix the pack and run /iris pack validate " + "{dimm}" + " to revalidate."
|
||||
"Fix the pack, then run /iris pack validate " + "{dimm}"
|
||||
);
|
||||
public static final TextKey STUDIO_S_V_C_FAILED_CLOSE_EXISTING_STUDIO_PROJECT = TextKey.of(
|
||||
"iris.bukkit.runtime.studiosvc.failed_close_existing_studio_project",
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
package art.arcane.iris.localization;
|
||||
|
||||
import art.arcane.iris.spi.IrisLogging;
|
||||
import art.arcane.volmlib.util.localization.MessageArgument;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public final class ChatReport {
|
||||
public static final int DEFAULT_ITEM_LIMIT = 8;
|
||||
private static final String ITEM_BULLET = " » ";
|
||||
private static final String CONTINUATION_INDENT = " ";
|
||||
private static final Pattern LEGACY_COLOR = Pattern.compile("(?i)[§&][0-9A-FK-ORX]");
|
||||
|
||||
public enum Tone {
|
||||
SUCCESS(C.IRIS),
|
||||
INFO(C.AQUA),
|
||||
WARNING(C.GOLD),
|
||||
ERROR(C.RED);
|
||||
|
||||
private final C color;
|
||||
|
||||
Tone(C color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public C color() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public String paint(String text) {
|
||||
return color + clean(text);
|
||||
}
|
||||
}
|
||||
|
||||
public record Line(String text, String command) {
|
||||
public boolean clickable() {
|
||||
return command != null && !command.isBlank();
|
||||
}
|
||||
}
|
||||
|
||||
private final Tone tone;
|
||||
private final String title;
|
||||
private final List<String> items;
|
||||
private final int itemLimit;
|
||||
private final String hint;
|
||||
private final String hintCommand;
|
||||
|
||||
private ChatReport(Builder builder) {
|
||||
this.tone = builder.tone;
|
||||
this.title = builder.title;
|
||||
this.items = List.copyOf(builder.items);
|
||||
this.itemLimit = builder.itemLimit;
|
||||
this.hint = builder.hint;
|
||||
this.hintCommand = builder.hintCommand;
|
||||
}
|
||||
|
||||
public static Builder of(Tone tone, String title) {
|
||||
return new Builder(tone, title);
|
||||
}
|
||||
|
||||
public static String clean(String text) {
|
||||
if (text == null) {
|
||||
return "";
|
||||
}
|
||||
return LEGACY_COLOR.matcher(text).replaceAll("")
|
||||
.replace("<", "‹")
|
||||
.replace(">", "›")
|
||||
.strip();
|
||||
}
|
||||
|
||||
public static String label(String label, String value) {
|
||||
return C.GRAY + clean(label) + C.DARK_GRAY + ": " + C.IRIS + clean(value);
|
||||
}
|
||||
|
||||
public static String highlight(String text) {
|
||||
return C.IRIS + clean(text) + C.GRAY;
|
||||
}
|
||||
|
||||
public Tone tone() {
|
||||
return tone;
|
||||
}
|
||||
|
||||
public List<Line> lines() {
|
||||
List<Line> lines = new ArrayList<>();
|
||||
lines.add(new Line(tone.paint(title), null));
|
||||
int shown = Math.min(itemLimit, items.size());
|
||||
for (int index = 0; index < shown; index++) {
|
||||
lines.add(new Line(C.DARK_GRAY + ITEM_BULLET + C.GRAY + items.get(index), null));
|
||||
}
|
||||
int hidden = items.size() - shown;
|
||||
if (hidden > 0) {
|
||||
lines.add(new Line(C.DARK_GRAY + CONTINUATION_INDENT
|
||||
+ clean(IrisLanguage.plain(RuntimeUiMessages.REPORT_MORE, MessageArgument.trusted("count", hidden))), null));
|
||||
}
|
||||
if (hint != null) {
|
||||
lines.add(new Line(C.GRAY + hint, hintCommand));
|
||||
}
|
||||
return lines;
|
||||
}
|
||||
|
||||
public void log() {
|
||||
for (Line line : lines()) {
|
||||
logLine(line.text());
|
||||
}
|
||||
}
|
||||
|
||||
private void logLine(String text) {
|
||||
switch (tone) {
|
||||
case ERROR -> IrisLogging.error(text);
|
||||
case WARNING -> IrisLogging.warn(text);
|
||||
default -> IrisLogging.info(text);
|
||||
}
|
||||
}
|
||||
|
||||
public static final class Builder {
|
||||
private final Tone tone;
|
||||
private final String title;
|
||||
private final List<String> items = new ArrayList<>();
|
||||
private int itemLimit = DEFAULT_ITEM_LIMIT;
|
||||
private String hint;
|
||||
private String hintCommand;
|
||||
|
||||
private Builder(Tone tone, String title) {
|
||||
this.tone = tone;
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public Builder item(String text) {
|
||||
String cleaned = clean(text);
|
||||
if (!cleaned.isEmpty()) {
|
||||
items.add(cleaned);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder styledItem(String styledText) {
|
||||
if (styledText != null && !styledText.isBlank()) {
|
||||
items.add(styledText);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder items(Collection<String> texts) {
|
||||
for (String text : texts) {
|
||||
item(text);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder entry(String label, Object value) {
|
||||
items.add(label(label, String.valueOf(value)));
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder limit(int maxItems) {
|
||||
this.itemLimit = Math.max(0, maxItems);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder unlimited() {
|
||||
this.itemLimit = Integer.MAX_VALUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder hint(String text, String command) {
|
||||
String cleaned = clean(text);
|
||||
this.hint = command == null ? cleaned : cleaned.replace(command, highlight(command));
|
||||
this.hintCommand = command;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ChatReport build() {
|
||||
return new ChatReport(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -122,6 +122,8 @@ public final class RuntimeUiMessages {
|
||||
public static final TextKey PREGEN_PAUSE_HOVER = TextKey.of("iris.runtime.pregen.button.pause.hover", "Toggle pregeneration pause state");
|
||||
public static final TextKey PREGEN_STOP_BUTTON = TextKey.of("iris.runtime.pregen.button.stop", "Stop");
|
||||
public static final TextKey PREGEN_STOP_HOVER = TextKey.of("iris.runtime.pregen.button.stop.hover", "Finish the current region and stop pregeneration");
|
||||
public static final TextKey REPORT_MORE = TextKey.of("iris.runtime.report.more", "+{count} more");
|
||||
public static final TextKey REPORT_CLICK_TO_INSERT = TextKey.of("iris.runtime.report.click_to_insert", "Click to insert {command}");
|
||||
|
||||
private static final List<MessageKey> KEYS = List.of(
|
||||
FINDING_REGIONS,
|
||||
@@ -239,7 +241,9 @@ public final class RuntimeUiMessages {
|
||||
PREGEN_PAUSE_BUTTON,
|
||||
PREGEN_PAUSE_HOVER,
|
||||
PREGEN_STOP_BUTTON,
|
||||
PREGEN_STOP_HOVER
|
||||
PREGEN_STOP_HOVER,
|
||||
REPORT_MORE,
|
||||
REPORT_CLICK_TO_INSERT
|
||||
);
|
||||
|
||||
private RuntimeUiMessages() {
|
||||
|
||||
@@ -46,6 +46,7 @@ import java.util.stream.Stream;
|
||||
|
||||
public final class ContentKeyValidator {
|
||||
private static final int MAX_SUGGESTION_SCANS = 4096;
|
||||
private static final int GROUPED_KEYS_SHOWN = 5;
|
||||
private static final int MAX_OBJECT_PALETTE_SCANS = 20_000;
|
||||
private static final String DEFAULT_NAMESPACE = "minecraft";
|
||||
private static final String STRICT_PROPERTY = "iris.strictContent";
|
||||
@@ -403,10 +404,67 @@ public final class ContentKeyValidator {
|
||||
* @param strict issues the caller may promote to blocking errors under {@link #strictContent()}
|
||||
* @param advisory issues that stay warnings whatever the mode - see {@link #collectContentKeyIssues(File)}
|
||||
*/
|
||||
record ContentKeyIssues(List<String> strict, List<String> advisory) {
|
||||
record ContentKeyIssues(List<ContentKeyError> strictKeys, List<String> propertyIssues, List<ContentKeyError> advisoryKeys) {
|
||||
static ContentKeyIssues none() {
|
||||
return new ContentKeyIssues(List.of(), List.of());
|
||||
return new ContentKeyIssues(List.of(), List.of(), List.of());
|
||||
}
|
||||
|
||||
List<String> strict(Set<String> alreadyReportedKeys) {
|
||||
List<String> messages = new ArrayList<>(groupedMessages(withoutKeys(strictKeys, alreadyReportedKeys)));
|
||||
messages.addAll(propertyIssues);
|
||||
return messages;
|
||||
}
|
||||
|
||||
List<String> advisory(Set<String> alreadyReportedKeys) {
|
||||
return groupedMessages(withoutKeys(advisoryKeys, alreadyReportedKeys));
|
||||
}
|
||||
|
||||
private static List<ContentKeyError> withoutKeys(List<ContentKeyError> errors, Set<String> excluded) {
|
||||
return errors.stream().filter(error -> !excluded.contains(error.key())).toList();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* One message per registry and namespace instead of one per key, so a pack that references a missing plugin's
|
||||
* blocks reports a single line rather than one line per block.
|
||||
*/
|
||||
static List<String> groupedMessages(List<ContentKeyError> errors) {
|
||||
Map<String, List<ContentKeyError>> groups = new LinkedHashMap<>();
|
||||
for (ContentKeyError error : errors) {
|
||||
String group = error.registry().name() + '|' + (error.namespaceLoaded() ? "" : namespaceOf(error.key()));
|
||||
groups.computeIfAbsent(group, ignored -> new ArrayList<>()).add(error);
|
||||
}
|
||||
List<String> messages = new ArrayList<>(groups.size());
|
||||
for (List<ContentKeyError> group : groups.values()) {
|
||||
messages.add(group.size() == 1 ? group.getFirst().message() : groupMessage(group));
|
||||
}
|
||||
return messages;
|
||||
}
|
||||
|
||||
private static String groupMessage(List<ContentKeyError> group) {
|
||||
ContentKeyError first = group.getFirst();
|
||||
String registry = first.registry().label();
|
||||
StringBuilder sb = new StringBuilder(96);
|
||||
sb.append(group.size()).append(" unknown ").append(registry).append(" keys");
|
||||
if (!first.namespaceLoaded()) {
|
||||
sb.append(" (namespace '").append(namespaceOf(first.key())).append("' is not loaded on this server)");
|
||||
}
|
||||
sb.append(": ");
|
||||
int shown = Math.min(GROUPED_KEYS_SHOWN, group.size());
|
||||
for (int index = 0; index < shown; index++) {
|
||||
if (index > 0) {
|
||||
sb.append(", ");
|
||||
}
|
||||
ContentKeyError error = group.get(index);
|
||||
sb.append(error.key());
|
||||
if (error.suggestion() != null) {
|
||||
sb.append(" (did you mean '").append(error.suggestion()).append("'?)");
|
||||
}
|
||||
}
|
||||
if (group.size() > shown) {
|
||||
sb.append(" +").append(group.size() - shown).append(" more");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -422,8 +480,9 @@ public final class ContentKeyValidator {
|
||||
* library over keys the author cannot edit and the engine handles.
|
||||
*/
|
||||
static ContentKeyIssues collectContentKeyIssues(File packFolder) {
|
||||
List<String> strict = new ArrayList<>();
|
||||
List<String> advisory = new ArrayList<>();
|
||||
List<ContentKeyError> strict = new ArrayList<>();
|
||||
List<ContentKeyError> advisory = new ArrayList<>();
|
||||
List<String> propertyIssues = new ArrayList<>();
|
||||
try {
|
||||
if (!IrisPlatforms.isBound()) {
|
||||
return ContentKeyIssues.none();
|
||||
@@ -448,16 +507,16 @@ public final class ContentKeyValidator {
|
||||
registries, referenced.blocks(), referenced.items(), referenced.entities());
|
||||
for (ContentKeyValidator.ContentKeyError error : errors) {
|
||||
if (referenced.paletteOnlyBlocks().contains(error.key())) {
|
||||
advisory.add(error.message());
|
||||
advisory.add(error);
|
||||
} else {
|
||||
strict.add(error.message());
|
||||
strict.add(error);
|
||||
}
|
||||
}
|
||||
strict.addAll(validateBlockStateProperties(registries, referenced.blockStates()));
|
||||
propertyIssues.addAll(validateBlockStateProperties(registries, referenced.blockStates()));
|
||||
} catch (Throwable e) {
|
||||
IrisLogging.reportError("PackValidator content-key validation failed for pack '" + packFolder.getName() + "'", e);
|
||||
}
|
||||
return new ContentKeyIssues(List.copyOf(strict), List.copyOf(advisory));
|
||||
return new ContentKeyIssues(List.copyOf(strict), List.copyOf(propertyIssues), List.copyOf(advisory));
|
||||
}
|
||||
|
||||
private static int size(List<String> keys) {
|
||||
|
||||
@@ -45,6 +45,7 @@ import java.util.Objects;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public final class PackValidator {
|
||||
static final String TRASH_ROOT = ".iris-trash";
|
||||
@@ -164,8 +165,6 @@ public final class PackValidator {
|
||||
// Strict content mode promotes unresolved keys and bad block properties from advisory to blocking. Palette
|
||||
// -sourced findings are exempt and stay warnings - see ContentKeyValidator.collectContentKeyIssues.
|
||||
ContentKeyValidator.ContentKeyIssues contentKeys = ContentKeyValidator.collectContentKeyIssues(packFolder);
|
||||
addDistinct(ContentKeyValidator.strictContent() ? blockingErrors : warnings, contentKeys.strict());
|
||||
addDistinct(warnings, contentKeys.advisory());
|
||||
|
||||
String minecraftVersion = validateLiveRegistries && IrisPlatforms.isBound()
|
||||
? IrisPlatforms.get().minecraftVersion()
|
||||
@@ -174,6 +173,11 @@ public final class PackValidator {
|
||||
? gateContent(packFolder, dimensionFiles, minecraftVersion, blockingErrors, warnings)
|
||||
: List.of();
|
||||
|
||||
// Keys the version gate already names in its own line are not repeated as unknown-key findings.
|
||||
Set<String> gatedKeys = compatFindings.stream().map(CompatFinding::key).collect(Collectors.toSet());
|
||||
addDistinct(ContentKeyValidator.strictContent() ? blockingErrors : warnings, contentKeys.strict(gatedKeys));
|
||||
addDistinct(warnings, contentKeys.advisory(gatedKeys));
|
||||
|
||||
return new PackValidationResult(
|
||||
packName, blockingErrors, warnings, validatedAt, compatFindings, minecraftVersion);
|
||||
}
|
||||
@@ -321,14 +325,16 @@ public final class PackValidator {
|
||||
Set<String> reasons = new LinkedHashSet<>();
|
||||
if (findings != null) {
|
||||
for (CompatFinding finding : findings) {
|
||||
if (reasons.size() == BLOCKING_REASON_LIMIT) {
|
||||
break;
|
||||
}
|
||||
reasons.add(finding.key() + " (" + finding.registry().label() + ")");
|
||||
}
|
||||
}
|
||||
sb.append(reasons.isEmpty() ? "the dimension composes content this server does not have"
|
||||
: String.join(", ", reasons));
|
||||
if (reasons.isEmpty()) {
|
||||
return sb.append("the dimension composes content this server does not have").toString();
|
||||
}
|
||||
sb.append(String.join(", ", reasons.stream().limit(BLOCKING_REASON_LIMIT).toList()));
|
||||
if (reasons.size() > BLOCKING_REASON_LIMIT) {
|
||||
sb.append(" +").append(reasons.size() - BLOCKING_REASON_LIMIT).append(" more");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,10 @@ import art.arcane.volmlib.util.hud.HudSlot;
|
||||
import art.arcane.volmlib.util.plugin.ComponentMessenger;
|
||||
import art.arcane.volmlib.util.plugin.ComponentText;
|
||||
import art.arcane.iris.localization.C;
|
||||
import art.arcane.iris.localization.ChatReport;
|
||||
import art.arcane.iris.localization.IrisLanguage;
|
||||
import art.arcane.iris.localization.RuntimeUiMessages;
|
||||
import art.arcane.volmlib.util.localization.MessageArgument;
|
||||
import art.arcane.volmlib.util.format.Form;
|
||||
import art.arcane.volmlib.util.math.M;
|
||||
import lombok.Getter;
|
||||
@@ -304,6 +308,52 @@ public class VolmitSender implements CommandSender {
|
||||
deliver(createComponent(message));
|
||||
}
|
||||
|
||||
public void sendSuccess(String message) {
|
||||
sendMessage(ChatReport.Tone.SUCCESS.paint(message));
|
||||
}
|
||||
|
||||
public void sendInfo(String message) {
|
||||
sendMessage(ChatReport.Tone.INFO.paint(message));
|
||||
}
|
||||
|
||||
public void sendWarning(String message) {
|
||||
sendMessage(ChatReport.Tone.WARNING.paint(message));
|
||||
}
|
||||
|
||||
public void sendError(String message) {
|
||||
sendMessage(ChatReport.Tone.ERROR.paint(message));
|
||||
}
|
||||
|
||||
public void sendReport(ChatReport report) {
|
||||
java.util.List<ChatReport.Line> lines = report.lines();
|
||||
sendMessage(lines.getFirst().text());
|
||||
for (int index = 1; index < lines.size(); index++) {
|
||||
sendUntagged(lines.get(index));
|
||||
}
|
||||
}
|
||||
|
||||
private void sendUntagged(ChatReport.Line line) {
|
||||
if (!rendersMarkup()) {
|
||||
ComponentMessenger.sendSection(s, line.text());
|
||||
return;
|
||||
}
|
||||
String text = line.clickable() && isPlayer() ? clickable(line) : line.text();
|
||||
deliver(createNoPrefixComponent(text));
|
||||
}
|
||||
|
||||
private String clickable(ChatReport.Line line) {
|
||||
String command = line.command().replace("'", "\\'");
|
||||
String hover = ChatReport.clean(IrisLanguage.plain(RuntimeUiMessages.REPORT_CLICK_TO_INSERT,
|
||||
MessageArgument.untrusted("command", line.command()))).replace("'", "\\'");
|
||||
return "<click:suggest_command:'" + command + "'><hover:show_text:'" + hover + "'>"
|
||||
+ line.text() + "</hover></click>";
|
||||
}
|
||||
|
||||
private boolean rendersMarkup() {
|
||||
boolean playerWithoutColors = !IrisSettings.get().getGeneral().isUseCustomColorsIngame() && s instanceof Player;
|
||||
return !playerWithoutColors && IrisSettings.get().getGeneral().isUseConsoleCustomColors();
|
||||
}
|
||||
|
||||
public void sendMessageBasic(String message) {
|
||||
ComponentMessenger.sendSection(s, C.translateAlternateColorCodes('&', getTag() + message));
|
||||
}
|
||||
|
||||
@@ -103,7 +103,9 @@ import java.util.function.Consumer;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import art.arcane.iris.localization.BukkitCommandMessagesExtended;
|
||||
import art.arcane.iris.localization.BukkitRuntimeMessages;
|
||||
import art.arcane.iris.localization.ChatReport;
|
||||
import art.arcane.iris.localization.IrisLanguage;
|
||||
import art.arcane.iris.localization.PackDownloadMessages;
|
||||
import art.arcane.volmlib.util.localization.MessageArgument;
|
||||
@@ -659,14 +661,14 @@ public class StudioSVC implements IrisService {
|
||||
|
||||
public IrisDimension installInto(VolmitSender sender, String type, File folder) {
|
||||
if (J.isPrimaryThread()) {
|
||||
sender.sendMessage("Iris refused to download or copy a pack on the Bukkit primary thread.");
|
||||
sender.sendMessage(ChatReport.Tone.ERROR.paint("Iris refused to download or copy a pack on the Bukkit primary thread."));
|
||||
return null;
|
||||
}
|
||||
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_LOOKING_PACKAGE, MessageArgument.untrusted("type", String.valueOf(type))));
|
||||
sender.sendInfo(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_LOOKING_PACKAGE,MessageArgument.untrusted("type", String.valueOf(type))));
|
||||
IrisDimension dimension = IrisData.loadAnyDimension(type, null);
|
||||
if (dimension == null) {
|
||||
sender.sendMessage("Iris cannot repair world pack '" + type
|
||||
+ "' because no installed source contains it.");
|
||||
sender.sendMessage(ChatReport.Tone.ERROR.paint("Iris cannot repair world pack '" + type
|
||||
+ "' because no installed source contains it."));
|
||||
return null;
|
||||
}
|
||||
return replaceIntoPackDirectory(sender, dimension, folder);
|
||||
@@ -778,7 +780,7 @@ public class StudioSVC implements IrisService {
|
||||
});
|
||||
} catch (Exception e) {
|
||||
IrisLogging.reportError("Failed to open studio world \"" + dimm + "\".", e);
|
||||
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_FAILED_OPEN_STUDIO_WORLD, MessageArgument.untrusted("error", String.valueOf(e.getMessage()))));
|
||||
sender.sendError(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_FAILED_OPEN_STUDIO_WORLD,MessageArgument.untrusted("error", String.valueOf(e.getMessage()))));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -799,22 +801,32 @@ public class StudioSVC implements IrisService {
|
||||
packName, startupDenial, validation);
|
||||
if (failure == null) {
|
||||
if (force && unforcedStartupDenial.isPresent()) {
|
||||
sender.sendMessage("Force-opening Studio with the currently loaded registry state. The open may fail; restart remains required.");
|
||||
sender.sendMessage(ChatReport.Tone.WARNING.paint("Force-opening Studio with the currently loaded registry state. The open may fail; restart remains required."));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
String title = IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_CANNOT_OPEN_STUDIO_PACK_HAS_BLOCKING_ERRORS,
|
||||
MessageArgument.untrusted("dimm", packName));
|
||||
if (startupDenial.isPresent()) {
|
||||
sender.sendMessage(startupDenial.get());
|
||||
sender.sendReport(ChatReport.of(ChatReport.Tone.ERROR, title).item(startupDenial.get()).build());
|
||||
return failure;
|
||||
}
|
||||
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_CANNOT_OPEN_STUDIO_PACK_HAS_BLOCKING_ERRORS, MessageArgument.untrusted("dimm", String.valueOf(dimm))));
|
||||
for (String reason : failure.getReasons()) {
|
||||
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_MESSAGE, MessageArgument.untrusted("reason", String.valueOf(reason))));
|
||||
}
|
||||
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_FIX_PACK_RUN_IRIS_PACK_VALIDATE_REVALIDATE, MessageArgument.untrusted("dimm", String.valueOf(packName))));
|
||||
String validateCommand = "/iris pack validate " + packName;
|
||||
sender.sendReport(ChatReport.of(ChatReport.Tone.ERROR, title)
|
||||
.items(failure.getReasons())
|
||||
.hint(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_FIX_PACK_RUN_IRIS_PACK_VALIDATE_REVALIDATE,
|
||||
MessageArgument.untrusted("dimm", packName)), validateCommand)
|
||||
.build());
|
||||
return failure;
|
||||
}
|
||||
|
||||
private static void announceOpen(VolmitSender sender, String dimm, long seed) {
|
||||
IrisDimension dimension = IrisToolbelt.getDimension(dimm);
|
||||
String displayName = dimension == null ? dimm : dimension.getName();
|
||||
sender.sendInfo(IrisLanguage.text(BukkitCommandMessagesExtended.COMMAND_STUDIO_OPENING_STUDIO_PACK_SEED,
|
||||
MessageArgument.untrusted("value", displayName), MessageArgument.untrusted("seed", seed)));
|
||||
}
|
||||
|
||||
static void retainPackRestartRequirement(PackDownloader.PackInstallResult result) {
|
||||
if (result != null && result.restartRequired()) {
|
||||
ServerConfigurator.requireWorldCreationRestart();
|
||||
@@ -853,6 +865,7 @@ public class StudioSVC implements IrisService {
|
||||
if (reportPackAdmissionFailure(sender, dimm, openKind) != null) {
|
||||
return;
|
||||
}
|
||||
announceOpen(sender, dimm, seed);
|
||||
StudioOpenCoordinator.StudioOpenKind requiredOpenKind = Objects.requireNonNull(
|
||||
openKind,
|
||||
"Studio open kind");
|
||||
@@ -868,7 +881,7 @@ public class StudioSVC implements IrisService {
|
||||
return;
|
||||
}
|
||||
IrisLogging.reportError("Failed to replace the active studio project with \"" + dimm + "\".", throwable);
|
||||
J.s(() -> sender.sendMessage(IrisLanguage.text(
|
||||
J.s(() -> sender.sendError(IrisLanguage.text(
|
||||
BukkitRuntimeMessages.STUDIO_S_V_C_FAILED_OPEN_STUDIO_WORLD_2,
|
||||
MessageArgument.untrusted("error", String.valueOf(errorDetail(throwable))))));
|
||||
});
|
||||
@@ -970,7 +983,7 @@ public class StudioSVC implements IrisService {
|
||||
return closeActiveProjectForReplacement(sender).handle((closeResult, closeThrowable) -> {
|
||||
if (closeThrowable != null) {
|
||||
IrisLogging.reportError("Failed while closing an existing studio project before opening \"" + dimension + "\".", closeThrowable);
|
||||
J.s(() -> sender.sendMessage(IrisLanguage.text(
|
||||
J.s(() -> sender.sendError(IrisLanguage.text(
|
||||
BukkitRuntimeMessages.STUDIO_S_V_C_FAILED_CLOSE_EXISTING_STUDIO_PROJECT,
|
||||
MessageArgument.untrusted("error", String.valueOf(errorDetail(closeThrowable))))));
|
||||
return false;
|
||||
@@ -978,7 +991,7 @@ public class StudioSVC implements IrisService {
|
||||
if (closeResult == null) {
|
||||
IllegalStateException failure = new IllegalStateException("Studio close completed without a result.");
|
||||
IrisLogging.reportError("Failed while closing an existing studio project before opening \"" + dimension + "\".", failure);
|
||||
J.s(() -> sender.sendMessage(IrisLanguage.text(
|
||||
J.s(() -> sender.sendError(IrisLanguage.text(
|
||||
BukkitRuntimeMessages.STUDIO_S_V_C_FAILED_CLOSE_EXISTING_STUDIO_PROJECT_2,
|
||||
MessageArgument.untrusted("error", String.valueOf(errorDetail(failure))))));
|
||||
return false;
|
||||
@@ -986,7 +999,7 @@ public class StudioSVC implements IrisService {
|
||||
if (closeResult.failureCause() != null) {
|
||||
Throwable failure = closeResult.failureCause();
|
||||
IrisLogging.reportError("Failed while closing an existing studio project before opening \"" + dimension + "\".", failure);
|
||||
J.s(() -> sender.sendMessage(IrisLanguage.text(
|
||||
J.s(() -> sender.sendError(IrisLanguage.text(
|
||||
BukkitRuntimeMessages.STUDIO_S_V_C_FAILED_CLOSE_EXISTING_STUDIO_PROJECT_2,
|
||||
MessageArgument.untrusted("error", String.valueOf(errorDetail(failure))))));
|
||||
return false;
|
||||
@@ -1025,7 +1038,7 @@ public class StudioSVC implements IrisService {
|
||||
if (activeProject == project) {
|
||||
activeProject = null;
|
||||
}
|
||||
J.s(() -> sender.sendMessage(IrisLanguage.text(
|
||||
J.s(() -> sender.sendError(IrisLanguage.text(
|
||||
BukkitRuntimeMessages.STUDIO_S_V_C_FAILED_OPEN_STUDIO_WORLD_2,
|
||||
MessageArgument.untrusted("error", String.valueOf(errorDetail(e))))));
|
||||
return CompletableFuture.completedFuture(null);
|
||||
@@ -1229,7 +1242,7 @@ public class StudioSVC implements IrisService {
|
||||
private void createProject(VolmitSender sender, String requestedName, String requestedTemplate, File selectedTemplatePack) {
|
||||
Optional<String> startupDenial = IrisStartupValidation.denialReason();
|
||||
if (startupDenial.isPresent()) {
|
||||
sender.sendMessage("Studio project creation refused: " + startupDenial.get());
|
||||
sender.sendMessage(ChatReport.Tone.ERROR.paint("Studio project creation refused: " + startupDenial.get()));
|
||||
return;
|
||||
}
|
||||
String normalizedName;
|
||||
@@ -1240,7 +1253,7 @@ public class StudioSVC implements IrisService {
|
||||
templateName = requestedTemplate == null ? null : normalizeProjectName(requestedTemplate);
|
||||
workspace = requireSafeWorkspace(getWorkspaceFolder());
|
||||
} catch (IOException e) {
|
||||
sender.sendMessage("Studio project creation refused: " + errorDetail(e));
|
||||
sender.sendMessage(ChatReport.Tone.ERROR.paint("Studio project creation refused: " + errorDetail(e)));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1268,7 +1281,7 @@ public class StudioSVC implements IrisService {
|
||||
File newPack = new File(workspace, projectName);
|
||||
createdPack = newPack;
|
||||
if (Files.exists(newPack.toPath(), LinkOption.NOFOLLOW_LINKS) || Files.isSymbolicLink(newPack.toPath())) {
|
||||
sender.sendMessage("Studio project '" + projectName + "' already exists; nothing was changed.");
|
||||
sender.sendMessage(ChatReport.Tone.WARNING.paint("Studio project '" + projectName + "' already exists; nothing was changed."));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1277,13 +1290,15 @@ public class StudioSVC implements IrisService {
|
||||
} else {
|
||||
File importPack = selectedTemplatePack == null ? new File(workspace, templateName) : selectedTemplatePack;
|
||||
if (!hasLoadableDimensionFile(importPack, templateName)) {
|
||||
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_COULDN_T_FIND_PACK_CREATE_NEW_DIMENSION_FROM));
|
||||
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_MISSING_IMPORTED_DIMENSION_FILE));
|
||||
sender.sendReport(ChatReport.of(ChatReport.Tone.ERROR,
|
||||
IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_COULDN_T_FIND_PACK_CREATE_NEW_DIMENSION_FROM))
|
||||
.item(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_MISSING_IMPORTED_DIMENSION_FILE))
|
||||
.build());
|
||||
return;
|
||||
}
|
||||
PackValidationRegistry.requireLoadable(importPack.getName());
|
||||
|
||||
sender.sendMessage(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_IMPORTING_INTO_NEW_PROJECT, MessageArgument.untrusted("downloadable", String.valueOf(templateName)), MessageArgument.untrusted("s", String.valueOf(projectName))));
|
||||
sender.sendInfo(IrisLanguage.text(BukkitRuntimeMessages.STUDIO_S_V_C_IMPORTING_INTO_NEW_PROJECT,MessageArgument.untrusted("downloadable", String.valueOf(templateName)), MessageArgument.untrusted("s", String.valueOf(projectName))));
|
||||
createFrom(importPack, templateName, projectName);
|
||||
}
|
||||
projectPublished = true;
|
||||
@@ -1292,10 +1307,8 @@ public class StudioSVC implements IrisService {
|
||||
PackValidationRegistry.publish(createdValidation);
|
||||
if (!createdValidation.isLoadable()) {
|
||||
rollbackCreatedProject(sender, newPack,
|
||||
"Studio project validation failed; the new project was rolled back.");
|
||||
for (String reason : createdValidation.getBlockingErrors()) {
|
||||
sender.sendMessage(reason);
|
||||
}
|
||||
"Studio project validation failed; the new project was rolled back",
|
||||
createdValidation.getBlockingErrors());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1310,17 +1323,14 @@ public class StudioSVC implements IrisService {
|
||||
return;
|
||||
}
|
||||
|
||||
sender.sendMessage("Created studio project '" + projectName + "' at " + newPack.getAbsolutePath() + ".");
|
||||
if (installOutcome == CreationOutcome.RESTART) {
|
||||
sender.sendMessage("The project is complete, but Iris must restart before opening it. After restart, run /iris studio open " + projectName + ".");
|
||||
}
|
||||
sendCreated(sender, projectName, newPack, installOutcome == CreationOutcome.RESTART);
|
||||
outcome = installOutcome;
|
||||
} catch (Throwable e) {
|
||||
if (projectPublished && createdPack != null) {
|
||||
rollbackCreatedProject(sender, createdPack, "Studio project creation failed; the new project was rolled back.");
|
||||
}
|
||||
IrisLogging.reportError("Failed to create studio project '" + projectName + "'.", e);
|
||||
sender.sendMessage("Studio project creation failed: " + errorDetail(e));
|
||||
sender.sendMessage(ChatReport.Tone.ERROR.paint("Studio project creation failed: " + errorDetail(e)));
|
||||
} finally {
|
||||
closeLease(lease);
|
||||
}
|
||||
@@ -1573,15 +1583,30 @@ public class StudioSVC implements IrisService {
|
||||
&& Files.isRegularFile(dimension, LinkOption.NOFOLLOW_LINKS);
|
||||
}
|
||||
|
||||
private static void rollbackCreatedProject(VolmitSender sender, File project, String message) {
|
||||
Throwable cleanupFailure = rollbackCreatedProjectFiles(project);
|
||||
if (cleanupFailure == null) {
|
||||
sender.sendMessage(message);
|
||||
return;
|
||||
private static void sendCreated(VolmitSender sender, String projectName, File pack, boolean restartRequired) {
|
||||
String openCommand = "/iris studio open " + projectName;
|
||||
ChatReport.Builder report = ChatReport.of(ChatReport.Tone.SUCCESS, "Created Studio project " + projectName)
|
||||
.entry("Folder", pack.getAbsolutePath());
|
||||
if (restartRequired) {
|
||||
report.hint("Restart the server, then run " + openCommand, openCommand);
|
||||
} else {
|
||||
report.hint("Run " + openCommand, openCommand);
|
||||
}
|
||||
IrisLogging.reportError("Failed to fully roll back studio project " + project.getPath(), cleanupFailure);
|
||||
sender.sendMessage(message + " Cleanup was incomplete; check the console and "
|
||||
+ project.getAbsolutePath() + ".");
|
||||
sender.sendReport(report.build());
|
||||
}
|
||||
|
||||
private static void rollbackCreatedProject(VolmitSender sender, File project, String message) {
|
||||
rollbackCreatedProject(sender, project, message, List.of());
|
||||
}
|
||||
|
||||
private static void rollbackCreatedProject(VolmitSender sender, File project, String message, List<String> reasons) {
|
||||
ChatReport.Builder report = ChatReport.of(ChatReport.Tone.ERROR, message).items(reasons);
|
||||
Throwable cleanupFailure = rollbackCreatedProjectFiles(project);
|
||||
if (cleanupFailure != null) {
|
||||
IrisLogging.reportError("Failed to fully roll back studio project " + project.getPath(), cleanupFailure);
|
||||
report.hint("Cleanup was incomplete; check the console and " + project.getAbsolutePath(), null);
|
||||
}
|
||||
sender.sendReport(report.build());
|
||||
}
|
||||
|
||||
static Throwable rollbackCreatedProjectFiles(File project) {
|
||||
@@ -1608,7 +1633,7 @@ public class StudioSVC implements IrisService {
|
||||
}
|
||||
|
||||
private static void sendBusy(VolmitSender sender, LifecycleOperationCoordinator.BusyException busy) {
|
||||
sender.sendMessage(packMutationBusyMessage(busy.currentOperation()));
|
||||
sender.sendMessage(ChatReport.Tone.WARNING.paint(packMutationBusyMessage(busy.currentOperation())));
|
||||
}
|
||||
|
||||
static String packMutationBusyMessage(LifecycleOperationCoordinator.ActiveOperation operation) {
|
||||
|
||||
@@ -2126,3 +2126,7 @@ open = "Öffnen: {url}"
|
||||
open-description = "Den hochgeladenen Diagnosebericht öffnen."
|
||||
copy-path = "Lokalen Pfad kopieren"
|
||||
copy-path-description = "Den Pfad des lokalen Berichts kopieren."
|
||||
|
||||
[iris.runtime.report]
|
||||
more = "+{count} weitere"
|
||||
click_to_insert = "Klicken, um {command} einzufügen"
|
||||
@@ -2126,3 +2126,7 @@ open = "Abrir: {url}"
|
||||
open-description = "Abrir el informe de diagnóstico subido."
|
||||
copy-path = "Copiar ruta local"
|
||||
copy-path-description = "Copiar la ruta del informe local."
|
||||
|
||||
[iris.runtime.report]
|
||||
more = "+{count} más"
|
||||
click_to_insert = "Haz clic para insertar {command}"
|
||||
@@ -2131,3 +2131,7 @@ open = "Avaa: {url}"
|
||||
open-description = "Avaa lähetetty vianmääritysraportti."
|
||||
copy-path = "Kopioi paikallinen polku"
|
||||
copy-path-description = "Kopioi paikallisen raportin polku."
|
||||
|
||||
[iris.runtime.report]
|
||||
more = "+{count} lisää"
|
||||
click_to_insert = "Napsauta lisätäksesi {command}"
|
||||
@@ -2126,3 +2126,7 @@ open = "Ouvrir : {url}"
|
||||
open-description = "Ouvrir le rapport de diagnostic envoyé."
|
||||
copy-path = "Copier le chemin local"
|
||||
copy-path-description = "Copier le chemin du rapport local."
|
||||
|
||||
[iris.runtime.report]
|
||||
more = "+{count} de plus"
|
||||
click_to_insert = "Cliquez pour insérer {command}"
|
||||
@@ -2131,3 +2131,7 @@ open = "פתיחה: {url}"
|
||||
open-description = "פתיחת דוח האבחון שהועלה."
|
||||
copy-path = "העתקת הנתיב המקומי"
|
||||
copy-path-description = "העתקת הנתיב של הדוח המקומי."
|
||||
|
||||
[iris.runtime.report]
|
||||
more = "+{count} נוספים"
|
||||
click_to_insert = "לחצו כדי להוסיף את {command}"
|
||||
@@ -2126,3 +2126,7 @@ open = "Apri: {url}"
|
||||
open-description = "Apri il rapporto diagnostico caricato."
|
||||
copy-path = "Copia percorso locale"
|
||||
copy-path-description = "Copia il percorso del rapporto locale."
|
||||
|
||||
[iris.runtime.report]
|
||||
more = "+{count} altri"
|
||||
click_to_insert = "Clicca per inserire {command}"
|
||||
@@ -2129,3 +2129,7 @@ open = "開く: {url}"
|
||||
open-description = "アップロードした診断レポートを開きます。"
|
||||
copy-path = "ローカルパスをコピー"
|
||||
copy-path-description = "ローカルのレポートのパスをコピーします。"
|
||||
|
||||
[iris.runtime.report]
|
||||
more = "他 {count} 件"
|
||||
click_to_insert = "クリックして {command} を入力"
|
||||
@@ -2129,3 +2129,7 @@ open = "열기: {url}"
|
||||
open-description = "업로드한 진단 보고서를 엽니다."
|
||||
copy-path = "로컬 경로 복사"
|
||||
copy-path-description = "로컬 보고서 경로를 복사합니다."
|
||||
|
||||
[iris.runtime.report]
|
||||
more = "외 {count}개"
|
||||
click_to_insert = "클릭하여 {command} 입력"
|
||||
@@ -2131,3 +2131,7 @@ open = "Atidaryti: {url}"
|
||||
open-description = "Atidaryti įkeltą diagnostikos ataskaitą."
|
||||
copy-path = "Kopijuoti vietinį kelią"
|
||||
copy-path-description = "Kopijuoti vietinės ataskaitos kelią."
|
||||
|
||||
[iris.runtime.report]
|
||||
more = "dar {count}"
|
||||
click_to_insert = "Spustelėkite, kad įterptumėte {command}"
|
||||
@@ -2126,3 +2126,7 @@ open = "Openen: {url}"
|
||||
open-description = "Open het geüploade diagnoserapport."
|
||||
copy-path = "Lokaal pad kopiëren"
|
||||
copy-path-description = "Kopieer het pad van het lokale rapport."
|
||||
|
||||
[iris.runtime.report]
|
||||
more = "+{count} meer"
|
||||
click_to_insert = "Klik om {command} in te voegen"
|
||||
@@ -2131,3 +2131,7 @@ open = "Otwórz: {url}"
|
||||
open-description = "Otwórz przesłany raport diagnostyczny."
|
||||
copy-path = "Kopiuj lokalną ścieżkę"
|
||||
copy-path-description = "Skopiuj ścieżkę raportu lokalnego."
|
||||
|
||||
[iris.runtime.report]
|
||||
more = "+{count} więcej"
|
||||
click_to_insert = "Kliknij, aby wstawić {command}"
|
||||
@@ -2126,3 +2126,7 @@ open = "Abrir: {url}"
|
||||
open-description = "Abrir o relatório de diagnóstico enviado."
|
||||
copy-path = "Copiar caminho local"
|
||||
copy-path-description = "Copiar o caminho do relatório local."
|
||||
|
||||
[iris.runtime.report]
|
||||
more = "+{count} mais"
|
||||
click_to_insert = "Clica para inserir {command}"
|
||||
@@ -2131,3 +2131,7 @@ open = "Открыть: {url}"
|
||||
open-description = "Открыть загруженный диагностический отчёт."
|
||||
copy-path = "Скопировать локальный путь"
|
||||
copy-path-description = "Скопировать путь к локальному отчёту."
|
||||
|
||||
[iris.runtime.report]
|
||||
more = "ещё {count}"
|
||||
click_to_insert = "Нажмите, чтобы вставить {command}"
|
||||
@@ -2131,3 +2131,7 @@ open = "Aç: {url}"
|
||||
open-description = "Yüklenen tanılama raporunu açın."
|
||||
copy-path = "Yerel yolu kopyala"
|
||||
copy-path-description = "Yerel raporun yolunu kopyalayın."
|
||||
|
||||
[iris.runtime.report]
|
||||
more = "+{count} tane daha"
|
||||
click_to_insert = "{command} eklemek için tıklayın"
|
||||
@@ -2129,3 +2129,7 @@ open = "Mở: {url}"
|
||||
open-description = "Mở báo cáo chẩn đoán đã tải lên."
|
||||
copy-path = "Sao chép đường dẫn cục bộ"
|
||||
copy-path-description = "Sao chép đường dẫn của báo cáo cục bộ."
|
||||
|
||||
[iris.runtime.report]
|
||||
more = "+{count} mục khác"
|
||||
click_to_insert = "Nhấp để chèn {command}"
|
||||
@@ -2129,3 +2129,7 @@ open = "打开:{url}"
|
||||
open-description = "打开已上传的诊断报告。"
|
||||
copy-path = "复制本地路径"
|
||||
copy-path-description = "复制本地报告的路径。"
|
||||
|
||||
[iris.runtime.report]
|
||||
more = "另有 {count} 项"
|
||||
click_to_insert = "点击插入 {command}"
|
||||
@@ -2129,3 +2129,7 @@ open = "開啟:{url}"
|
||||
open-description = "開啟已上傳的診斷報告。"
|
||||
copy-path = "複製本機路徑"
|
||||
copy-path-description = "複製本機報告的路徑。"
|
||||
|
||||
[iris.runtime.report]
|
||||
more = "另有 {count} 項"
|
||||
click_to_insert = "點擊插入 {command}"
|
||||
Reference in new issue
Block a user