From 4fe93f9ae5369aedc24f96ef709b9ba17300d77a Mon Sep 17 00:00:00 2001 From: Vlad Date: Sat, 24 Dec 2022 00:40:23 +0300 Subject: [PATCH] Localization: additions for 'Server list' (#426) --- .../fra_h1_mod_common_mp/localizedstrings/french.json | 7 +++---- data/zonetool/h1_mod_common/localizedstrings/english.json | 5 ++++- data/zonetool/localizedstrings/german.json | 4 ++++ data/zonetool/localizedstrings/italian.json | 4 ++++ data/zonetool/localizedstrings/japanese_partial.json | 4 ++++ data/zonetool/localizedstrings/korean.json | 4 ++++ data/zonetool/localizedstrings/polish.json | 4 ++++ data/zonetool/localizedstrings/portuguese.json | 4 ++++ data/zonetool/localizedstrings/simplified_chinese.json | 4 ++++ data/zonetool/localizedstrings/spanish.json | 4 ++++ data/zonetool/localizedstrings/traditional_chinese.json | 5 +++++ .../rus_h1_mod_common_mp/localizedstrings/russian.json | 8 +++----- src/client/component/chat.cpp | 3 --- src/client/component/server_list.cpp | 6 ++---- 14 files changed, 49 insertions(+), 17 deletions(-) diff --git a/data/zonetool/fra_h1_mod_common_mp/localizedstrings/french.json b/data/zonetool/fra_h1_mod_common_mp/localizedstrings/french.json index e1886c63..1b006bfd 100644 --- a/data/zonetool/fra_h1_mod_common_mp/localizedstrings/french.json +++ b/data/zonetool/fra_h1_mod_common_mp/localizedstrings/french.json @@ -1,5 +1,6 @@ { - "LUA_MENU_SERVERLIST": "LISTE DES SERVEURS", + "LUA_MENU_SERVERLIST": "Liste des serveurs", + "PLATFORM_SYSTEM_LINK_TITLE": "LISTE DES SERVEURS", "MENU_NUMPLAYERS": "Joueurs", "MENU_PING": "Latence", "SERVERLIST_PLAYER_COUNT": "&&1 Joueurs", @@ -27,7 +28,5 @@ "UPDATER_POPUP_AVAILABLE_UPDATE_TEXT": "Une mise à jour est disponible,\npoursuivre l'installation ?", "UPDATER_POPUP_SUCCESSFUL": "Mise à jour réussie", "UPDATER_POPUP_RESTART_POPUP_TEXT": "La mise à jour nécessite un redémarrage", - "UPDATER_POPUP_CHECKING_FOR_UPDATES": "Vérification des mises à jour...", - - "PLATFORM_SYSTEM_LINK_TITLE": "LISTE DES SERVEURS" + "UPDATER_POPUP_CHECKING_FOR_UPDATES": "Vérification des mises à jour..." } \ No newline at end of file diff --git a/data/zonetool/h1_mod_common/localizedstrings/english.json b/data/zonetool/h1_mod_common/localizedstrings/english.json index caebe8bb..6ee0187a 100644 --- a/data/zonetool/h1_mod_common/localizedstrings/english.json +++ b/data/zonetool/h1_mod_common/localizedstrings/english.json @@ -27,11 +27,14 @@ "PLATFORM_SHADER_PRECACHE_ASK": "Would you like to populate the shader cache? It may cause crashes with certain GPUs (e.g. RTX cards) but will improve performance if successful.", "MENU_NO_DONT_ASK": "No, don't ask me again", - "LUA_MENU_SERVERLIST": "SERVER LIST", + "LUA_MENU_SERVERLIST": "Server list", + "PLATFORM_SYSTEM_LINK_TITLE": "SERVER LIST", "MENU_NUMPLAYERS": "Players", "MENU_PING": "Ping", "SERVERLIST_PLAYER_COUNT": "&&1 Players", "SERVERLIST_SERVER_COUNT": "&&1 Servers", + "EXE_SAY": "^3Match^7", + "EXE_SAYTEAM": "^5Team^7", "LUA_MENU_STATS": "Stats", "LUA_MENU_STATS_DESC": "Edit player stats settings.", diff --git a/data/zonetool/localizedstrings/german.json b/data/zonetool/localizedstrings/german.json index d73eb817..ab9a9770 100644 --- a/data/zonetool/localizedstrings/german.json +++ b/data/zonetool/localizedstrings/german.json @@ -1,4 +1,8 @@ { + "LUA_MENU_SERVERLIST": "Serverliste", + "PLATFORM_SYSTEM_LINK_TITLE": "SERVERLISTE", + "MENU_NUMPLAYERS": "Spieler", + "MENU_PING": "Ping", "LOCALE_ENGLISH": "Englisch", "LOCALE_ENGLISH_SAFE": "Englisch (Sicher)", "LOCALE_FRENCH": "Französisch", diff --git a/data/zonetool/localizedstrings/italian.json b/data/zonetool/localizedstrings/italian.json index 40344f39..af0a304d 100644 --- a/data/zonetool/localizedstrings/italian.json +++ b/data/zonetool/localizedstrings/italian.json @@ -1,4 +1,8 @@ { + "LUA_MENU_SERVERLIST": "Elenco dei server", + "PLATFORM_SYSTEM_LINK_TITLE": "ELENCO DEI SERVER", + "MENU_NUMPLAYERS": "Giocatori", + "MENU_PING": "Ping", "LUA_MENU_CAMPAIGN_UNLOCKED_ALL_TITLE": "Sblocca tutte le missioni", "LUA_MENU_CANCEL_UNLOCK_CAPS": "Annulla sblocco", diff --git a/data/zonetool/localizedstrings/japanese_partial.json b/data/zonetool/localizedstrings/japanese_partial.json index a767592f..e9066310 100644 --- a/data/zonetool/localizedstrings/japanese_partial.json +++ b/data/zonetool/localizedstrings/japanese_partial.json @@ -1,4 +1,8 @@ { + "LUA_MENU_SERVERLIST": "サーバーリスト", + "PLATFORM_SYSTEM_LINK_TITLE": "サーバーリスト", + "MENU_NUMPLAYERS": "プレイヤー", + "MENU_PING": "Ping", "LOCALE_ENGLISH": "英語", "LOCALE_ENGLISH_SAFE": "英語(検閲)", "LOCALE_FRENCH": "フランス語", diff --git a/data/zonetool/localizedstrings/korean.json b/data/zonetool/localizedstrings/korean.json index 0940d164..96972e89 100644 --- a/data/zonetool/localizedstrings/korean.json +++ b/data/zonetool/localizedstrings/korean.json @@ -1,4 +1,8 @@ { + "LUA_MENU_SERVERLIST": "서버 목록", + "PLATFORM_SYSTEM_LINK_TITLE": "서버 목록", + "MENU_NUMPLAYERS": "플레이어", + "MENU_PING": "핑", "LOCALE_ENGLISH": "영어", "LOCALE_ENGLISH_SAFE": "영어(검열)", "LOCALE_FRENCH": "프랑스어", diff --git a/data/zonetool/localizedstrings/polish.json b/data/zonetool/localizedstrings/polish.json index 125b44e6..e8323a37 100644 --- a/data/zonetool/localizedstrings/polish.json +++ b/data/zonetool/localizedstrings/polish.json @@ -1,4 +1,8 @@ { + "LUA_MENU_SERVERLIST": "Lista serwerów", + "PLATFORM_SYSTEM_LINK_TITLE": "LISTA SERWERÓW", + "MENU_NUMPLAYERS": "Gracze", + "MENU_PING": "Ping", "LOCALE_ENGLISH": "Angielski", "LOCALE_ENGLISH_SAFE": "Angielski (cenzuralny)", "LOCALE_FRENCH": "Francuski", diff --git a/data/zonetool/localizedstrings/portuguese.json b/data/zonetool/localizedstrings/portuguese.json index 388e5837..cfcbf86d 100644 --- a/data/zonetool/localizedstrings/portuguese.json +++ b/data/zonetool/localizedstrings/portuguese.json @@ -1,4 +1,8 @@ { + "LUA_MENU_SERVERLIST": "Lista de servidores", + "PLATFORM_SYSTEM_LINK_TITLE": "LISTA DE SERVIDORES", + "MENU_NUMPLAYERS": "Jogadores", + "MENU_PING": "Ping", "LOCALE_ENGLISH": "Inglês", "LOCALE_ENGLISH_SAFE": "Inglês (Censurado)", "LOCALE_FRENCH": "Français", diff --git a/data/zonetool/localizedstrings/simplified_chinese.json b/data/zonetool/localizedstrings/simplified_chinese.json index 07264d09..5560337e 100644 --- a/data/zonetool/localizedstrings/simplified_chinese.json +++ b/data/zonetool/localizedstrings/simplified_chinese.json @@ -1,4 +1,8 @@ { + "LUA_MENU_SERVERLIST": "服务器列表", + "PLATFORM_SYSTEM_LINK_TITLE": "服务器列表", + "MENU_NUMPLAYERS": "玩家", + "MENU_PING": "Ping", "LOCALE_ENGLISH": "英语", "LOCALE_ENGLISH_SAFE": "英语 (审查制度)", "LOCALE_FRENCH": "法语", diff --git a/data/zonetool/localizedstrings/spanish.json b/data/zonetool/localizedstrings/spanish.json index 4fcdf805..bdebeb16 100644 --- a/data/zonetool/localizedstrings/spanish.json +++ b/data/zonetool/localizedstrings/spanish.json @@ -1,4 +1,8 @@ { + "LUA_MENU_SERVERLIST": "Lista de servidores", + "PLATFORM_SYSTEM_LINK_TITLE": "LISTA DE SERVIDORES", + "MENU_NUMPLAYERS": "Jugadores", + "MENU_PING": "Ping", "LOCALE_ENGLISH": "Inglés", "LOCALE_ENGLISH_SAFE": "Inglés (censura)", "LOCALE_FRENCH": "Français", diff --git a/data/zonetool/localizedstrings/traditional_chinese.json b/data/zonetool/localizedstrings/traditional_chinese.json index 526ed6da..16f3ca3d 100644 --- a/data/zonetool/localizedstrings/traditional_chinese.json +++ b/data/zonetool/localizedstrings/traditional_chinese.json @@ -1,4 +1,9 @@ { + "LUA_MENU_SERVERLIST": "伺服器列表", + "PLATFORM_SYSTEM_LINK_TITLE": "伺服器列表", + "MENU_NUMPLAYERS": "玩家", + "MENU_PING": "網路延遲", + "MENU_TYPE1": "類型", "LOCALE_ENGLISH": "英文", "LOCALE_ENGLISH_SAFE": "英文 (審查制度)", "LOCALE_FRENCH": "法文", diff --git a/data/zonetool/rus_h1_mod_common_mp/localizedstrings/russian.json b/data/zonetool/rus_h1_mod_common_mp/localizedstrings/russian.json index e0e43212..b568d035 100644 --- a/data/zonetool/rus_h1_mod_common_mp/localizedstrings/russian.json +++ b/data/zonetool/rus_h1_mod_common_mp/localizedstrings/russian.json @@ -7,10 +7,13 @@ "CUSTOM_DEPOT_EULA_6": "Команда H1-mod.", "LUA_MENU_SERVERLIST": "Список серверов", + "PLATFORM_SYSTEM_LINK_TITLE": "СПИСОК СЕРВЕРОВ", "MENU_NUMPLAYERS": "Игроки [+боты]", "MENU_PING": "Пинг", "SERVERLIST_PLAYER_COUNT": "Игроков: &&1", "SERVERLIST_SERVER_COUNT": "Серверов: &&1", + "EXE_SAY": "^3Всем^7", + "EXE_SAYTEAM": "^5Команде^7", "LUA_MENU_STATS": "Статистика", "LUA_MENU_STATS_DESC": "Изменение статистических показателей игрока.", @@ -32,11 +35,6 @@ "LUA_MENU_3RD_PARTY_CONTENT_DESC": "Согласны загрузить сторонний контент, необходимый для игры на этом сервере? (&&1)", - "PLATFORM_SYSTEM_LINK_TITLE": "СПИСОК СЕРВЕРОВ", - - "EXE_SAY": "^3Всем^7", - "EXE_SAYTEAM": "^5Команде^7", - "MENU_SB_TOOLTIP_BTN_REFRESH": "Обновить список", "MENU_TYPE1": "Режим", "SERVERLIST_ADD_TO_BLACKLIST": "Добавить в ЧС", diff --git a/src/client/component/chat.cpp b/src/client/component/chat.cpp index c798b455..cf937626 100644 --- a/src/client/component/chat.cpp +++ b/src/client/component/chat.cpp @@ -34,9 +34,6 @@ namespace chat utils::hook::inject(0x18A980_b, reinterpret_cast(0x2E6F588_b)); utils::hook::call(0x33EDEC_b, ui_get_font_handle_stub); - localized_strings::override("EXE_SAY", "^3Match^7"); - localized_strings::override("EXE_SAYTEAM", "^5Team^7"); - // move chat position on the screen above menu splashes dvars::override::register_vec2("cg_hudChatPosition", 5, 200, 0, 640, game::DVAR_FLAG_SAVED); dvars::override::register_int("cg_chatHeight", 5, 0, 8, game::DVAR_FLAG_SAVED); diff --git a/src/client/component/server_list.cpp b/src/client/component/server_list.cpp index d9b2d668..355dd65d 100644 --- a/src/client/component/server_list.cpp +++ b/src/client/component/server_list.cpp @@ -319,7 +319,7 @@ namespace server_list bool get_master_server(game::netadr_s& address) { - return game::NET_StringToAdr(utils::string::va("%s:%s", + return game::NET_StringToAdr(utils::string::va("%s:%s", master_server_ip->current.string, master_server_port->current.string), &address); } @@ -423,8 +423,6 @@ namespace server_list return; } - localized_strings::override("PLATFORM_SYSTEM_LINK_TITLE", "SERVER LIST"); - // hook LUI_OpenMenu to refresh server list for system link menu lui_open_menu_hook.create(game::LUI_OpenMenu, lui_open_menu_stub); @@ -441,7 +439,7 @@ namespace server_list a.pop(rdi); a.ret(); }), true); - + utils::hook::jump(0x28E557_b, utils::hook::assemble([](utils::hook::assembler& a) { a.mov(r8d, edi);