blob: 6bdf8cc237cbecb86f7a4f4927fd85ef4ac02e20 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#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("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
);
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
|