From 0a35255917d3bcf359c68ef765a680eb33db4310 Mon Sep 17 00:00:00 2001 From: acrylic-style Date: Thu, 5 Dec 2024 11:06:37 +0900 Subject: [PATCH] Translate to english --- .../bungee/listener/LockdownListener.kt | 8 +- .../net/azisaba/spicyAzisaBan/SABMessages.kt | 29 + .../spicyAzisaBan/commands/AddProofCommand.kt | 2 +- .../spicyAzisaBan/commands/DelProofCommand.kt | 2 +- .../commands/NameHistoryCommand.kt | 6 +- .../spicyAzisaBan/commands/SABCommand.kt | 30 +- .../commands/UpdateProofCommand.kt | 2 +- .../spicyAzisaBan/commands/WarnsCommand.kt | 2 +- .../net/azisaba/spicyAzisaBan/util/Util.kt | 5 +- .../azisaba/spicyAzisaBan/util/WebhookUtil.kt | 88 +-- .../resources/spicyazisaban/messages.ja.yml | 465 +++++++++++++++ .../main/resources/spicyazisaban/messages.yml | 556 +++++++++--------- .../velocity/listener/LockdownListener.kt | 17 +- 13 files changed, 874 insertions(+), 338 deletions(-) create mode 100644 common/src/main/resources/spicyazisaban/messages.ja.yml diff --git a/bungee/src/main/kotlin/net/azisaba/spicyAzisaBan/bungee/listener/LockdownListener.kt b/bungee/src/main/kotlin/net/azisaba/spicyAzisaBan/bungee/listener/LockdownListener.kt index ba3f9d1..f55c4b3 100644 --- a/bungee/src/main/kotlin/net/azisaba/spicyAzisaBan/bungee/listener/LockdownListener.kt +++ b/bungee/src/main/kotlin/net/azisaba/spicyAzisaBan/bungee/listener/LockdownListener.kt @@ -1,5 +1,6 @@ package net.azisaba.spicyAzisaBan.bungee.listener +import net.azisaba.spicyAzisaBan.SABMessages import net.md_5.bungee.api.chat.TextComponent import net.md_5.bungee.api.event.PreLoginEvent import net.md_5.bungee.api.plugin.Listener @@ -9,6 +10,11 @@ object LockdownListener : Listener { @EventHandler fun onLogin(e: PreLoginEvent) { e.isCancelled = true - e.setCancelReason(*TextComponent.fromLegacyText("現在サーバーには参加できません。サーバー管理者へお問い合わせください。 &8(SAB: Initialization error)")) + try { + e.setCancelReason(*TextComponent.fromLegacyText("${SABMessages.General.failsafeKickMessage} (SAB: Initialization error)")) + } catch (ex: Exception) { + ex.printStackTrace() + e.setCancelReason(*TextComponent.fromLegacyText("You cannot join the server right now. Please contact the server administrator. (SAB: Initialization error)")) + } } } diff --git a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/SABMessages.kt b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/SABMessages.kt index cfb9f1b..98d8540 100644 --- a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/SABMessages.kt +++ b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/SABMessages.kt @@ -98,6 +98,7 @@ object SABMessages { val previousPage get() = obj.getMessage("previousPage", defObj.getMessage("previousPage")) val nextPage get() = obj.getMessage("nextPage", defObj.getMessage("nextPage")) val datetime get() = obj.getMessage("datetime", defObj.getMessage("datetime")) + val failsafeKickMessage get() = obj.getMessage("failsafeKickMessage", defObj.getMessage("failsafeKickMessage")) object Time { private val defObj get() = General.defObj.getObj("time") @@ -107,6 +108,34 @@ object SABMessages { val minute get() = obj.getMessage("minute", defObj.getMessage("minute")) val second get() = obj.getMessage("second", defObj.getMessage("second")) } + + object Webhook { + private val defObj get() = General.defObj.getObj("webhook") + private val obj get() = General.obj.getObj("webhook") + val type get() = obj.getMessage("type", defObj.getMessage("type")) + val operator get() = obj.getMessage("operator", defObj.getMessage("operator")) + val punishOperator get() = obj.getMessage("punishOperator", defObj.getMessage("punishOperator")) + val target get() = obj.getMessage("target", defObj.getMessage("target")) + val server get() = obj.getMessage("server", defObj.getMessage("server")) + val newReason get() = obj.getMessage("newReason", defObj.getMessage("newReason")) + val oldReason get() = obj.getMessage("oldReason", defObj.getMessage("oldReason")) + val unpunishReason get() = obj.getMessage("unpunishReason", defObj.getMessage("unpunishReason")) + val punishReason get() = obj.getMessage("punishReason", defObj.getMessage("punishReason")) + val punishmentDateTime get() = obj.getMessage("punishmentDateTime", defObj.getMessage("punishmentDateTime")) + val punishmentId get() = obj.getMessage("punishmentId", defObj.getMessage("punishmentId")) + val unpunishId get() = obj.getMessage("unpunishId", defObj.getMessage("unpunishId")) + val proofId get() = obj.getMessage("proofId", defObj.getMessage("proofId")) + val proofText get() = obj.getMessage("proofText", defObj.getMessage("proofText")) + val duration get() = obj.getMessage("duration", defObj.getMessage("duration")) + val expiration get() = obj.getMessage("expiration", defObj.getMessage("expiration")) + val viewableByTarget get() = obj.getMessage("viewableByTarget", defObj.getMessage("viewableByTarget")) + val punishmentAdded get() = obj.getMessage("punishmentAdded", defObj.getMessage("punishmentAdded")) + val punishmentReasonChanged get() = obj.getMessage("punishmentReasonChanged", defObj.getMessage("punishmentReasonChanged")) + val punishmentRemoved get() = obj.getMessage("punishmentRemoved", defObj.getMessage("punishmentRemoved")) + val proofAdded get() = obj.getMessage("proofAdded", defObj.getMessage("proofAdded")) + val proofUpdated get() = obj.getMessage("proofUpdated", defObj.getMessage("proofUpdated")) + val proofRemoved get() = obj.getMessage("proofRemoved", defObj.getMessage("proofRemoved")) + } } object Commands { diff --git a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/AddProofCommand.kt b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/AddProofCommand.kt index e4d4700..7868200 100644 --- a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/AddProofCommand.kt +++ b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/AddProofCommand.kt @@ -74,7 +74,7 @@ object AddProofCommand: Command() { if (e.message == "cancel") return throw e } - Proof(proofId, p, text, public).sendWebhook(actor, "証拠が追加されました。", Color.GREEN) + Proof(proofId, p, text, public).sendWebhook(actor, SABMessages.General.Webhook.proofAdded, Color.GREEN) actor.send( SABMessages.Commands.AddProof.done .replaceVariables( diff --git a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/DelProofCommand.kt b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/DelProofCommand.kt index ba1b2ef..1c156f3 100644 --- a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/DelProofCommand.kt +++ b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/DelProofCommand.kt @@ -48,7 +48,7 @@ object DelProofCommand: Command() { val list = SpicyAzisaBan.instance.connection.proofs.delete(FindOptions.Builder().addWhere("id", id).setLimit(1).build()).complete() if (list.isEmpty()) return actor.send(SABMessages.Commands.General.proofNotFound.replaceVariables().format(id).translate()) val proof = Proof.fromTableData(list[0]).complete()!! - proof.sendWebhook(actor, "証拠が削除されました。", Color.RED) + proof.sendWebhook(actor, SABMessages.General.Webhook.proofRemoved, Color.RED) actor.send( SABMessages.Commands.DelProof.done .replaceVariables("id" to proof.id.toString(), "pid" to proof.punishment.id.toString(), "text" to proof.text) diff --git a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/NameHistoryCommand.kt b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/NameHistoryCommand.kt index 8aa18ca..5796298 100644 --- a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/NameHistoryCommand.kt +++ b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/NameHistoryCommand.kt @@ -44,12 +44,12 @@ object NameHistoryCommand : Command() { "${if (isLast) "" else ""}$s" } else { if (isLast) { - "$s" + "$s" } else { - "$s" + "$s" } } - }.joinToString(" -> ").let { actor.send(it) } + }.joinToString(" -> ").translate().let { actor.send(it) } } } .catch { actor.sendErrorMessage(it) } diff --git a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/SABCommand.kt b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/SABCommand.kt index f9301f4..c571973 100644 --- a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/SABCommand.kt +++ b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/SABCommand.kt @@ -54,7 +54,7 @@ object SABCommand: Command() { private val groupRemoveConfirmation = mutableMapOf() private fun Actor.sendHelp() { - send("$PREFIXSpicyAzisaBan commands".translate()) + send("${SABMessages.General.prefix}SpicyAzisaBan commands".translate()) if (hasPermission("sab.command.spicyazisaban.group")) send("${ChatColor.RED}> ${ChatColor.AQUA}/sab group ") if (hasPermission("sab.command.spicyazisaban.info")) send("${ChatColor.RED}> ${ChatColor.AQUA}/sab info") if (hasPermission("sab.command.spicyazisaban.creategroup")) send("${ChatColor.RED}> ${ChatColor.AQUA}/sab creategroup ") @@ -131,7 +131,7 @@ object SABCommand: Command() { .addValue("server", server) .build() ).complete() - actor.send("$PREFIX${ChatColor.GREEN}グループにサーバー($server)を追加しました。") + actor.send("$PREFIX${ChatColor.GREEN}Added server ($server) to group ($groupName).") } "remove" -> { val server = args[3] @@ -141,12 +141,12 @@ object SABCommand: Command() { .addWhere("server", server) .build() ).complete() - actor.send("$PREFIX${ChatColor.GREEN}グループからサーバーを(そのグループに入っている場合は)除外しました。") + actor.send("$PREFIX${ChatColor.GREEN}Removed server ($server) from group ($groupName).") } "info" -> { val servers = SpicyAzisaBan.instance.connection.getServersByGroup(args[1]).complete() - actor.send("$PREFIX${ChatColor.AQUA}グループ: ${ChatColor.RESET}$groupName") - actor.send("$PREFIX- ${ChatColor.AQUA}サーバー:") + actor.send("$PREFIX${ChatColor.AQUA}Group: ${ChatColor.RESET}$groupName") + actor.send("$PREFIX- ${ChatColor.AQUA}Servers:") servers.forEach { server -> actor.send("$PREFIX - ${ChatColor.GREEN}$server") } @@ -215,7 +215,7 @@ object SABCommand: Command() { } "link" -> { if (actor !is PlayerActor) { - return actor.send("${ChatColor.RED}NO ${ChatColor.AQUA}CONSOLE ${ChatColor.GOLD}ZONE") + return } if (args.size <= 1) return SpicyAzisaBan.instance.connection @@ -278,11 +278,11 @@ object SABCommand: Command() { (SpicyAzisaBan.instance.getPlatformType() != PlatformType.CLI && groupRemoveConfirmation[actor.uniqueId] != groupName) ) { println("send") - actor.send("$PREFIX${ChatColor.GOLD}グループ「${ChatColor.YELLOW}$groupName${ChatColor.GOLD}」を削除しますか?関連付けられているすべての処罰が解除されます。") + actor.send("$PREFIX${ChatColor.GOLD}Are you sure want to remove group ${ChatColor.YELLOW}$groupName${ChatColor.GOLD}? All punishments associated with this group will be removed and this action cannot be undone.") if (SpicyAzisaBan.instance.getPlatformType() == PlatformType.CLI) { - actor.send("$PREFIX${ChatColor.GOLD}削除するには${ChatColor.YELLOW}--confirm${ChatColor.GOLD}を入れて実行してください。") + actor.send("$PREFIX${ChatColor.GOLD}If you are sure, re-type the command with ${ChatColor.YELLOW}--confirm${ChatColor.GOLD}.") } else { - actor.send("$PREFIX${ChatColor.GOLD}削除するには10秒以内に同じコマンドをもう一度実行してください。") + actor.send("$PREFIX${ChatColor.GOLD}If you are sure, re-enter the command within 10 seconds.") } if (SpicyAzisaBan.instance.getPlatformType() != PlatformType.CLI) { groupRemoveConfirmation[actor.uniqueId] = groupName @@ -299,7 +299,7 @@ object SABCommand: Command() { .thenDo { SpicyAzisaBan.instance.connection.serverGroup.delete(FindOptions.Builder().addWhere("group", groupName).build()).complete() } .thenDo { SpicyAzisaBan.instance.connection.cachedGroups.set(null) - actor.send("$PREFIX${ChatColor.GREEN}グループに関連付けられた処罰を削除中...") + actor.send("$PREFIX${ChatColor.GREEN}Removing all punishments associated with group ${ChatColor.YELLOW}$groupName${ChatColor.GREEN}...") SpicyAzisaBan.instance.connection.punishments .delete(FindOptions.Builder().addWhere("server", groupName).build()) .then { it.map { td -> Punishment.fromTableData(td) } } @@ -321,11 +321,11 @@ object SABCommand: Command() { .catch { actor.sendErrorMessage(it) } .complete() groupRemoveConfirmation.remove(actor.uniqueId) - actor.send("$PREFIX${ChatColor.GREEN}グループ「${ChatColor.GOLD}$groupName${ChatColor.GREEN}」を削除しました。") + actor.send("$PREFIX${ChatColor.GREEN}Group ${ChatColor.GOLD}$groupName${ChatColor.GREEN} has been removed.") } .catch { if (it::class.java == Exception::class.java) return@catch - actor.send("$PREFIX${ChatColor.RED}グループの削除に失敗しました。") + actor.send("$PREFIX${ChatColor.RED}Failed to delete group $groupName.") SpicyAzisaBan.LOGGER.warning("Failed to delete group $groupName") it.printStackTrace() } @@ -339,7 +339,7 @@ object SABCommand: Command() { return SpicyAzisaBan.instance.connection.getAllGroups() .then { list -> if (list.any { it.equals(groupName, true) }) { - actor.send("$PREFIX${ChatColor.RED}この名前はすでに使用されています。") + actor.send("$PREFIX${ChatColor.RED}Group ${ChatColor.GOLD}$groupName${ChatColor.RED} already exists.") throw Exception() } } @@ -351,10 +351,10 @@ object SABCommand: Command() { } } .thenDo { SpicyAzisaBan.instance.connection.cachedGroups.set(null) } - .then { actor.send("${ChatColor.GREEN}グループ「${ChatColor.GOLD}$groupName${ChatColor.GREEN}」を作成しました。") } + .then { actor.send("${ChatColor.GREEN}Group ${ChatColor.GOLD}$groupName${ChatColor.GREEN} has been created.") } .catch { if (it::class.java == Exception::class.java) return@catch - actor.send("$PREFIX${ChatColor.RED}グループの作成に失敗しました。") + actor.send("$PREFIX${ChatColor.RED}Failed to create group $groupName.") it.printStackTrace() } } diff --git a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/UpdateProofCommand.kt b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/UpdateProofCommand.kt index 45175f3..b7d2e87 100644 --- a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/UpdateProofCommand.kt +++ b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/UpdateProofCommand.kt @@ -67,7 +67,7 @@ object UpdateProofCommand: Command() { if (public != null) builder.addValue("public", public) SpicyAzisaBan.instance.connection.proofs.update(builder.build()).complete() Proof(proof.id, proof.punishment, text ?: proof.text, public ?: proof.public) - .sendWebhook(actor, "証拠が更新されました。", Color.YELLOW) + .sendWebhook(actor, SABMessages.General.Webhook.proofUpdated, Color.YELLOW) actor.send( SABMessages.Commands.UpdateProof.done .replaceVariables( diff --git a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/WarnsCommand.kt b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/WarnsCommand.kt index 412a928..1d8e27b 100644 --- a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/WarnsCommand.kt +++ b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/commands/WarnsCommand.kt @@ -21,7 +21,7 @@ object WarnsCommand: Command() { override val permission = "sab.warns" // this should be set to true for everyone override fun execute(actor: Actor, args: Array) { - if (actor !is PlayerActor) return actor.send("e^1") + if (actor !is PlayerActor) return if (!actor.hasPermission(permission)) { return actor.send(SABMessages.General.missingPermissions.replaceVariables().translate()) } diff --git a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/util/Util.kt b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/util/Util.kt index 249fa8d..1606ded 100644 --- a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/util/Util.kt +++ b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/util/Util.kt @@ -200,13 +200,12 @@ object Util { fun String.translate(): net.kyori.adventure.text.Component { val legacySectionString = ChatColor.translateAlternateColorCodes('&', this) - .replace(" ", " ") try { // try to parse as mini message - return MiniMessage.miniMessage().deserialize(legacySectionString) + return MiniMessage.miniMessage().deserialize(legacySectionString.replace(" ", " ")) } catch (_: Exception) { // fallback to legacy component - val component = LegacyComponentSerializer.legacySection().deserialize(legacySectionString) + val component = LegacyComponentSerializer.legacySection().deserialize(legacySectionString.replace(" ", "§f §f ")) val miniMessageString = MiniMessage.miniMessage().serialize(component) return MiniMessage.miniMessage().deserialize(miniMessageString) } diff --git a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/util/WebhookUtil.kt b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/util/WebhookUtil.kt index f9618ab..4ceaeb9 100644 --- a/common/src/main/kotlin/net/azisaba/spicyAzisaBan/util/WebhookUtil.kt +++ b/common/src/main/kotlin/net/azisaba/spicyAzisaBan/util/WebhookUtil.kt @@ -24,7 +24,7 @@ object WebhookUtil { val webhook = DiscordWebhook(url) return operator.getProfile().then { profile -> webhook.username = profile.name - webhook.content = "処罰が追加されました。" + webhook.content = SABMessages.General.Webhook.punishmentAdded webhook.addEmbed(toEmbed(profile)) webhook.execute() }.then {}.catch { it.printStackTrace() } @@ -44,7 +44,7 @@ object WebhookUtil { split.forEachIndexed { index, list -> val webhook = DiscordWebhook(url) webhook.username = profile.name - webhook.content = "処罰が追加されました。" + webhook.content = SABMessages.General.Webhook.punishmentAdded list.forEach { p -> webhook.addEmbed(p.toEmbed(profile)) } @@ -58,16 +58,16 @@ object WebhookUtil { private fun Punishment.toEmbed(operator: PlayerProfile): DiscordWebhook.EmbedObject { val embed = DiscordWebhook.EmbedObject() embed.color = Color.RED - embed.addField("種類", "${type.getName()} (${type.name})", false) - embed.addField("処罰執行者", "${operator.name} (${operator.uniqueId})", false) - embed.addField("対象サーバー", server, false) - embed.addField("被処罰者", "$name ($target)", false) - embed.addField("理由", reason, false) - embed.addField("ID", id.toString(), false) - embed.addField("処罰日時", SABMessages.formatDate(start), false) + embed.addField(SABMessages.General.Webhook.type, "${type.getName()} (${type.name})", false) + embed.addField(SABMessages.General.Webhook.operator, "${operator.name} (${operator.uniqueId})", false) + embed.addField(SABMessages.General.Webhook.server, server, false) + embed.addField(SABMessages.General.Webhook.target, "$name ($target)", false) + embed.addField(SABMessages.General.Webhook.punishReason, reason, false) + embed.addField(SABMessages.General.Webhook.punishmentId, id.toString(), false) + embed.addField(SABMessages.General.Webhook.punishmentDateTime, SABMessages.formatDate(start), false) if (type.name.contains("TEMP")) { - embed.addField("期間", Util.unProcessTime(end.serializeAsLong() - start), false) - embed.addField("期限", if (end is Expiration.NeverExpire) SABMessages.General.permanent else SABMessages.formatDate(end.serializeAsLong()), false) + embed.addField(SABMessages.General.Webhook.duration, Util.unProcessTime(end.serializeAsLong() - start), false) + embed.addField(SABMessages.General.Webhook.expiration, if (end is Expiration.NeverExpire) SABMessages.General.permanent else SABMessages.formatDate(end.serializeAsLong()), false) } return embed } @@ -78,20 +78,20 @@ object WebhookUtil { val webhook = DiscordWebhook(url) return async { context -> webhook.username = actor.name - webhook.content = "処罰理由が変更されました。" + webhook.content = SABMessages.General.Webhook.punishmentReasonChanged val embed = DiscordWebhook.EmbedObject() embed.color = Color.ORANGE - embed.addField("種類", "${type.getName()} (${type.name})", false) - embed.addField("コマンド実行者", "${actor.name} (${actor.uniqueId})", false) - embed.addField("対象サーバー", server, false) - embed.addField("被処罰者", "$name ($target)", false) - embed.addField("新しい理由", newReason, false) - embed.addField("元の理由", reason, false) - embed.addField("ID", id.toString(), false) - embed.addField("処罰日時", SABMessages.formatDate(start), false) + embed.addField(SABMessages.General.Webhook.type, "${type.getName()} (${type.name})", false) + embed.addField(SABMessages.General.Webhook.operator, "${actor.name} (${actor.uniqueId})", false) + embed.addField(SABMessages.General.Webhook.server, server, false) + embed.addField(SABMessages.General.Webhook.target, "$name ($target)", false) + embed.addField(SABMessages.General.Webhook.newReason, newReason, false) + embed.addField(SABMessages.General.Webhook.oldReason, reason, false) + embed.addField(SABMessages.General.Webhook.punishmentId, id.toString(), false) + embed.addField(SABMessages.General.Webhook.punishmentDateTime, SABMessages.formatDate(start), false) if (type.name.contains("TEMP")) { - embed.addField("期間", Util.unProcessTime(end.serializeAsLong() - start), false) - embed.addField("期限", if (end is Expiration.NeverExpire) SABMessages.General.permanent else SABMessages.formatDate(end.serializeAsLong()), false) + embed.addField(SABMessages.General.Webhook.duration, Util.unProcessTime(end.serializeAsLong() - start), false) + embed.addField(SABMessages.General.Webhook.expiration, if (end is Expiration.NeverExpire) SABMessages.General.permanent else SABMessages.formatDate(end.serializeAsLong()), false) } webhook.addEmbed(embed) try { @@ -112,22 +112,22 @@ object WebhookUtil { return punishment.operator.getProfile().then { profile -> val unPunishOpProfile = operator.getProfile().complete() webhook.username = unPunishOpProfile.name - webhook.content = "処罰が解除されました。" + webhook.content = SABMessages.General.Webhook.punishmentRemoved val embed = DiscordWebhook.EmbedObject() embed.color = Color.GREEN - embed.addField("種類", "${punishment.type.getName()} (${punishment.type.name})", false) - embed.addField("対象サーバー", punishment.server, false) - embed.addField("処罰解除者", "${unPunishOpProfile.name} (${unPunishOpProfile.uniqueId})", false) - embed.addField("解除理由", reason, false) - embed.addField("解除ID", id.toString(), false) - embed.addField("処罰執行者", "${profile.name} (${profile.uniqueId})", false) - embed.addField("被処罰者", "${punishment.name} (${punishment.target})", false) - embed.addField("処罰理由", punishment.reason, false) - embed.addField("処罰ID", punishment.id.toString(), false) - embed.addField("処罰日時", SABMessages.formatDate(punishment.start), false) + embed.addField(SABMessages.General.Webhook.type, "${punishment.type.getName()} (${punishment.type.name})", false) + embed.addField(SABMessages.General.Webhook.server, punishment.server, false) + embed.addField(SABMessages.General.Webhook.operator, "${unPunishOpProfile.name} (${unPunishOpProfile.uniqueId})", false) + embed.addField(SABMessages.General.Webhook.unpunishReason, reason, false) + embed.addField(SABMessages.General.Webhook.unpunishId, id.toString(), false) + embed.addField(SABMessages.General.Webhook.punishOperator, "${profile.name} (${profile.uniqueId})", false) + embed.addField(SABMessages.General.Webhook.target, "${punishment.name} (${punishment.target})", false) + embed.addField(SABMessages.General.Webhook.punishReason, punishment.reason, false) + embed.addField(SABMessages.General.Webhook.punishmentId, punishment.id.toString(), false) + embed.addField(SABMessages.General.Webhook.punishmentDateTime, SABMessages.formatDate(punishment.start), false) if (punishment.type.name.contains("TEMP")) { - embed.addField("期間", Util.unProcessTime(punishment.end.serializeAsLong() - punishment.start), false) - embed.addField("期限", if (punishment.end is Expiration.NeverExpire) SABMessages.General.permanent else SABMessages.formatDate(punishment.end.serializeAsLong()), false) + embed.addField(SABMessages.General.Webhook.duration, Util.unProcessTime(punishment.end.serializeAsLong() - punishment.start), false) + embed.addField(SABMessages.General.Webhook.expiration, if (punishment.end is Expiration.NeverExpire) SABMessages.General.permanent else SABMessages.formatDate(punishment.end.serializeAsLong()), false) } webhook.addEmbed(embed) webhook.execute() @@ -145,15 +145,15 @@ object WebhookUtil { webhook.content = content val embed = DiscordWebhook.EmbedObject() embed.color = color - embed.addField("種類", "${punishment.type.getName()} (${punishment.type.name})", false) - embed.addField("コマンド実行者", "${actor.name} (${actor.uniqueId})", false) - embed.addField("対象サーバー", punishment.server, false) - embed.addField("証拠テキスト", text, false) - embed.addField("証拠ID", id.toString(), false) - embed.addField("被処罰者", "${punishment.name} (${punishment.target})", false) - embed.addField("処罰ID", punishment.id.toString(), false) - embed.addField("処罰理由", punishment.reason, false) - embed.addField("被処罰者に対して公開", public.toString(), false) + embed.addField(SABMessages.General.Webhook.type, "${punishment.type.getName()} (${punishment.type.name})", false) + embed.addField(SABMessages.General.Webhook.operator, "${actor.name} (${actor.uniqueId})", false) + embed.addField(SABMessages.General.Webhook.server, punishment.server, false) + embed.addField(SABMessages.General.Webhook.proofText, text, false) + embed.addField(SABMessages.General.Webhook.proofId, id.toString(), false) + embed.addField(SABMessages.General.Webhook.target, "${punishment.name} (${punishment.target})", false) + embed.addField(SABMessages.General.Webhook.punishmentId, punishment.id.toString(), false) + embed.addField(SABMessages.General.Webhook.punishReason, punishment.reason, false) + embed.addField(SABMessages.General.Webhook.viewableByTarget, public.toString(), false) if (text.startsWith("https://") && !text.contains(" ") && (text.endsWith(".png", true) || text.endsWith(".jpg", true) || text.endsWith(".gif", true)) diff --git a/common/src/main/resources/spicyazisaban/messages.ja.yml b/common/src/main/resources/spicyazisaban/messages.ja.yml new file mode 100644 index 0000000..aa2ba67 --- /dev/null +++ b/common/src/main/resources/spicyazisaban/messages.ja.yml @@ -0,0 +1,465 @@ +# You can use there variables for all messages: +# (except for variable itself like using %PREFIX% for general.prefix, they simply will be ignored) +# +# Available variables: +# %PREFIX% - general.prefix +# %CMD_PREFIX% - prefix in config.yml (might be empty) + +general: + prefix: "SpicyAzisaBan » " + missingPermissions: "%PREFIX%権限がありません!" + error: "処理中に不明なエラーが発生しました。" + invalid-syntax: "構文エラー: %s" + + # available variables: default + %EXCEPTION_CLASS_NAME%, %EXCEPTION_MESSAGE% + errorDetailed: "処理中に不明なエラーが発生しました。 (%EXCEPTION_CLASS_NAME%)" + + # these are "words" and you can't use variables here + none: "なし" + global: "全サーバー" + permanent: "無期限" + online: "オンライン" + offline: "オフライン" + previousPage: "前のページ" + nextPage: "次のページ" + time: + day: "%d日" + hour: "%d時間" + minute: "%d分" + second: "%d秒" + webhook: + type: "種類" + operator: "コマンド実行者" + punishOperator: "コマンド実行者 (処罰時)" + target: "被処罰者" + server: "サーバー" + newReason: "新しい理由" + oldReason: "古い理由" + unpunishReason: "解除理由" + punishReason: "処罰理由" + punishmentDateTime: "処罰日時" + punishmentId: "処罰ID" + unpunishId: "解除ID" + proofId: "証拠ID" + proofText: "証拠テキスト" + duration: "期間" + expiration: "期限" + viewableByTarget: "被処罰者が閲覧可能" + punishmentAdded: "処罰が追加されました。" + punishmentReasonChanged: "処罰の理由が変更されました。" + punishmentRemoved: "処罰が削除されました。" + proofAdded: "証拠が追加されました。" + proofUpdated: "証拠が更新されました。" + proofRemoved: "証拠が削除されました。" + # Available variables: %YEAR%, %MONTH%, %DAY%, %HOUR%, %MINUTE%, %SECOND% and %MILLIS% + datetime: "%YEAR%/%MONTH%/%DAY%-%HOUR%:%MINUTE%:%SECOND%" + failsafeKickMessage: "現在サーバーに参加することはできません。管理者にお問い合わせください。" + +commands: + general: + invalidGroup: "%PREFIX%無効なグループ名です。" + invalidServer: "%PREFIX%無効なサーバー名です。" + invalidPlayer: "%PREFIX%プレイヤーが見つかりません。" + invalidTime: "%PREFIX%時間(time=)の形式が正しくありません。" + invalidIPAddress: "%PREFIX%IPアドレスの形式が正しくないか、処罰不可なIPアドレスです。" + invalidPunishmentType: "%PREFIX%無効な処罰タイプです。" + invalidNumber: "%PREFIX%無効な数値です。" + timeNotSpecified: "%PREFIX%時間が指定されていません。" + # Available variables: default, %PLAYERS% - banned player names, %PLAYERS_COUNT% + samePunishmentAppliedToSameIPAddress: "%PLAYERS_COUNT%人の同じIPアドレスのプレイヤーにも同じ処罰が適用されました: %PLAYERS%" + alreadyPunished: "%PREFIX%このアカウントはすでに(同じサーバー、同じ種類で)処罰されています!" + removedFromServer: "とあるプレイヤーがこの世界から抹消された。" + offlinePlayer: "%PREFIX%このプレイヤーはオフラインです。" + notPunished: "%PREFIX%このアカウントは処罰されていません!" + noReasonSpecified: "%PREFIX%理由が指定されていません!" + noProofSpecified: "%PREFIX%証拠が指定されていません!" + punishmentNotFound: "%PREFIX%処罰#%dが見つかりません!" + proofNotFound: "%PREFIX%証拠#%dが見つかりません!" + viewable-proofs: "閲覧可能な証拠:" + + # Available variables: %ID% - id of proof, %TEXT% - the text of proof, %PUBLIC% - always true (with color of green) + proof-entry: " - %TEXT%" + sab: + setDebugLevel: "%PREFIX%デバッグログレベルを%dに設定しました。" + reloadedConfiguration: "%PREFIX%設定を再読み込みしました。" + clearedCache: "%PREFIX%キャッシュを消去しました。" + deleteGroupUnpunishReason: "グループ'%GROUP%'の削除" # Available variables: default, %GROUP% (group name being removed) + removedFromPunishmentHistory: "%PREFIX%処罰\\<punishmentHistory>#%ID%を削除しました。" # Available variables: default, punishment + removedFromPunishment: "%PREFIX%処罰\\<punishments>#%ID%を削除しました。" # Available variables: default, punishment + apiTableNotFound: "%PREFIX%SpicyAzisaBan-APIのテーブルが存在しません。" + accountNoLinkCode: "%PREFIX%コードが一致しません。" + accountLinking: "%PREFIX%アカウントをリンク中..." + # Available variables: default, %USERNAME% (username of linked web account) + accountLinkComplete: "%PREFIX%アカウント[%USERNAME%]のリンクが完了しました。" + accountUnlinked: "%PREFIX%アカウントの連携をすべて解除しました。" + # Available variables (all boolean values are colored automatically): default + + # %SERVER_VERSION% - BungeeCord version + # %DB_CONNECTED% - true if connection between database is active, false otherwise + # %DB_VERSION% - Database version (number) + # %DB_FAILSAFE% - database.failsafe in config.yml + # %UPTIME% - current server uptime + # %VERSION% - plugin version + # %IS_DEVBUILD% - is running dev build? + # %IS_DEBUGBUILD% - is running debug build? + # %SERVER_ID% - serverId in config.yml + info: + - "%PREFIX%- インスタンス:" + - "%PREFIX% バージョン: %VERSION%" + - "%PREFIX% Debugビルド: %IS_DEBUGBUILD%" + - "%PREFIX% Devビルド: %IS_DEVBUILD%" + - "%PREFIX% ロックダウン: %IS_LOCKDOWN%" + - "%PREFIX%- サーバーバージョン" + - "%PREFIX% %SERVER_NAME% %SERVER_VERSION%" + - "%PREFIX%- データベース" + - "%PREFIX% 接続済み: %DB_CONNECTED%" + - "%PREFIX% バージョン: %DB_VERSION%" + - "%PREFIX% Failsafe: %DB_FAILSAFE%" + - "%PREFIX%- Uptime: %UPTIME%" + + # Available variables (punishment): + # %DATE% + # %END_DATE% - date if it has expiration date, "N/A" if permanent + # %ID% - Punishment ID + # %PLAYER% - Player name or IP if IP-based bans + # %TARGET% - UUID of player or IP if IP-based bans + # %OPERATOR% - Player name of operator (or CONSOLE if the punishment was done from console) + # %TYPE% - Punishment type + # %REASON% - Punishment reason + # %SERVER% - Target server or group that the punishment applies to ("global" if applies to an entire network) + # %DURATION% - Times left until the punishment expires + # %TIME% - Duration of punishment + # %IS_EXPIRED% - false if expired, true otherwise + ban: + usage: "%PREFIX%使用法: /%CMD_PREFIX%ban [server=...]" + globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gban [server=...]" + done: "%PREFIX%%PLAYER%は、正常にBanされました!" + notify: + - "%PLAYER%は、%SERVER%%OPERATOR%からBanされました。" + - "理由 > %REASON%" + - "ID > #%ID%" + layout: + - "%PREFIX%永久BANされました!" + - "" + - "" + - "対象サーバー » %SERVER%" + - "理由 » %REASON%" + - "" + - "お問い合わせ:" + - "Discord » coming soon" + tempban: + usage: "%PREFIX%使用法: /%CMD_PREFIX%tempban [server=...]" + globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gtempban [server=...]" + done: "%PREFIX%%PLAYER%は、正常にTempBanされました!" + notify: + - "%PLAYER%は、%SERVER%%OPERATOR%からTempBanされました。" + - "理由 > %REASON%" + - "ID > #%ID%" + - "期間 > %TIME%" + layout: + - "%PREFIX%一時的にBANされました!" + - "" + - "" + - "対象サーバー » %SERVER%" + - "理由 » %REASON%" + - "期間 » %DURATION%" + - "" + - "お問い合わせ:" + - "Discord » coming soon" + ipban: + usage: "%PREFIX%使用法: /%CMD_PREFIX%ipban [server=...]" + globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gipban [server=...]" + done: "%PREFIX%%PLAYER%は、正常にIPBanされました!" + notify: + - "%PLAYER%は、%SERVER%%OPERATOR%からIPBanされました。" + - "理由 > %REASON%" + - "ID > #%ID%" + layout: + - "%PREFIX%永久IP BANされました!" + - "" + - "" + - "対象サーバー » %SERVER%" + - "理由 » %REASON%" + - "" + - "お問い合わせ:" + - "Discord » coming soon" + tempipban: + usage: "%PREFIX%使用法: /%CMD_PREFIX%tempipban [server=...]" + globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gtempipban [server=...]" + done: "%PREFIX%%PLAYER%は、正常にTempIPBanされました!" + notify: + - "%PLAYER%は、%SERVER%%OPERATOR%からTempIPBanされました。" + - "理由 > %REASON%" + - "ID > #%ID%" + - "期間 > %TIME%" + layout: + - "%PREFIX%一時的にIP BANされました!" + - "" + - "" + - "対象サーバー » %SERVER%" + - "理由 » %REASON%" + - "期間 » %DURATION%" + - "" + - "お問い合わせ:" + - "Discord » coming soon" + mute: + usage: "%PREFIX%使用法: /%CMD_PREFIX%mute [server=...]" + globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gmute [server=...]" + done: "%PREFIX%%PLAYER%は、正常にMuteされました!" + notify: + - "%PLAYER%は、%SERVER%%OPERATOR%からMuteされました。" + - "理由 > %REASON%" + - "ID > #%ID%" + layout1: # layout that shows to a player when a player got muted + - "%PREFIX%あなたは永久ミュートされました!" + - "対象サーバー > %SERVER%" + - "理由 > %REASON%" + layout2: # layout that shows to a player when a player tries to speak after they got muted + - "%PREFIX%あなたは永久ミュートされています!" + - "対象サーバー > %SERVER%" + - "理由 > %REASON%" + tempmute: + usage: "%PREFIX%使用法: /%CMD_PREFIX%tempmute [server=...]" + globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gtempmute [server=...]" + done: "%PREFIX%%PLAYER%は、正常にTempMuteされました!" + notify: + - "%PLAYER%は、%SERVER%%OPERATOR%からTempMuteされました。" + - "理由 > %REASON%" + - "ID > #%ID%" + - "期間 > %TIME%" + layout1: # layout that shows to a player when a player got muted + - "%PREFIX%あなたは一時的にミュートされました!" + - "対象サーバー > %SERVER%" + - "理由 > %REASON%" + - "期間 > %DURATION%" + layout2: # layout that shows to a player when a player tries to speak after they got muted + - "%PREFIX%あなたは一時的にミュートされています!" + - "対象サーバー > %SERVER%" + - "理由 > %REASON%" + - "期間 > %DURATION%" + ipmute: + usage: "%PREFIX%使用法: /%CMD_PREFIX%ipmute [server=...]" + globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gipmute [server=...]" + done: "%PREFIX%%PLAYER%は、正常にIPMuteされました!" + notify: + - "%PLAYER%は、%SERVER%%OPERATOR%からIPMuteされました。" + - "理由 > %REASON%" + - "ID > #%ID%" + layout1: # layout that shows to a player when a player got muted + - "%PREFIX%あなたは永久IPミュートされました!" + - "対象サーバー > %SERVER%" + - "理由 > %REASON%" + layout2: # layout that shows to a player when a player tries to speak after they got muted + - "%PREFIX%あなたは永久IPミュートされています!" + - "対象サーバー > %SERVER%" + - "理由 > %REASON%" + tempipmute: + usage: "%PREFIX%使用法: /%CMD_PREFIX%tempipmute [server=...]" + globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gtempipmute [server=...]" + done: "%PREFIX%%PLAYER%は、正常にTempIPMuteされました!" + notify: + - "%PLAYER%は、%SERVER%%OPERATOR%からTempIPMuteされました。" + - "理由 > %REASON%" + - "ID > #%ID%" + - "期間 > %TIME%" + layout1: # layout that shows to a player when a player got muted + - "%PREFIX%あなたは一時的にIPミュートされました!" + - "対象サーバー > %SERVER%" + - "理由 > %REASON%" + - "期間 > %DURATION%" + layout2: # layout that shows to a player when a player tries to speak after they got muted + - "%PREFIX%あなたは一時的にIPミュートされています!" + - "対象サーバー > %SERVER%" + - "理由 > %REASON%" + - "期間 > %DURATION%" + warning: + usage: "%PREFIX%使用法: /%CMD_PREFIX%warning [server=...]" + globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gwarning [server=...]" + done: "%PREFIX%%PLAYER%は、正常にWarnされました!" + notify: + - "%PLAYER%は、%SERVER%%OPERATOR%からWarnされました。" + - "理由 > %REASON%" + - "ID > #%ID%" + - "期間 > %TIME%" + layout: + - "%PREFIX%警告を受けました" + - "対象サーバー > %SERVER%" + - "理由 > %REASON%" + title: "あなたは警告を受けました!" + subtitle: "/%CMD_PREFIX%warnsで表示を解除することができます" + caution: + usage: "%PREFIX%使用法: /%CMD_PREFIX%caution [server=...]" + globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gcaution [server=...]" + done: "%PREFIX%%PLAYER%は、正常にCautionされました!" + notify: + - "%PLAYER%は、%SERVER%%OPERATOR%からCautionされました。" + - "理由 > %REASON%" + - "ID > #%ID%" + - "期間 > %TIME%" + layout: + - "%PREFIX%注意を受けました" + - "対象サーバー > %SERVER%" + - "理由 > %REASON%" + title: "あなたは注意を受けました!" + subtitle: "/%CMD_PREFIX%warnsで表示を解除することができます" + kick: + usage: "%PREFIX%使用法: /%CMD_PREFIX%kick [server=...]" + globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gkick [server=...]" + done: "%PREFIX%%PLAYER%は、正常にKickされました!" + notify: + - "%PLAYER%は、%SERVER%%OPERATOR%からKickされました。" + - "理由 > %REASON%" + - "ID > #%ID%" + layout: + - "%PREFIX%サーバーからキックされました" + - "理由 > %REASON%" + note: + usage: "%PREFIX%使用法: /%CMD_PREFIX%note [server=...]" + globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gnote [server=...]" + done: "%PREFIX%%PLAYER%は、正常にNoteされました!" + notify: + - "%PLAYER%は、%SERVER%%OPERATOR%からNoteされました。" + - "理由 > %REASON%" + - "ID > #%ID%" + unpunish: + usage: "%PREFIX%使用法: /%CMD_PREFIX%unpunish " + unbanUsage: "%PREFIX%使用法: /%CMD_PREFIX%unban [server=...]" + unmuteUsage: "%PREFIX%使用法: /%CMD_PREFIX%unmute [server=...]" + done: "%PREFIX%%PLAYER%は、正常にUnpunishされました!" + # %TYPE%, %PREASON%, %PID% can be used here + notify: + - "%PLAYER%は、%SERVER%%OPERATOR%からUnpunishされました。" + - "処罰タイプ > %TYPE%" + - "処罰理由 > %PREASON%" + - "処罰ID > #%PID%" + - "解除理由 > %REASON%" + - "ID > #%ID%" + changereason: + usage: "%PREFIX%使用法: /%CMD_PREFIX%changereason " + done: "%PREFIX%処罰#%ID%は正常に更新されました。" + addproof: + usage: "%PREFIX%使用法: /%CMD_PREFIX%addproof [public]" + # %PID% can be used here (punishment id), %ID% for proof id, %TEXT% for proof text, and %PUBLIC% for colored true/false value + done: "%PREFIX%処罰#%PID%に証拠を追加しました。(ID: %ID%, Public: %PUBLIC%)" + updateproof: + usage: "%PREFIX%使用法: /%CMD_PREFIX%updateproof [text=\"...\"] [public]" + # %PID% can be used here (punishment id), %ID% for proof id, %TEXT% for proof text, and %PUBLIC% for colored true/false value + done: "%PREFIX%処罰#%PID%の証拠#%ID%は正常に更新されました。" + delproof: + usage: "%PREFIX%使用法: /%CMD_PREFIX%delproof " + # %PID% can be used here (punishment id), and %ID% is proof id + # and %TEXT% for original proof text + done: "%PREFIX%処罰#%PID%から証拠を削除しました。(ID: %ID%)" + + seen: + usage: "%PREFIX%使用法: /%CMD_PREFIX%seen " + searching: "%PREFIX%プレイヤーを検索中..." + # Available variables: %PLAYER%, %SINCE%, %STATUS%, %NAME_HISTORY%, %IP%, %HOSTNAME%, %IP_HISTORY%, + # %SAME_IP_PLAYERS%, %SAME_IP_PLAYERS_COUNT%, %FIRST_LOGIN%, %FIRST_LOGIN_ATTEMPT%, %LAST_LOGIN%, %LAST_LOGIN_ATTEMPT% + layout: + - "%PREFIX%%PLAYER%%SINCE%前から%STATUS%です。" + - "UUID > %UUID%" + - "最初のログイン > %FIRST_LOGIN%" + - "最初のログイン試行 > %FIRST_LOGIN_ATTEMPT%" + - "最近のログイン > %LAST_LOGIN%" + - "最近のログイン試行 > %LAST_LOGIN_ATTEMPT%" + - "過去の名前 > %NAME_HISTORY%" + - "最近のIPアドレス > %IP% (%HOSTNAME%)" + - "過去のすべてのIPアドレス > %IP_HISTORY%" + - "同じIPで接続しているプレイヤー > %SAME_IP_PLAYERS%" + # Available variables: %PLAYERS_COUNT%, %PLAYERS%, %HOSTNAME%, %IP_ADDRESS% + # * = they have different ip now + # green player name = currently online + layoutIP: + - "%PREFIX%%IP_ADDRESS% (%HOSTNAME%)は過去に%PLAYERS_COUNT%個のアカウントで接続しています:" + - "%PLAYERS%" + warns: + # Available variables: default + notWarnedYet: "%PREFIX%まだ警告を受けていません。" + header: "%PREFIX%有効な警告一覧:" + + # Available variables: punishment, default + layout: + - "[%DATE%]" + - "タイプ > %TYPE%" + - "対象サーバー > %SERVER%" + - "理由 > %REASON%" + history: + usage: "%PREFIX%使用法: /%CMD_PREFIX%history [page=...] [--all] [--active]" + # Available variables: %TARGET% + header: "%PREFIX%%TARGET%の履歴:" + # Available variables: variables of punishment + %DATE%, %STRIKETHROUGH_IF_UNPUNISHED%, %UNPUNISH_REASON%, + # %UNPUNISH_ID%, %UNPUNISH_OPERATOR%, %FLAGS% + layout: + - "[%DATE%] (/%CMD_PREFIX%proofs %ID%で証拠を表示)" + - "名前/IP > %PLAYER%" + - "タイプ > %TYPE%" + - "期間 > %STRIKETHROUGH_IF_UNPUNISHED%%TIME% (期限切れ: %IS_EXPIRED%)" + - "理由 > %REASON% %UNPUNISH_REASON%" + - "ID > #%ID% %UNPUNISH_ID%" + - "サーバー > %SERVER%" + - "執行者 > %OPERATOR% %UNPUNISH_OPERATOR%" + - "フラグ > %FLAGS%" + # Available variables: %CURRENT_PAGE%, %MAX_PAGE%, %COUNT% + footer: "ページ %CURRENT_PAGE%/%MAX_PAGE% | 処罰件数: %COUNT%" + # Available variables: %REASON% + unpunishReason: "(解除理由: %REASON%)" + # Available variables: %ID% + unpunishId: "(解除ID: %ID%)" + # Available variables: %OPERATOR% + unpunishOperator: "(解除者: %OPERATOR%)" + # Available variables: default + invalidArguments: "%PREFIX%--all--activeを同時に使用することはできません。" + check: + usage: "%PREFIX%使用法: /%CMD_PREFIX%check [--ip] [--only]" + searching: "%PREFIX%プレイヤーを検索中..." + # Available variables: %NAME%, %UUID%, %IP%, %HOSTNAME%, %MUTE_COUNT%, %BAN_COUNT%, %WARNING_COUNT%, + # %CAUTION_COUNT%, %NOTE_COUNT%, %KICK_COUNT%, %BAN_INFO%, %MUTE_INFO% + layout: + - "プレイヤー > %NAME% (%UUID%)" + - "IPアドレス > %IP% (%HOSTNAME%)" + - "Mute > %MUTE_INFO%" + - "Ban > %BAN_INFO%" + - "警告数 > %WARNING_COUNT%" + - "注意数 > %CAUTION_COUNT%" + - "ノート > %NOTE_COUNT%" + - "キック > %KICK_COUNT%" + # Available variables: %IP%, %HOSTNAME%, %MUTE_COUNT%, %BAN_COUNT%, %WARNING_COUNT%, %CAUTION_COUNT%, %NOTE_COUNT%, + # %KICK_COUNT%, %BAN_INFO%, %MUTE_INFO% + layoutIP: + - "IPアドレス > %IP% (%HOSTNAME%)" + - "Mute > %MUTE_INFO%" + - "Ban > %BAN_INFO%" + - "警告数 > %WARNING_COUNT%" + - "注意数 > %CAUTION_COUNT%" + - "ノート > %NOTE_COUNT%" + # Available variables for banInfo and muteInfo: default, punishment + banInfo: "%DURATION% (ID: #%ID%, 理由: %REASON%)" + muteInfo: "%DURATION% (ID: #%ID%, 理由: %REASON%)" + cannotUseTargetAndID: "%PREFIX%target=id=を併用することはできません。" + proofs: + usage: "%PREFIX%使用法: /%CMD_PREFIX%proofs " + # Available variables: punishment + %PID% (punishment id) + header: "%PREFIX%処罰#%PID%の証拠一覧:" + # Available variables: %PID% (punishment id), %ID% (proof id), %TEXT% (proof text), %PUBLIC% (colored true/false value) + layout: + - "証拠ID #%ID% (公開: %PUBLIC%) > %TEXT%" + banlist: + usage: "%PREFIX%使用法: /%CMD_PREFIX%banlist [page=...] [type=...] [server=...] [--all] [--active]" + # Available variables: default + header: "%PREFIX%処罰履歴:" + # Available variables: %CURRENT_PAGE%, %MAX_PAGE%, %COUNT% + footer: "ページ %CURRENT_PAGE%/%MAX_PAGE% | 処罰件数: %COUNT%" + # Available variables: default + invalidArguments: "%PREFIX%--all--activeを同時に使用することはできません。" + lockdown: + usage: "%PREFIX%使用法: /%CMD_PREFIX%lockdown " + lockdown: + - "%PREFIX%現在新規参加者を受け付けていません。" + - "しばらく時間が経った後に再参加してください。" + # Available variables: default, %PLAYER%, %IP_ADDRESS% + lockdownJoinAttempt: "[Lockdown] 新規プレイヤー'%PLAYER%'が参加しようとしました。IPアドレス: %IP_ADDRESS%" + # Available variables for (enabled|disabled)Lockdown: default, %ACTOR% (actor who toggled the lockdown) + enabledLockdown: "%PREFIX%%ACTOR%がサーバーロックダウンを有効にしました。" + disabledLockdown: "%PREFIX%%ACTOR%がサーバーロックダウンを無効にしました。" + namehistory: + usage: "%PREFIX%使用法: /%CMD_PREFIX%namehistory " diff --git a/common/src/main/resources/spicyazisaban/messages.yml b/common/src/main/resources/spicyazisaban/messages.yml index b0055a3..a265952 100644 --- a/common/src/main/resources/spicyazisaban/messages.yml +++ b/common/src/main/resources/spicyazisaban/messages.yml @@ -1,3 +1,6 @@ +# SpicyAzisaBan localization file +# You can download Japanese translation from: https://raw.githubusercontent.com/AzisabaNetwork/SpicyAzisaBan/refs/heads/dev/common/src/main/resources/spicyazisaban/messages.ja.yml +# # You can use there variables for all messages: # (except for variable itself like using %PREFIX% for general.prefix, they simply will be ignored) # @@ -7,68 +10,94 @@ general: prefix: "SpicyAzisaBan » " - missingPermissions: "%PREFIX%権限がありません!" - error: "処理中に不明なエラーが発生しました。" - invalid-syntax: "構文エラー: %s" + missingPermissions: "%PREFIX%You don't have permission!" + error: "An internal error occurred." + invalid-syntax: "Syntax error: %s" # available variables: default + %EXCEPTION_CLASS_NAME%, %EXCEPTION_MESSAGE% - errorDetailed: "処理中に不明なエラーが発生しました。 (%EXCEPTION_CLASS_NAME%)" + errorDetailed: "An internal error occurred. (%EXCEPTION_CLASS_NAME%)" # these are "words" and you can't use variables here - none: "なし" - global: "全サーバー" - permanent: "無期限" - online: "オンライン" - offline: "オフライン" - previousPage: "前のページ" - nextPage: "次のページ" + none: "None" + global: "Global" + permanent: "Permanent" + online: "Online" + offline: "Offline" + previousPage: "Previous Page" + nextPage: "Next Page" time: - day: "%d日" - hour: "%d時間" - minute: "%d分" - second: "%d秒" + day: "%d day(s)" + hour: "%d hour(s)" + minute: "%d minute(s)" + second: "%d second(s)" + webhook: + type: "Type" + operator: "Operator" + punishOperator: "Operator (for Punishment)" + target: "Target" + server: "Server" + newReason: "New Reason" + oldReason: "Old Reason" + unpunishReason: "Unpunish Reason" + punishReason: "Punishment Reason" + punishmentDateTime: "Punishment Date/Time" + punishmentId: "Punishment ID" + unpunishId: "Unpunish ID" + proofId: "Proof ID" + proofText: "Proof Text" + duration: "Duration" + expiration: "Expiration" + viewableByTarget: "Viewable by Target" + punishmentAdded: "Punishment Added" + punishmentReasonChanged: "Punishment Reason Changed" + punishmentRemoved: "Punishment Removed" + proofAdded: "Proof Added" + proofUpdated: "Proof Updated" + proofRemoved: "Proof Removed" # Available variables: %YEAR%, %MONTH%, %DAY%, %HOUR%, %MINUTE%, %SECOND% and %MILLIS% - datetime: "%YEAR%/%MONTH%/%DAY%-%HOUR%:%MINUTE%:%SECOND%" + datetime: "%MONTH%/%DAY%/%YEAR%-%HOUR%:%MINUTE%:%SECOND%" + failsafeKickMessage: "You cannot join the server right now. Please contact the server administrator." commands: general: - invalidGroup: "%PREFIX%無効なグループ名です。" - invalidServer: "%PREFIX%無効なサーバー名です。" - invalidPlayer: "%PREFIX%プレイヤーが見つかりません。" - invalidTime: "%PREFIX%時間(time=)の形式が正しくありません。" - invalidIPAddress: "%PREFIX%IPアドレスの形式が正しくないか、処罰不可なIPアドレスです。" - invalidPunishmentType: "%PREFIX%無効な処罰タイプです。" - invalidNumber: "%PREFIX%無効な数値です。" - timeNotSpecified: "%PREFIX%時間が指定されていません。" + invalidGroup: "%PREFIX%Invalid group name." + invalidServer: "%PREFIX%Invalid server name." + invalidPlayer: "%PREFIX%Invalid player name." + invalidTime: "%PREFIX%Invalid time (time=) syntax." + invalidIPAddress: "%PREFIX%IP Address is malformed or is not punishable." + invalidPunishmentType: "%PREFIX%Invalid punishment type." + invalidNumber: "%PREFIX%Invalid number." + timeNotSpecified: "%PREFIX%Time is not specified." # Available variables: default, %PLAYERS% - banned player names, %PLAYERS_COUNT% - samePunishmentAppliedToSameIPAddress: "%PLAYERS_COUNT%人の同じIPアドレスのプレイヤーにも同じ処罰が適用されました: %PLAYERS%" - alreadyPunished: "%PREFIX%このアカウントはすでに(同じサーバー、同じ種類で)処罰されています!" - removedFromServer: "とあるプレイヤーがこの世界から抹消された。" - offlinePlayer: "%PREFIX%このプレイヤーはオフラインです。" - notPunished: "%PREFIX%このアカウントは処罰されていません!" - noReasonSpecified: "%PREFIX%理由が指定されていません!" - noProofSpecified: "%PREFIX%証拠が指定されていません!" - punishmentNotFound: "%PREFIX%処罰#%dが見つかりません!" - proofNotFound: "%PREFIX%証拠#%dが見つかりません!" - viewable-proofs: "閲覧可能な証拠:" + samePunishmentAppliedToSameIPAddress: "Applied same punishment to %PLAYERS_COUNT% player(s): %PLAYERS%" + alreadyPunished: "%PREFIX%This player is already punished under same server and same type!" + removedFromServer: "A player has been removed from your server." + offlinePlayer: "%PREFIX%This player is offline." + notPunished: "%PREFIX%This player is not punished!" + noReasonSpecified: "%PREFIX%Reason is not specified." + noProofSpecified: "%PREFIX%Proof is not specified." + punishmentNotFound: "%PREFIX%Cannot find punishment #%d!" + proofNotFound: "%PREFIX%Cannot find proof #%d!" + viewable-proofs: "Viewable proofs:" # Available variables: %ID% - id of proof, %TEXT% - the text of proof, %PUBLIC% - always true (with color of green) proof-entry: " - %TEXT%" sab: - setDebugLevel: "%PREFIX%デバッグログレベルを%dに設定しました。" - reloadedConfiguration: "%PREFIX%設定を再読み込みしました。" - clearedCache: "%PREFIX%キャッシュを消去しました。" - deleteGroupUnpunishReason: "グループ'%GROUP%'の削除" # Available variables: default, %GROUP% (group name being removed) - removedFromPunishmentHistory: "%PREFIX%処罰\\<punishmentHistory>#%ID%を削除しました。" # Available variables: default, punishment - removedFromPunishment: "%PREFIX%処罰\\<punishments>#%ID%を削除しました。" # Available variables: default, punishment - apiTableNotFound: "%PREFIX%SpicyAzisaBan-APIのテーブルが存在しません。" - accountNoLinkCode: "%PREFIX%コードが一致しません。" - accountLinking: "%PREFIX%アカウントをリンク中..." + setDebugLevel: "%PREFIX%Debug log level was set to %d." + reloadedConfiguration: "%PREFIX%Reloaded configuration." + clearedCache: "%PREFIX%Cleared cache." + deleteGroupUnpunishReason: "Removal of group '%GROUP%'" # Available variables: default, %GROUP% (group name being removed) + removedFromPunishmentHistory: "%PREFIX%Removed punishment \\<punishmentHistory>#%ID%." # Available variables: default, punishment + removedFromPunishment: "%PREFIX%Removed punishment \\<punishments>#%ID%." # Available variables: default, punishment + apiTableNotFound: "%PREFIX%SpicyAzisaBan-API table does not exist." + accountNoLinkCode: "%PREFIX%Code does not match." + accountLinking: "%PREFIX%Linking account..." # Available variables: default, %USERNAME% (username of linked web account) - accountLinkComplete: "%PREFIX%アカウント[%USERNAME%]のリンクが完了しました。" - accountUnlinked: "%PREFIX%アカウントの連携をすべて解除しました。" + accountLinkComplete: "%PREFIX%Your account [%USERNAME%] has been linked." + accountUnlinked: "%PREFIX%Unlinked account." # Available variables (all boolean values are colored automatically): default + - # %SERVER_VERSION% - BungeeCord version + # %SERVER_NAME% - Server name (Platform name) + # %SERVER_VERSION% - Server version # %DB_CONNECTED% - true if connection between database is active, false otherwise # %DB_VERSION% - Database version (number) # %DB_FAILSAFE% - database.failsafe in config.yml @@ -76,18 +105,17 @@ commands: # %VERSION% - plugin version # %IS_DEVBUILD% - is running dev build? # %IS_DEBUGBUILD% - is running debug build? - # %SERVER_ID% - serverId in config.yml info: - - "%PREFIX%- インスタンス:" - - "%PREFIX% バージョン: %VERSION%" - - "%PREFIX% Debugビルド: %IS_DEBUGBUILD%" - - "%PREFIX% Devビルド: %IS_DEVBUILD%" - - "%PREFIX% ロックダウン: %IS_LOCKDOWN%" - - "%PREFIX%- サーバーバージョン" + - "%PREFIX%- Instance:" + - "%PREFIX% Version: %VERSION%" + - "%PREFIX% Debug build: %IS_DEBUGBUILD%" + - "%PREFIX% Dev build: %IS_DEVBUILD%" + - "%PREFIX% Lockdown: %IS_LOCKDOWN%" + - "%PREFIX%- Server version" - "%PREFIX% %SERVER_NAME% %SERVER_VERSION%" - - "%PREFIX%- データベース" - - "%PREFIX% 接続済み: %DB_CONNECTED%" - - "%PREFIX% バージョン: %DB_VERSION%" + - "%PREFIX%- Database" + - "%PREFIX% Connected: %DB_CONNECTED%" + - "%PREFIX% Version: %DB_VERSION%" - "%PREFIX% Failsafe: %DB_FAILSAFE%" - "%PREFIX%- Uptime: %UPTIME%" @@ -105,336 +133,336 @@ commands: # %TIME% - Duration of punishment # %IS_EXPIRED% - false if expired, true otherwise ban: - usage: "%PREFIX%使用法: /%CMD_PREFIX%ban [server=...]" - globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gban [server=...]" - done: "%PREFIX%%PLAYER%は、正常にBanされました!" + usage: "%PREFIX%Usage: /%CMD_PREFIX%ban [server=...]" + globalUsage: "%PREFIX%Usage: /%CMD_PREFIX%gban [server=...]" + done: "%PREFIX%%PLAYER% has been successfully banned!" notify: - - "%PLAYER%は、%SERVER%%OPERATOR%からBanされました。" - - "理由 > %REASON%" + - "%PLAYER% has been banned by %OPERATOR% on %SERVER%." + - "Reason > %REASON%" - "ID > #%ID%" layout: - - "%PREFIX%永久BANされました!" + - "%PREFIX%You have been permanently banned!" - "" - "" - - "対象サーバー » %SERVER%" - - "理由 » %REASON%" + - "Server » %SERVER%" + - "Reason » %REASON%" - "" - - "お問い合わせ:" + - "Contact us:" - "Discord » coming soon" tempban: - usage: "%PREFIX%使用法: /%CMD_PREFIX%tempban [server=...]" - globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gtempban [server=...]" - done: "%PREFIX%%PLAYER%は、正常にTempBanされました!" + usage: "%PREFIX%Usage: /%CMD_PREFIX%tempban [server=...]" + globalUsage: "%PREFIX%Usage: /%CMD_PREFIX%gtempban [server=...]" + done: "%PREFIX%%PLAYER% has been successfully temporarily banned!" notify: - - "%PLAYER%は、%SERVER%%OPERATOR%からTempBanされました。" - - "理由 > %REASON%" + - "%PLAYER% has been temporarily banned by %OPERATOR% on %SERVER%." + - "Reason > %REASON%" - "ID > #%ID%" - - "期間 > %TIME%" + - "Duration > %TIME%" layout: - - "%PREFIX%一時的にBANされました!" + - "%PREFIX%You have been temporarily banned!" - "" - "" - - "対象サーバー » %SERVER%" - - "理由 » %REASON%" - - "期間 » %DURATION%" + - "Server » %SERVER%" + - "Reason » %REASON%" + - "Duration » %DURATION%" - "" - - "お問い合わせ:" + - "Contact us:" - "Discord » coming soon" ipban: - usage: "%PREFIX%使用法: /%CMD_PREFIX%ipban [server=...]" - globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gipban [server=...]" - done: "%PREFIX%%PLAYER%は、正常にIPBanされました!" + usage: "%PREFIX%Usage: /%CMD_PREFIX%ipban [server=...]" + globalUsage: "%PREFIX%Usage: /%CMD_PREFIX%gipban [server=...]" + done: "%PREFIX%%PLAYER% has been successfully IP banned!" notify: - - "%PLAYER%は、%SERVER%%OPERATOR%からIPBanされました。" - - "理由 > %REASON%" + - "%PLAYER% has been IP banned by %OPERATOR% on %SERVER%." + - "Reason > %REASON%" - "ID > #%ID%" layout: - - "%PREFIX%永久IP BANされました!" + - "%PREFIX%You have been permanently IP banned!" - "" - "" - - "対象サーバー » %SERVER%" - - "理由 » %REASON%" + - "Server » %SERVER%" + - "Reason » %REASON%" - "" - - "お問い合わせ:" + - "Contact us:" - "Discord » coming soon" tempipban: - usage: "%PREFIX%使用法: /%CMD_PREFIX%tempipban [server=...]" - globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gtempipban [server=...]" - done: "%PREFIX%%PLAYER%は、正常にTempIPBanされました!" + usage: "%PREFIX%Usage: /%CMD_PREFIX%tempipban [server=...]" + globalUsage: "%PREFIX%Usage: /%CMD_PREFIX%gtempipban [server=...]" + done: "%PREFIX%%PLAYER% has been successfully temporarily IP banned!" notify: - - "%PLAYER%は、%SERVER%%OPERATOR%からTempIPBanされました。" - - "理由 > %REASON%" + - "%PLAYER% has been temporarily IP banned by %OPERATOR% on %SERVER%." + - "Reason > %REASON%" - "ID > #%ID%" - - "期間 > %TIME%" + - "Duration > %TIME%" layout: - - "%PREFIX%一時的にIP BANされました!" + - "%PREFIX%You have been temporarily IP banned!" - "" - "" - - "対象サーバー » %SERVER%" - - "理由 » %REASON%" - - "期間 » %DURATION%" + - "Server » %SERVER%" + - "Reason » %REASON%" + - "Duration » %DURATION%" - "" - - "お問い合わせ:" + - "Contact us:" - "Discord » coming soon" mute: - usage: "%PREFIX%使用法: /%CMD_PREFIX%mute [server=...]" - globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gmute [server=...]" - done: "%PREFIX%%PLAYER%は、正常にMuteされました!" + usage: "%PREFIX%Usage: /%CMD_PREFIX%mute [server=...]" + globalUsage: "%PREFIX%Usage: /%CMD_PREFIX%gmute [server=...]" + done: "%PREFIX%%PLAYER% has been successfully muted!" notify: - - "%PLAYER%は、%SERVER%%OPERATOR%からMuteされました。" - - "理由 > %REASON%" + - "%PLAYER% has been muted by %OPERATOR% on %SERVER%." + - "Reason > %REASON%" - "ID > #%ID%" layout1: # layout that shows to a player when a player got muted - - "%PREFIX%あなたは永久ミュートされました!" - - "対象サーバー > %SERVER%" - - "理由 > %REASON%" + - "%PREFIX%You have been permanently muted!" + - "Server > %SERVER%" + - "Reason > %REASON%" layout2: # layout that shows to a player when a player tries to speak after they got muted - - "%PREFIX%あなたは永久ミュートされています!" - - "対象サーバー > %SERVER%" - - "理由 > %REASON%" + - "%PREFIX%You are permanently muted!" + - "Server > %SERVER%" + - "Reason > %REASON%" tempmute: - usage: "%PREFIX%使用法: /%CMD_PREFIX%tempmute [server=...]" - globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gtempmute [server=...]" - done: "%PREFIX%%PLAYER%は、正常にTempMuteされました!" + usage: "%PREFIX%Usage: /%CMD_PREFIX%tempmute [server=...]" + globalUsage: "%PREFIX%Usage: /%CMD_PREFIX%gtempmute [server=...]" + done: "%PREFIX%%PLAYER% has been successfully temporarily muted!" notify: - - "%PLAYER%は、%SERVER%%OPERATOR%からTempMuteされました。" - - "理由 > %REASON%" + - "%PLAYER% has been temporarily muted by %OPERATOR% on %SERVER%." + - "Reason > %REASON%" - "ID > #%ID%" - - "期間 > %TIME%" + - "Duration > %TIME%" layout1: # layout that shows to a player when a player got muted - - "%PREFIX%あなたは一時的にミュートされました!" - - "対象サーバー > %SERVER%" - - "理由 > %REASON%" - - "期間 > %DURATION%" + - "%PREFIX%You have been temporarily muted!" + - "Server > %SERVER%" + - "Reason > %REASON%" + - "Duration > %DURATION%" layout2: # layout that shows to a player when a player tries to speak after they got muted - - "%PREFIX%あなたは一時的にミュートされています!" - - "対象サーバー > %SERVER%" - - "理由 > %REASON%" - - "期間 > %DURATION%" + - "%PREFIX%You are temporarily muted!" + - "Server > %SERVER%" + - "Reason > %REASON%" + - "Duration > %DURATION%" ipmute: - usage: "%PREFIX%使用法: /%CMD_PREFIX%ipmute [server=...]" - globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gipmute [server=...]" - done: "%PREFIX%%PLAYER%は、正常にIPMuteされました!" + usage: "%PREFIX%Usage: /%CMD_PREFIX%ipmute [server=...]" + globalUsage: "%PREFIX%Usage: /%CMD_PREFIX%gipmute [server=...]" + done: "%PREFIX%%PLAYER% has been successfully IP muted!" notify: - - "%PLAYER%は、%SERVER%%OPERATOR%からIPMuteされました。" - - "理由 > %REASON%" + - "%PLAYER% has been IP muted by %OPERATOR% on %SERVER%." + - "Reason > %REASON%" - "ID > #%ID%" layout1: # layout that shows to a player when a player got muted - - "%PREFIX%あなたは永久IPミュートされました!" - - "対象サーバー > %SERVER%" - - "理由 > %REASON%" + - "%PREFIX%You have been permanently IP muted!" + - "Server > %SERVER%" + - "Reason > %REASON%" layout2: # layout that shows to a player when a player tries to speak after they got muted - - "%PREFIX%あなたは永久IPミュートされています!" - - "対象サーバー > %SERVER%" - - "理由 > %REASON%" + - "%PREFIX%You are permanently IP muted!" + - "Server > %SERVER%" + - "Reason > %REASON%" tempipmute: - usage: "%PREFIX%使用法: /%CMD_PREFIX%tempipmute [server=...]" - globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gtempipmute [server=...]" - done: "%PREFIX%%PLAYER%は、正常にTempIPMuteされました!" + usage: "%PREFIX%Usage: /%CMD_PREFIX%tempipmute [server=...]" + globalUsage: "%PREFIX%Usage: /%CMD_PREFIX%gtempipmute [server=...]" + done: "%PREFIX%%PLAYER% has been successfully temporarily IP muted!" notify: - - "%PLAYER%は、%SERVER%%OPERATOR%からTempIPMuteされました。" - - "理由 > %REASON%" + - "%PLAYER% has been temporarily IP muted by %OPERATOR% on %SERVER%." + - "Reason > %REASON%" - "ID > #%ID%" - - "期間 > %TIME%" + - "Duration > %TIME%" layout1: # layout that shows to a player when a player got muted - - "%PREFIX%あなたは一時的にIPミュートされました!" - - "対象サーバー > %SERVER%" - - "理由 > %REASON%" - - "期間 > %DURATION%" + - "%PREFIX%You have been temporarily IP muted!" + - "Server > %SERVER%" + - "Reason > %REASON%" + - "Duration > %DURATION%" layout2: # layout that shows to a player when a player tries to speak after they got muted - - "%PREFIX%あなたは一時的にIPミュートされています!" - - "対象サーバー > %SERVER%" - - "理由 > %REASON%" - - "期間 > %DURATION%" + - "%PREFIX%You are temporarily IP muted!" + - "Server > %SERVER%" + - "Reason > %REASON%" + - "Duration > %DURATION%" warning: - usage: "%PREFIX%使用法: /%CMD_PREFIX%warning [server=...]" - globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gwarning [server=...]" - done: "%PREFIX%%PLAYER%は、正常にWarnされました!" + usage: "%PREFIX%Usage: /%CMD_PREFIX%warning [server=...]" + globalUsage: "%PREFIX%Usage: /%CMD_PREFIX%gwarning [server=...]" + done: "%PREFIX%%PLAYER% has been successfully warned!" notify: - - "%PLAYER%は、%SERVER%%OPERATOR%からWarnされました。" - - "理由 > %REASON%" + - "%PLAYER% has been warned by %OPERATOR% on %SERVER%." + - "Reason > %REASON%" - "ID > #%ID%" - - "期間 > %TIME%" + - "Duration > %TIME%" layout: - - "%PREFIX%警告を受けました" - - "対象サーバー > %SERVER%" - - "理由 > %REASON%" - title: "あなたは警告を受けました!" - subtitle: "/%CMD_PREFIX%warnsで表示を解除することができます" + - "%PREFIX%You have been warned" + - "Server > %SERVER%" + - "Reason > %REASON%" + title: "You have been warned!" + subtitle: "Use /%CMD_PREFIX%warns to dismiss this message" caution: - usage: "%PREFIX%使用法: /%CMD_PREFIX%caution [server=...]" - globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gcaution [server=...]" - done: "%PREFIX%%PLAYER%は、正常にCautionされました!" + usage: "%PREFIX%Usage: /%CMD_PREFIX%caution [server=...]" + globalUsage: "%PREFIX%Usage: /%CMD_PREFIX%gcaution [server=...]" + done: "%PREFIX%%PLAYER% has been successfully cautioned!" notify: - - "%PLAYER%は、%SERVER%%OPERATOR%からCautionされました。" - - "理由 > %REASON%" + - "%PLAYER% has been cautioned by %OPERATOR% on %SERVER%." + - "Reason > %REASON%" - "ID > #%ID%" - - "期間 > %TIME%" + - "Duration > %TIME%" layout: - - "%PREFIX%注意を受けました" - - "対象サーバー > %SERVER%" - - "理由 > %REASON%" - title: "あなたは注意を受けました!" - subtitle: "/%CMD_PREFIX%warnsで表示を解除することができます" + - "%PREFIX%You have been cautioned" + - "Server > %SERVER%" + - "Reason > %REASON%" + title: "You have been cautioned!" + subtitle: "Use /%CMD_PREFIX%warns to dismiss this message" kick: - usage: "%PREFIX%使用法: /%CMD_PREFIX%kick [server=...]" - globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gkick [server=...]" - done: "%PREFIX%%PLAYER%は、正常にKickされました!" + usage: "%PREFIX%Usage: /%CMD_PREFIX%kick [server=...]" + globalUsage: "%PREFIX%Usage: /%CMD_PREFIX%gkick [server=...]" + done: "%PREFIX%%PLAYER% has been successfully kicked!" notify: - - "%PLAYER%は、%SERVER%%OPERATOR%からKickされました。" - - "理由 > %REASON%" + - "%PLAYER% has been kicked by %OPERATOR% on %SERVER%." + - "Reason > %REASON%" - "ID > #%ID%" layout: - - "%PREFIX%サーバーからキックされました" - - "理由 > %REASON%" + - "%PREFIX%You have been kicked from the server" + - "Reason > %REASON%" note: - usage: "%PREFIX%使用法: /%CMD_PREFIX%note [server=...]" - globalUsage: "%PREFIX%使用法: /%CMD_PREFIX%gnote [server=...]" - done: "%PREFIX%%PLAYER%は、正常にNoteされました!" + usage: "%PREFIX%Usage: /%CMD_PREFIX%note [server=...]" + globalUsage: "%PREFIX%Usage: /%CMD_PREFIX%gnote [server=...]" + done: "%PREFIX%%PLAYER% has been successfully noted!" notify: - - "%PLAYER%は、%SERVER%%OPERATOR%からNoteされました。" - - "理由 > %REASON%" + - "%PLAYER% has been noted by %OPERATOR% on %SERVER%." + - "Reason > %REASON%" - "ID > #%ID%" unpunish: - usage: "%PREFIX%使用法: /%CMD_PREFIX%unpunish " - unbanUsage: "%PREFIX%使用法: /%CMD_PREFIX%unban [server=...]" - unmuteUsage: "%PREFIX%使用法: /%CMD_PREFIX%unmute [server=...]" - done: "%PREFIX%%PLAYER%は、正常にUnpunishされました!" + usage: "%PREFIX%Usage: /%CMD_PREFIX%unpunish " + unbanUsage: "%PREFIX%Usage: /%CMD_PREFIX%unban [server=...]" + unmuteUsage: "%PREFIX%Usage: /%CMD_PREFIX%unmute [server=...]" + done: "%PREFIX%%PLAYER% has been successfully unpunished!" # %TYPE%, %PREASON%, %PID% can be used here notify: - - "%PLAYER%は、%SERVER%%OPERATOR%からUnpunishされました。" - - "処罰タイプ > %TYPE%" - - "処罰理由 > %PREASON%" - - "処罰ID > #%PID%" - - "解除理由 > %REASON%" + - "%PLAYER% has been unpunished by %OPERATOR% on %SERVER%." + - "Punishment Type > %TYPE%" + - "Punishment Reason > %PREASON%" + - "Punishment ID > #%PID%" + - "Unpunish Reason > %REASON%" - "ID > #%ID%" changereason: - usage: "%PREFIX%使用法: /%CMD_PREFIX%changereason " - done: "%PREFIX%処罰#%ID%は正常に更新されました。" + usage: "%PREFIX%Usage: /%CMD_PREFIX%changereason " + done: "%PREFIX%Punishment #%ID% has been successfully updated." addproof: - usage: "%PREFIX%使用法: /%CMD_PREFIX%addproof [public]" + usage: "%PREFIX%Usage: /%CMD_PREFIX%addproof [public]" # %PID% can be used here (punishment id), %ID% for proof id, %TEXT% for proof text, and %PUBLIC% for colored true/false value - done: "%PREFIX%処罰#%PID%に証拠を追加しました。(ID: %ID%, Public: %PUBLIC%)" + done: "%PREFIX%Proof has been added to punishment #%PID%. (ID: %ID%, Public: %PUBLIC%)" updateproof: - usage: "%PREFIX%使用法: /%CMD_PREFIX%updateproof [text=\"...\"] [public]" + usage: "%PREFIX%Usage: /%CMD_PREFIX%updateproof [text=\"...\"] [public]" # %PID% can be used here (punishment id), %ID% for proof id, %TEXT% for proof text, and %PUBLIC% for colored true/false value - done: "%PREFIX%処罰#%PID%の証拠#%ID%は正常に更新されました。" + done: "%PREFIX%Proof for punishment #%PID% has been successfully updated. (ID: %ID%, Public: %PUBLIC%)" delproof: - usage: "%PREFIX%使用法: /%CMD_PREFIX%delproof " + usage: "%PREFIX%Usage: /%CMD_PREFIX%delproof " # %PID% can be used here (punishment id), and %ID% is proof id # and %TEXT% for original proof text - done: "%PREFIX%処罰#%PID%から証拠を削除しました。(ID: %ID%)" + done: "%PREFIX%Proof has been deleted from punishment #%PID%. (ID: %ID%)" seen: - usage: "%PREFIX%使用法: /%CMD_PREFIX%seen " - searching: "%PREFIX%プレイヤーを検索中..." + usage: "%PREFIX%Usage: /%CMD_PREFIX%seen " + searching: "%PREFIX%Searching for player..." # Available variables: %PLAYER%, %SINCE%, %STATUS%, %NAME_HISTORY%, %IP%, %HOSTNAME%, %IP_HISTORY%, # %SAME_IP_PLAYERS%, %SAME_IP_PLAYERS_COUNT%, %FIRST_LOGIN%, %FIRST_LOGIN_ATTEMPT%, %LAST_LOGIN%, %LAST_LOGIN_ATTEMPT% layout: - - "%PREFIX%%PLAYER%%SINCE%前から%STATUS%です。" - - "UUID > %UUID%" - - "最初のログイン > %FIRST_LOGIN%" - - "最初のログイン試行 > %FIRST_LOGIN_ATTEMPT%" - - "最近のログイン > %LAST_LOGIN%" - - "最近のログイン試行 > %LAST_LOGIN_ATTEMPT%" - - "過去の名前 > %NAME_HISTORY%" - - "最近のIPアドレス > %IP% (%HOSTNAME%)" - - "過去のすべてのIPアドレス > %IP_HISTORY%" - - "同じIPで接続しているプレイヤー > %SAME_IP_PLAYERS%" + - "%PREFIX%%PLAYER% has been %STATUS% for %SINCE%." + - "UUID > %UUID%" + - "First login > %FIRST_LOGIN%" + - "First login attempt > %FIRST_LOGIN_ATTEMPT%" + - "Last login > %LAST_LOGIN%" + - "Last login attempt > %LAST_LOGIN_ATTEMPT%" + - "Name history > %NAME_HISTORY%" + - "Recent IP address > %IP% (%HOSTNAME%)" + - "All past IP addresses > %IP_HISTORY%" + - "Players connected with the same IP > %SAME_IP_PLAYERS%" # Available variables: %PLAYERS_COUNT%, %PLAYERS%, %HOSTNAME%, %IP_ADDRESS% # * = they have different ip now # green player name = currently online layoutIP: - - "%PREFIX%%IP_ADDRESS% (%HOSTNAME%)は過去に%PLAYERS_COUNT%個のアカウントで接続しています:" + - "%PREFIX%%IP_ADDRESS% (%HOSTNAME%) has been connected with %PLAYERS_COUNT% accounts:" - "%PLAYERS%" warns: # Available variables: default - notWarnedYet: "%PREFIX%まだ警告を受けていません。" - header: "%PREFIX%有効な警告一覧:" + notWarnedYet: "%PREFIX%You have not been warned yet." + header: "%PREFIX%Active warnings:" # Available variables: punishment, default layout: - "[%DATE%]" - - "タイプ > %TYPE%" - - "対象サーバー > %SERVER%" - - "理由 > %REASON%" + - "Type > %TYPE%" + - "Target server > %SERVER%" + - "Reason > %REASON%" history: - usage: "%PREFIX%使用法: /%CMD_PREFIX%history [page=...] [--all] [--active]" + usage: "%PREFIX%Usage: /%CMD_PREFIX%history [page=...] [--all] [--active]" # Available variables: %TARGET% - header: "%PREFIX%%TARGET%の履歴:" + header: "%PREFIX%History of %TARGET%:" # Available variables: variables of punishment + %DATE%, %STRIKETHROUGH_IF_UNPUNISHED%, %UNPUNISH_REASON%, # %UNPUNISH_ID%, %UNPUNISH_OPERATOR%, %FLAGS% layout: - - "[%DATE%] (/%CMD_PREFIX%proofs %ID%で証拠を表示)" - - "名前/IP > %PLAYER%" - - "タイプ > %TYPE%" - - "期間 > %STRIKETHROUGH_IF_UNPUNISHED%%TIME% (期限切れ: %IS_EXPIRED%)" - - "理由 > %REASON% %UNPUNISH_REASON%" - - "ID > #%ID% %UNPUNISH_ID%" - - "サーバー > %SERVER%" - - "執行者 > %OPERATOR% %UNPUNISH_OPERATOR%" - - "フラグ > %FLAGS%" + - "[%DATE%] (Use /%CMD_PREFIX%proofs %ID% to view proof)" + - "Name/IP > %PLAYER%" + - "Type > %TYPE%" + - "Duration > %STRIKETHROUGH_IF_UNPUNISHED%%TIME% (Expired: %IS_EXPIRED%)" + - "Reason > %REASON% %UNPUNISH_REASON%" + - "ID > #%ID% %UNPUNISH_ID%" + - "Server > %SERVER%" + - "Operator > %OPERATOR% %UNPUNISH_OPERATOR%" + - "Flags > %FLAGS%" # Available variables: %CURRENT_PAGE%, %MAX_PAGE%, %COUNT% - footer: "ページ %CURRENT_PAGE%/%MAX_PAGE% | 処罰件数: %COUNT%" + footer: "Page %CURRENT_PAGE%/%MAX_PAGE% | Punishments: %COUNT%" # Available variables: %REASON% - unpunishReason: "(解除理由: %REASON%)" + unpunishReason: "(Unpunish reason: %REASON%)" # Available variables: %ID% - unpunishId: "(解除ID: %ID%)" + unpunishId: "(Unpunish ID: %ID%)" # Available variables: %OPERATOR% - unpunishOperator: "(解除者: %OPERATOR%)" + unpunishOperator: "(Unpunish operator: %OPERATOR%)" # Available variables: default - invalidArguments: "%PREFIX%--all--activeを同時に使用することはできません。" + invalidArguments: "%PREFIX%--all and --active cannot be used together." check: - usage: "%PREFIX%使用法: /%CMD_PREFIX%check [--ip] [--only]" - searching: "%PREFIX%プレイヤーを検索中..." + usage: "%PREFIX%Usage: /%CMD_PREFIX%check [--ip] [--only]" + searching: "%PREFIX%Searching for player..." # Available variables: %NAME%, %UUID%, %IP%, %HOSTNAME%, %MUTE_COUNT%, %BAN_COUNT%, %WARNING_COUNT%, # %CAUTION_COUNT%, %NOTE_COUNT%, %KICK_COUNT%, %BAN_INFO%, %MUTE_INFO% layout: - - "プレイヤー > %NAME% (%UUID%)" - - "IPアドレス > %IP% (%HOSTNAME%)" - - "Mute > %MUTE_INFO%" - - "Ban > %BAN_INFO%" - - "警告数 > %WARNING_COUNT%" - - "注意数 > %CAUTION_COUNT%" - - "ノート > %NOTE_COUNT%" - - "キック > %KICK_COUNT%" + - "Player > %NAME% (%UUID%)" + - "IP address > %IP% (%HOSTNAME%)" + - "Mute > %MUTE_INFO%" + - "Ban > %BAN_INFO%" + - "Warnings > %WARNING_COUNT%" + - "Cautions > %CAUTION_COUNT%" + - "Notes > %NOTE_COUNT%" + - "Kicks > %KICK_COUNT%" # Available variables: %IP%, %HOSTNAME%, %MUTE_COUNT%, %BAN_COUNT%, %WARNING_COUNT%, %CAUTION_COUNT%, %NOTE_COUNT%, # %KICK_COUNT%, %BAN_INFO%, %MUTE_INFO% layoutIP: - - "IPアドレス > %IP% (%HOSTNAME%)" - - "Mute > %MUTE_INFO%" - - "Ban > %BAN_INFO%" - - "警告数 > %WARNING_COUNT%" - - "注意数 > %CAUTION_COUNT%" - - "ノート > %NOTE_COUNT%" + - "IP address > %IP% (%HOSTNAME%)" + - "Mute > %MUTE_INFO%" + - "Ban > %BAN_INFO%" + - "Warnings > %WARNING_COUNT%" + - "Cautions > %CAUTION_COUNT%" + - "Notes > %NOTE_COUNT%" # Available variables for banInfo and muteInfo: default, punishment - banInfo: "%DURATION% (ID: #%ID%, 理由: %REASON%)" - muteInfo: "%DURATION% (ID: #%ID%, 理由: %REASON%)" - cannotUseTargetAndID: "%PREFIX%target=id=を併用することはできません。" + banInfo: "%DURATION% (ID: #%ID%, Reason: %REASON%)" + muteInfo: "%DURATION% (ID: #%ID%, Reason: %REASON%)" + cannotUseTargetAndID: "%PREFIX%You cannot use target= and id= together." proofs: - usage: "%PREFIX%使用法: /%CMD_PREFIX%proofs " + usage: "%PREFIX%Usage: /%CMD_PREFIX%proofs " # Available variables: punishment + %PID% (punishment id) - header: "%PREFIX%処罰#%PID%の証拠一覧:" + header: "%PREFIX%Proofs for punishment #%PID%:" # Available variables: %PID% (punishment id), %ID% (proof id), %TEXT% (proof text), %PUBLIC% (colored true/false value) layout: - - "証拠ID #%ID% (公開: %PUBLIC%) > %TEXT%" + - "Proof ID #%ID% (Public: %PUBLIC%) > %TEXT%" banlist: - usage: "%PREFIX%使用法: /%CMD_PREFIX%banlist [page=...] [type=...] [server=...] [--all] [--active]" + usage: "%PREFIX%Usage: /%CMD_PREFIX%banlist [page=...] [type=...] [server=...] [--all] [--active]" # Available variables: default - header: "%PREFIX%処罰履歴:" + header: "%PREFIX%Punishment history:" # Available variables: %CURRENT_PAGE%, %MAX_PAGE%, %COUNT% - footer: "ページ %CURRENT_PAGE%/%MAX_PAGE% | 処罰件数: %COUNT%" + footer: "Page %CURRENT_PAGE%/%MAX_PAGE% | Punishments: %COUNT%" # Available variables: default - invalidArguments: "%PREFIX%--all--activeを同時に使用することはできません。" + invalidArguments: "%PREFIX%--all and --active cannot be used together." lockdown: - usage: "%PREFIX%使用法: /%CMD_PREFIX%lockdown " + usage: "%PREFIX%Usage: /%CMD_PREFIX%lockdown " lockdown: - - "%PREFIX%現在新規参加者を受け付けていません。" - - "しばらく時間が経った後に再参加してください。" + - "%PREFIX%New players are currently not allowed to join." + - "Please try again after some time." # Available variables: default, %PLAYER%, %IP_ADDRESS% - lockdownJoinAttempt: "[Lockdown] 新規プレイヤー'%PLAYER%'が参加しようとしました。IPアドレス: %IP_ADDRESS%" + lockdownJoinAttempt: "[Lockdown] New player '%PLAYER%' attempted to join. IP address: %IP_ADDRESS%" # Available variables for (enabled|disabled)Lockdown: default, %ACTOR% (actor who toggled the lockdown) - enabledLockdown: "%PREFIX%%ACTOR%がサーバーロックダウンを有効にしました。" - disabledLockdown: "%PREFIX%%ACTOR%がサーバーロックダウンを無効にしました。" + enabledLockdown: "%PREFIX%%ACTOR% has enabled the server lockdown." + disabledLockdown: "%PREFIX%%ACTOR% has disabled the server lockdown." namehistory: - usage: "%PREFIX%使用法: /%CMD_PREFIX%namehistory " + usage: "%PREFIX%Usage: /%CMD_PREFIX%namehistory " diff --git a/velocity/src/main/kotlin/net/azisaba/spicyAzisaBan/velocity/listener/LockdownListener.kt b/velocity/src/main/kotlin/net/azisaba/spicyAzisaBan/velocity/listener/LockdownListener.kt index 1b05f5e..3f7459f 100644 --- a/velocity/src/main/kotlin/net/azisaba/spicyAzisaBan/velocity/listener/LockdownListener.kt +++ b/velocity/src/main/kotlin/net/azisaba/spicyAzisaBan/velocity/listener/LockdownListener.kt @@ -2,15 +2,24 @@ package net.azisaba.spicyAzisaBan.velocity.listener import com.velocitypowered.api.event.Subscribe import com.velocitypowered.api.event.connection.PreLoginEvent +import net.azisaba.spicyAzisaBan.SABMessages import net.kyori.adventure.text.Component import net.kyori.adventure.text.format.NamedTextColor object LockdownListener { @Subscribe fun onLogin(e: PreLoginEvent) { - e.result = PreLoginEvent.PreLoginComponentResult.denied( - Component.text("現在サーバーには参加できません。サーバー管理者へお問い合わせください。") - .append(Component.text("(SAB: Initialization error)").color(NamedTextColor.DARK_GRAY)) - ) + try { + e.result = PreLoginEvent.PreLoginComponentResult.denied( + Component.text(SABMessages.General.failsafeKickMessage) + .append(Component.text("(SAB: Initialization error)").color(NamedTextColor.DARK_GRAY)) + ) + } catch (ex: Exception) { + ex.printStackTrace() + e.result = PreLoginEvent.PreLoginComponentResult.denied( + Component.text("You cannot join the server right now. Please contact the server administrator.") + .append(Component.text("(SAB: Initialization error)").color(NamedTextColor.DARK_GRAY)) + ) + } } }