From 1217d1ae71658fbf62ecf96b7abbec18100db995 Mon Sep 17 00:00:00 2001 From: Forever_Railgun <14428346+Forever_Railgun@user.noreply.gitee.com> Date: Sun, 8 Jun 2025 14:53:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=A9=E5=AE=B6=E5=90=8D=E7=A7=B0=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=20=E4=BD=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Fk/Pages/RoomLogic.js | 3 +++ Fk/util.js | 3 +++ lua/client/client.lua | 3 +++ lua/client/i18n/en_US.lua | 1 + lua/client/i18n/vi_VN.lua | 1 + lua/client/i18n/zh_CN.lua | 1 + lua/server/gameevent.lua | 3 +++ 7 files changed, 15 insertions(+) diff --git a/Fk/Pages/RoomLogic.js b/Fk/Pages/RoomLogic.js index 8c5f798..95efbe9 100644 --- a/Fk/Pages/RoomLogic.js +++ b/Fk/Pages/RoomLogic.js @@ -553,6 +553,9 @@ function getPlayerStr(playerid) { if (photo.deputyGeneral && photo.deputyGeneral !== "") { ret = ret + "/" + luatr(photo.deputyGeneral); } + if (playerid == Self.id) { + ret = ret + luatr("playerstr_self") + } return ret; } diff --git a/Fk/util.js b/Fk/util.js index 2c8c49d..3e8ea99 100644 --- a/Fk/util.js +++ b/Fk/util.js @@ -23,6 +23,9 @@ function getPlayerStr(playerid) { if (photo.deputyGeneral && photo.deputyGeneral !== "") { ret = ret + "/" + luatr(photo.deputyGeneral); } + if (playerid == Self.id) { + ret = ret + luatr("playerstr_self") + } return ret; } diff --git a/lua/client/client.lua b/lua/client/client.lua index b8b6210..3cfb103 100644 --- a/lua/client/client.lua +++ b/lua/client/client.lua @@ -192,6 +192,9 @@ local function parseMsg(msg, nocolor, visible_data) break end end + if pid == Self.id then + ret = ret .. Fk:translate("playerstr_self") + end ret = string.format(str, color, ret) return ret end diff --git a/lua/client/i18n/en_US.lua b/lua/client/i18n/en_US.lua index bb8d2fd..519062e 100644 --- a/lua/client/i18n/en_US.lua +++ b/lua/client/i18n/en_US.lua @@ -293,6 +293,7 @@ Fk:loadTranslationTable({ ["seat#11"] = "Seat#11", ["seat#12"] = "Seat#12", ["@ControledBy"] = "Controller", + ["playerstr_self"] = "(you)", -- ["Menu"] = "菜单", -- ["Surrender"] = "投降", diff --git a/lua/client/i18n/vi_VN.lua b/lua/client/i18n/vi_VN.lua index f81f098..9c3a73b 100644 --- a/lua/client/i18n/vi_VN.lua +++ b/lua/client/i18n/vi_VN.lua @@ -348,6 +348,7 @@ Trang chủ: https://libgit2.org ["seat#11"] = "#11", ["seat#12"] = "#12", ["@ControledBy"] = "Bị kiểm soát bởi", + --["playerstr_self"] = "(你)", ["Menu"] = "Menu", ["Surrender"] = "Đầu hàng", diff --git a/lua/client/i18n/zh_CN.lua b/lua/client/i18n/zh_CN.lua index b205b32..95eed7b 100644 --- a/lua/client/i18n/zh_CN.lua +++ b/lua/client/i18n/zh_CN.lua @@ -362,6 +362,7 @@ FreeKill使用的是libgit2的C API,与此同时使用Git完成拓展包的下 ["seat#11"] = "十一号位", ["seat#12"] = "十二号位", ["@ControledBy"] = "控制者", + ["playerstr_self"] = "(你)", ["Menu"] = "菜单", ["Surrender"] = "投降", diff --git a/lua/server/gameevent.lua b/lua/server/gameevent.lua index 756be44..bc77a64 100644 --- a/lua/server/gameevent.lua +++ b/lua/server/gameevent.lua @@ -115,6 +115,9 @@ local function parseMsg(msg, nocolor, visible_data) break end end + if pid == Self.id then + ret = ret .. Fk:translate("playerstr_self") + end ret = string.format(str, color, ret) return ret end -- Gitee