summaryrefslogtreecommitdiff
path: root/lang/tests
diff options
context:
space:
mode:
Diffstat (limited to 'lang/tests')
-rw-r--r--lang/tests/messages.cpp46
1 files changed, 26 insertions, 20 deletions
diff --git a/lang/tests/messages.cpp b/lang/tests/messages.cpp
index df991d6..53442b6 100644
--- a/lang/tests/messages.cpp
+++ b/lang/tests/messages.cpp
@@ -13,29 +13,35 @@ namespace turns::lang::tests
TEST_CASE("Translated messages")
{
- auto message = GENERATE(add_participant,
- clear,
- disposition,
- delete_participant,
- edit_participant,
- finish,
- main_menu,
- mark_as_defeated,
- // a better solution is required to test the following entry:
- // name,
- no_active_turn_order,
- priority,
- priority_number,
- quit,
- start_turn_order,
- turns);
-
auto locale = GENERATE("de_CH.UTF-8", "de_DE.UTF-8", "de_AT.UTF-8");
+ setlocale(LC_ALL, locale);
- SECTION(std::format("'{}' has a translation in '{}'", message, locale))
+ SECTION(std::format("Locale '{}'", locale))
{
- setlocale(LC_ALL, locale);
- REQUIRE(std::string{gettext(message)} != message);
+ auto message = GENERATE(add_participant,
+ clear,
+ disposition,
+ delete_participant,
+ edit_participant,
+ end_turn_order,
+ finish,
+ main_menu,
+ mark_as_defeated,
+ // a better solution is required to test the following entry:
+ // name,
+ next_participant,
+ no_active_turn_order,
+ previous_participant,
+ priority,
+ priority_number,
+ quit,
+ start_turn_order,
+ turns);
+
+ SECTION(std::format("has a translation for '{}'", message))
+ {
+ REQUIRE(std::string{gettext(message)} != message);
+ }
}
}