Make chat room names localizable (#2709)
This commit is contained in:
parent
a6bd0c87ac
commit
1eec7ef8d9
5 changed files with 7 additions and 6 deletions
|
@ -788,7 +788,7 @@ void mp_lobby::pre_show(window& window)
|
|||
*filter_text_,
|
||||
std::bind(&mp_lobby::game_filter_keypress_callback, this, _5));
|
||||
|
||||
chatbox_->room_window_open("lobby", true, false);
|
||||
chatbox_->room_window_open(N_("lobby"), true, false);
|
||||
chatbox_->active_window_changed();
|
||||
game_filter_reload();
|
||||
|
||||
|
|
|
@ -243,7 +243,7 @@ void mp_join_game::pre_show(window& window)
|
|||
chat.set_lobby_info(lobby_info_);
|
||||
chat.set_wesnothd_connection(network_connection_);
|
||||
|
||||
chat.room_window_open("this game", true, false); // TODO: better title?
|
||||
chat.room_window_open(N_("this game"), true, false);
|
||||
chat.active_window_changed();
|
||||
chat.load_log(default_chat_log, false);
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ void mp_staging::pre_show(window& window)
|
|||
chat.set_wesnothd_connection(*network_connection_);
|
||||
}
|
||||
|
||||
chat.room_window_open("this game", true, false); // TODO: better title?
|
||||
chat.room_window_open(N_("this game"), true, false);
|
||||
chat.active_window_changed();
|
||||
chat.load_log(default_chat_log, false);
|
||||
|
||||
|
|
|
@ -379,9 +379,9 @@ bool chatbox::room_window_active(const std::string& room)
|
|||
return t.name == room && t.whisper == false;
|
||||
}
|
||||
|
||||
lobby_chat_window* chatbox::room_window_open(const std::string& room, const bool open_new, const bool allow_close)
|
||||
lobby_chat_window* chatbox::room_window_open(const t_string& room, const bool open_new, const bool allow_close)
|
||||
{
|
||||
return find_or_create_window(room, false, open_new, allow_close,
|
||||
return find_or_create_window(room.base_str(), false, open_new, allow_close,
|
||||
VGETTEXT("Room <i>“$name”</i> joined", { { "name", room } }));
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "game_initialization/lobby_data.hpp"
|
||||
#include "game_initialization/lobby_info.hpp"
|
||||
#include "gui/widgets/container_base.hpp"
|
||||
#include "tstring.hpp"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
@ -231,7 +232,7 @@ public:
|
|||
* 'close' button will be disabled.
|
||||
* @return valid ptr if the window was found or added, null otherwise
|
||||
*/
|
||||
lobby_chat_window* room_window_open(const std::string& room,
|
||||
lobby_chat_window* room_window_open(const t_string& room,
|
||||
const bool open_new, const bool allow_close = true);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue