From 7bae35f51b2298b5e14eeeeabc02c340756f71f1 Mon Sep 17 00:00:00 2001 From: Tesutarin <105267106+Tesutarin@users.noreply.github.com> Date: Sat, 9 Jul 2022 21:39:40 +0800 Subject: [PATCH] Update translation & bug fix (#1472) Original commits: * Update translation * Bug fix * Update translation * Update Announcement.json --- .../command/commands/AnnounceCommand.java | 2 +- .../command/commands/HelpCommand.java | 4 +-- .../resources/defaults/data/Announcement.json | 6 ++-- src/main/resources/languages/en-US.json | 12 ++++---- src/main/resources/languages/zh-CN.json | 29 +++++++++---------- 5 files changed, 26 insertions(+), 27 deletions(-) diff --git a/src/main/java/emu/grasscutter/command/commands/AnnounceCommand.java b/src/main/java/emu/grasscutter/command/commands/AnnounceCommand.java index c90422d24..7f8ed3680 100644 --- a/src/main/java/emu/grasscutter/command/commands/AnnounceCommand.java +++ b/src/main/java/emu/grasscutter/command/commands/AnnounceCommand.java @@ -13,7 +13,7 @@ import java.util.Random; import static emu.grasscutter.utils.Language.translate; @Command(label = "announce", - usage = "a ", + usage = "announce|a <\"tpl\" templateId|\"refresh\"|\"revoke\" templateId|content>", permission = "server.announce", aliases = {"a"}, description = "commands.announce.description", diff --git a/src/main/java/emu/grasscutter/command/commands/HelpCommand.java b/src/main/java/emu/grasscutter/command/commands/HelpCommand.java index f4588ef25..8a00d9cfc 100644 --- a/src/main/java/emu/grasscutter/command/commands/HelpCommand.java +++ b/src/main/java/emu/grasscutter/command/commands/HelpCommand.java @@ -115,9 +115,9 @@ public final class HelpCommand implements CommandHandler { builder.append(alias).append(" "); } } - builder.append("\n").append(translate(player, "commands.help.permission")); + builder.append("\n").append(translate(player, "commands.help.tip_need_permission")); if(annotation.permission().isEmpty() || annotation.permission().isBlank()) { - builder.append(translate(player, "commands.help.no_permission")); + builder.append(translate(player, "commands.help.tip_need_no_permission")); } else { builder.append(annotation.permission()); diff --git a/src/main/resources/defaults/data/Announcement.json b/src/main/resources/defaults/data/Announcement.json index 18fbfa4a9..271311c46 100644 --- a/src/main/resources/defaults/data/Announcement.json +++ b/src/main/resources/defaults/data/Announcement.json @@ -3,7 +3,7 @@ "templateId" : 1, "type" : "CENTER", "frequency" : 1, - "content": "Welcome to grasscutter PS!", + "content": "Welcome to Grasscutter PS!", "beginTime": "2022-06-01T00:00:00+08:00", "endTime": "2022-06-01T00:08:00+08:00", "tick" : false, @@ -13,10 +13,10 @@ "templateId" : 2, "type" : "COUNTDOWN", "frequency" : 1, - "content": "Welcome to grasscutter PS!", + "content": "Welcome to Grasscutter PS!", "beginTime": "2022-06-01T00:00:00+08:00", "endTime": "2022-06-01T00:08:00+08:00", "tick" : false, "interval": 1 } -] \ No newline at end of file +] diff --git a/src/main/resources/languages/en-US.json b/src/main/resources/languages/en-US.json index a057be8cb..d2629d525 100644 --- a/src/main/resources/languages/en-US.json +++ b/src/main/resources/languages/en-US.json @@ -118,12 +118,12 @@ "description": "Modify user accounts" }, "announce": { - "command_usage": "Usage: a ", + "command_usage": "Usage: announce|a <\"tpl\" templateId|\"refresh\"|\"revoke\" templateId|content>", "send_success": "Send an announcement successfully, you can revoke it by /a revoke %s.", - "refresh_success": "Refresh announcement config file successfully. (Total %s)", + "refresh_success": "Refresh announcement config file successfully. [Total %s]", "revoke_done": "Try to revoke announcement %s.", - "description": "Send announcement to all online players, or manage server's announcement.", - "not_found": "Could not found announcement %s." + "not_found": "Could not found announcement %s.", + "description": "Send announcement to all online players, or manage server's announcement" }, "clear": { "command_usage": "Usage: clear ", @@ -167,11 +167,11 @@ "usage": "Usage: ", "aliases": "Aliases: ", "available_commands": "Available commands: ", - "description": "Sends the help message or shows information about a specified command", "tip_need_permission": "Permission: ", "tip_need_no_permission": " None", "tip_permission_targeted": " (Permission %s is also required to use on other players)", - "warn_player_has_no_permission": "Notice: You do not have permission to run this command." + "warn_player_has_no_permission": "Notice: You do not have permission to run this command.", + "description": "Sends the help message or shows information about a specified command" }, "kick": { "player_kick_player": "Player [%s:%s] has kicked player [%s:%s]", diff --git a/src/main/resources/languages/zh-CN.json b/src/main/resources/languages/zh-CN.json index 64fade3d9..c2a2eee6a 100644 --- a/src/main/resources/languages/zh-CN.json +++ b/src/main/resources/languages/zh-CN.json @@ -56,7 +56,7 @@ "game_version": "游戏版本:%s", "resources": { "loading": "正在加载 resources...", - "finish": "已加载 resources。" + "finish": "完成加载 resources。" } } }, @@ -118,12 +118,12 @@ "description": "创建或删除账号" }, "announce": { - "command_usage": "用法:a ", - "send_success": "成功地发送了一则公告,你可以通过/a revoke %s来撤销。", - "refresh_success": "成功地刷新了公告配置。(共%s个)", + "command_usage": "用法:announce|a <\"tpl\"(发送) 模板ID|\"refresh\"(刷新)|\"revoke\"(撤销) 模板ID|内容>", + "send_success": "成功发送了一则公告,你可以通过 /a revoke %s 撤销。", + "refresh_success": "成功刷新了公告配置。[共 %s 个]", "revoke_done": "尝试撤回公告 %s。", - "description": "向所有在线玩家发送公告,或者管理服务器的公告。", - "not_found": "找不到公告 %s。" + "not_found": "找不到公告 %s。", + "description": "向所有在线玩家发送公告,或者管理服务器的公告" }, "clear": { "command_usage": "用法:clear \nall: 所有, wp: 武器, art: 圣遗物, mat: 材料", @@ -157,7 +157,7 @@ "given_level": "已将 %s [等级 %s] %s 个给予 %s。", "given_avatar": "已将角色 %s [等级 %s] 给与 %s。", "giveall_success": "成功给予全部物品。", - "description": "给予物品给你或指定的玩家。比如可以给予全部武器,角色和/或材料,也可以给予自定义圣遗物" + "description": "向你或指定的玩家给予物品。比如可以给予全部武器,角色和/或材料,也可以给予自定义圣遗物" }, "heal": { "success": "已治疗所有角色。", @@ -167,12 +167,11 @@ "usage": "用法:", "aliases": "别名:", "available_commands": "可用命令:", - "description": "发送帮助信息或显示指定命令的信息", - "tip_need_permission": "所需权限: ", - "tip_need_no_permission": " 无", - "tip_permission_targeted": "(对其他玩家使用这个命令还需要权限%s)", - "warn_player_has_no_permission": "注意:你没有执行这个命令的权限" - + "tip_need_permission": "所需权限:", + "tip_need_no_permission": "无", + "tip_permission_targeted": " (对其他玩家使用这个命令还需要权限 %s)", + "warn_player_has_no_permission": "注意:你没有执行这个命令的权限。", + "description": "发送帮助信息或显示指定命令的信息" }, "kick": { "player_kick_player": "玩家 [%s:%s] 已将 [%s:%s] 踢出。", @@ -191,8 +190,8 @@ "description": "杀死玩家当前角色" }, "language": { - "current_language": "当前语言为:%s", - "language_changed": "已切换语言为:%s", + "current_language": "当前语言:%s", + "language_changed": "语言切换至:%s", "language_not_found": "目前服务端没有这种语言:%s", "description": "显示或切换当前语言" },