diff options
Diffstat (limited to 'lang/tests/buttons.cpp')
| -rw-r--r-- | lang/tests/buttons.cpp | 29 |
1 files changed, 29 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 |
