Skip to content

Commit

Permalink
Use the correct textdomain for the random faction mirror options
Browse files Browse the repository at this point in the history
Fixes up commit 2e50233.

See issue #2709.
  • Loading branch information
irydacea committed Mar 24, 2018
1 parent 9852064 commit 5c59fad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gui/dialogs/multiplayer/mp_create_game.cpp
Expand Up @@ -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())
);
};

Expand Down
4 changes: 4 additions & 0 deletions src/mp_game_settings.hpp
Expand Up @@ -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"))
Expand Down

0 comments on commit 5c59fad

Please sign in to comment.