diff --git a/Fk/Pages/RoomLogic.js b/Fk/Pages/RoomLogic.js index 8c5f798a990e3c2d360ccdd3944623c8f0ddb81e..6e9694cf30606fecd2914e7d9cac9fd4bd75c137 100644 --- a/Fk/Pages/RoomLogic.js +++ b/Fk/Pages/RoomLogic.js @@ -545,7 +545,11 @@ function doIndicate(from, tos) { function getPlayerStr(playerid) { const photo = getPhoto(playerid); if (photo.general === "anjiang" && (photo.deputyGeneral === "anjiang" || !photo.deputyGeneral)) { - return luatr("seat#" + photo.seatNumber); + let ret = luatr("seat#" + photo.seatNumber); + if (playerid == Self.id) { + ret = ret + luatr("playerstr_self") + } + return luatr(ret); } let ret = photo.general; @@ -553,6 +557,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 2c8c49d3ec8107063fecace1ed1879c680de8ca7..b2798e2653941e942828e14ebccbef4371c32556 100644 --- a/Fk/util.js +++ b/Fk/util.js @@ -15,7 +15,11 @@ function convertNumber(number) { function getPlayerStr(playerid) { const photo = getPhoto(playerid); if (photo.general === "anjiang" && (photo.deputyGeneral === "anjiang" || !photo.deputyGeneral)) { - return luatr("seat#" + photo.seatNumber); + let ret = luatr("seat#" + photo.seatNumber); + if (playerid == Self.id) { + ret = ret + luatr("playerstr_self") + } + return luatr(ret); } let ret = photo.general; @@ -23,6 +27,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 b8b6210e19d08ded71c9ae036af8d5f34e60a5bd..52f60f967bcb2a785ae29d87cd0e436d61a52426 100644 --- a/lua/client/client.lua +++ b/lua/client/client.lua @@ -178,6 +178,9 @@ local function parseMsg(msg, nocolor, visible_data) if p.general == "anjiang" and (p.deputyGeneral == "anjiang" or not p.deputyGeneral) then local ret = Fk:translate("seat#" .. p.seat) + if pid == Self.id then + ret = ret .. Fk:translate("playerstr_self") + end return string.format(str, color, ret) end @@ -192,6 +195,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 bb8d2fd5dcd931cda0073d01a3f048647b3d958a..519062e6f58f8af0667842a75c043ebf63a0c9d7 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 f81f098710b58da77e8b70c9f9f32953aeb38e56..9c3a73ba5a6d070746df522425ea3544f5475ce5 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 b205b32fcc21dd99f6227f8d6f2c4cf152d0319d..95eed7bd73530d1b14e8063d28721c387bd90fd1 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"] = "投降",