diff --git a/data/server/languages/zh-cn.json b/data/server/languages/zh-cn.json index d0e6c861..7e79179b 100644 --- a/data/server/languages/zh-cn.json +++ b/data/server/languages/zh-cn.json @@ -64,6 +64,14 @@ "key": "Arming bomb... %d", "value": "C4安装中... %d" }, + { + "key": "Ball", + "value": "球类模式" + }, + { + "key": "Battle Royale", + "value": "大逃杀" + }, { "key": "Blue team scores!", "value": "蓝队得分!" @@ -84,6 +92,10 @@ "key": "Bomb disarmed - Blue team wins", "value": "炸弹被解除 - 蓝队胜利" }, + { + "key": "Capture the flag", + "value": "夺旗模式" + }, { "key": "Cyborg wave cleared", "value": "赛博格被全部击退" @@ -96,6 +108,10 @@ "key": "Death takes all", "value": "死神永生" }, + { + "key": "Deathmatch", + "value": "死亡竞赛" + }, { "key": "Disarming bomb... %d", "value": "C4拆除中... %d" @@ -116,6 +132,10 @@ "key": "Everybody dies", "value": "无人生还" }, + { + "key": "Extra explosive death match!", + "value": "爆炸就是艺术!" + }, { "key": "Furries terminated", "value": "兽人被全歼" @@ -132,6 +152,10 @@ "key": "Go!", "value": "走你!" }, + { + "key": "Grenade Deathmatch", + "value": "榴弹死亡竞技" + }, { "key": "Hide", "value": "嘘————" @@ -140,6 +164,10 @@ "key": "Highest level reached on server: %d", "value": "该服务器闯到的最高关卡: %d" }, + { + "key": "Instakill CTF", + "value": "瞬杀夺旗" + }, { "key": "Invalid client id to kick", "value": "无效的客户端ID" @@ -152,6 +180,10 @@ "key": "Invalid spectator id used", "value": "无效的旁观者ID" }, + { + "key": "Invasion", + "value": "入侵" + }, { "key": "KILL!", "value": "杀!!" @@ -184,6 +216,14 @@ "key": "Ocean of blood", "value": "血流成河" }, + { + "key": "PvE", + "value": "合作" + }, + { + "key": "Reactor Bomber", + "value": "爆破反应堆" + }, { "key": "Reactor defense", "value": "保护反应堆" @@ -252,6 +292,10 @@ "key": "Stage completed", "value": "阶段性胜利" }, + { + "key": "Team deathmatch", + "value": "团队死斗" + }, { "key": "Teams are locked", "value": "队伍被锁定了" @@ -392,10 +436,34 @@ "key": "admin moved '%s' to spectator (%s)", "value": "管理员把 '%s' 移到了旁观者 (%s)" }, + { + "key": "ball_small1.map - no bots", + "value": "ball_small1.map - 无AI" + }, + { + "key": "ball_small2.map - no bots", + "value": "ball_small2.map - 无AI" + }, { "key": "blue", "value": "蓝" }, + { + "key": "generated map", + "value": "自动生成地图" + }, + { + "key": "generated map - last man standing", + "value": "自动生成地图 - 活到最后" + }, + { + "key": "generated match", + "value": "自动生成地图" + }, + { + "key": "reactor1.map - survival mode PvP", + "value": "reactor1.map - 生存模式PvP" + }, { "key": "red", "value": "红" diff --git a/scripts/Json/Parse.py b/scripts/Json/Parse.py index c6bc1b47..71b7e597 100644 --- a/scripts/Json/Parse.py +++ b/scripts/Json/Parse.py @@ -11,11 +11,11 @@ unique_labels = set() # 使用集合来避免重复 -def help_localize(directory, tpattern): +def help_localize(directory, suffix, tpattern): pattern = re.compile(tpattern, re.IGNORECASE) for root, dirs, files in os.walk(directory): for filename in files: - if filename.endswith('.cpp'): + if filename.endswith(suffix): # 获取完整文件路径 file_path = os.path.join(root, filename) # 打开并读取文件内容 @@ -31,10 +31,12 @@ def help_localize(directory, tpattern): with open(labelfile, "w") as fw: # 使用 "w" 而不是 "a" 来覆盖旧文件 fw.writelines(sorted(unique_labels)) # 对标签进行排序并写入文件 -help_localize("src/game/server/", 'Localize\\("(.+?)"') -help_localize("src/game/server/", 'SendChatTarget\\([^,]*, "(.+?)"') -help_localize("src/game/server/", 'SendBroadcast\\("(.+?)"') -help_localize("src/game/server/", 'SendBroadcastFormat\\([^,]*, [^,]*, "(.+?)"') +help_localize("src/game/server/", '.cpp', 'Localize\\("(.+?)"') +help_localize("src/game/server/", '.cpp', 'SendChatTarget\\([^,]*, "(.+?)"') +help_localize("src/game/server/", '.cpp', 'SendBroadcast\\("(.+?)"') +help_localize("src/game/server/", '.cpp', 'SendBroadcastFormat\\([^,]*, [^,]*, "(.+?)"') +help_localize("data/server/gamevotes", '.vot', 'name: (.*)') +help_localize("data/server/gamevotes", '.vot', 'description: (.*)')