Use the correct textdomain for the random faction mirror options

Fixes up commit 2e502334f2.

See issue #2709.
This commit is contained in:
Iris Morelle 2018-03-24 00:24:55 -03:00
parent 9852064ba9
commit 5c59fade0f
2 changed files with 7 additions and 1 deletions

View file

@ -269,8 +269,10 @@ void mp_create_game::pre_show(window& win)
//
std::vector<config> rfm_options;
for(const auto& type : rfm_types_) {
// HACK: The labels are defined for the wesnoth textdomain in a header,
// see mp_game_settings::RANDOM_FACTION_MODE in src/mp_game_settings.hpp
rfm_options.emplace_back("label",
translation::sgettext(mp_game_settings::RANDOM_FACTION_MODE::enum_to_string(type).c_str())
translation::dsgettext("wesnoth", mp_game_settings::RANDOM_FACTION_MODE::enum_to_string(type).c_str())
);
};

View file

@ -62,6 +62,10 @@ struct mp_game_settings
bool saved_game;
// HACK: The Create Game dialog has special knowledge of these strings
// and the fact that they're placed in the default (wesnoth)
// textdomain by xgettext due to the absence of a GETTEXT_DOMAIN
// declaration in this file. See gui2::dialogs::mp_create_game::pre_show().
MAKE_ENUM(RANDOM_FACTION_MODE,
(DEFAULT, N_("Independent"))
(NO_MIRROR, N_("No Mirror"))