diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2024-07-14 12:31:24 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2024-07-14 12:31:24 +0200 |
| commit | 22affd3c791679f05ccde937a1804ecb3f5bf5e2 (patch) | |
| tree | 1053b86309f5c3f827cdfb5de9988eec28faf3c9 /lang/tests | |
| parent | f5e65adb5c348b5c1f3fe479fc71053183f66674 (diff) | |
| download | turns-22affd3c791679f05ccde937a1804ecb3f5bf5e2.tar.xz turns-22affd3c791679f05ccde937a1804ecb3f5bf5e2.zip | |
app/gui: add translations for create participant dialog
Diffstat (limited to 'lang/tests')
| -rw-r--r-- | lang/tests/buttons.cpp | 29 | ||||
| -rw-r--r-- | lang/tests/labels.cpp | 4 |
2 files changed, 33 insertions, 0 deletions
diff --git a/lang/tests/buttons.cpp b/lang/tests/buttons.cpp new file mode 100644 index 0000000..b016ecf --- /dev/null +++ b/lang/tests/buttons.cpp @@ -0,0 +1,29 @@ +#include "turns/lang/messages.hpp" + +#include <catch2/catch_test_macros.hpp> +#include <catch2/generators/catch_generators.hpp> + +#include <format> +#include <string> + +#include <libintl.h> + +namespace turns::lang::tests +{ + + TEST_CASE("Button translations") + { + auto message = GENERATE( + buttons::finish + ); + + auto locale = GENERATE("de_CH.UTF-8", "de_DE.UTF-8", "de_AT.UTF-8"); + + SECTION(std::format("'{}' has a translation in '{}'", message, locale)) + { + setlocale(LC_ALL, locale); + REQUIRE(std::string{gettext(message)} != message); + } + } + +} // namespace turns::lang::tests
\ No newline at end of file diff --git a/lang/tests/labels.cpp b/lang/tests/labels.cpp index 3ebdf42..6bdf8cc 100644 --- a/lang/tests/labels.cpp +++ b/lang/tests/labels.cpp @@ -14,7 +14,11 @@ namespace turns::lang::tests TEST_CASE("Label translations") { auto message = GENERATE( + labels::add_participant, + labels::disposition, + // labels::name, // a better solution is required to support this one labels::no_active_turn_order, + labels::order, labels::turns ); |
