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 c90422d2..7f8ed368 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 <tpl templateId|refresh|revoke templateId|content>",
+    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 f4588ef2..8a00d9cf 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 18fbfa4a..271311c4 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 a057be8c..d2629d52 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 <tpl templateId|refresh|revoke templateId|content>",
+      "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 <all|wp|art|mat>",
@@ -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 64fade3d..c2a2eee6 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": "姝e湪鍔犺浇 resources...",
-        "finish": "宸插姞杞� resources銆�"
+        "finish": "瀹屾垚鍔犺浇 resources銆�"
       }
     }
   },
@@ -118,12 +118,12 @@
       "description": "鍒涘缓鎴栧垹闄よ处鍙�"
     },
     "announce": {
-      "command_usage": "鐢ㄦ硶锛歛 <tpl templateId|refresh|revoke templateId|content>",
-      "send_success": "鎴愬姛鍦板彂閫佷簡涓€鍒欏叕鍛婏紝浣犲彲浠ラ€氳繃/a revoke %s鏉ユ挙閿€銆�",
-      "refresh_success": "鎴愬姛鍦板埛鏂颁簡鍏憡閰嶇疆銆�(鍏�%s涓�)",
+      "command_usage": "鐢ㄦ硶锛歛nnounce|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": "鐢ㄦ硶锛歝lear <all|wp|art|mat>\nall: 鎵€鏈�, wp: 姝﹀櫒, art: 鍦i仐鐗�, mat: 鏉愭枡",
@@ -157,7 +157,7 @@
       "given_level": "宸插皢 %s [绛夌骇 %s] %s 涓粰浜� %s銆�",
       "given_avatar": "宸插皢瑙掕壊 %s [绛夌骇 %s] 缁欎笌 %s銆�",
       "giveall_success": "鎴愬姛缁欎簣鍏ㄩ儴鐗╁搧銆�",
-      "description": "缁欎簣鐗╁搧缁欎綘鎴栨寚瀹氱殑鐜╁銆傛瘮濡傚彲浠ョ粰浜堝叏閮ㄦ鍣紝瑙掕壊鍜�/鎴栨潗鏂欙紝涔熷彲浠ョ粰浜堣嚜瀹氫箟鍦i仐鐗�"
+      "description": "鍚戜綘鎴栨寚瀹氱殑鐜╁缁欎簣鐗╁搧銆傛瘮濡傚彲浠ョ粰浜堝叏閮ㄦ鍣紝瑙掕壊鍜�/鎴栨潗鏂欙紝涔熷彲浠ョ粰浜堣嚜瀹氫箟鍦i仐鐗�"
     },
     "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": "鏄剧ず鎴栧垏鎹㈠綋鍓嶈瑷€"
     },
-- 
GitLab