diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2024-07-12 17:05:27 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2024-07-12 17:05:27 +0200 |
| commit | 08bbb9cb615f0ecd0d041baacd7a024c1e30db5c (patch) | |
| tree | b85c4c8517829bd9900d33a4013a663315bb56a1 /lang | |
| parent | 8714470ebb41abec07e178abf4d4739dcd6087fb (diff) | |
| download | turns-08bbb9cb615f0ecd0d041baacd7a024c1e30db5c.tar.xz turns-08bbb9cb615f0ecd0d041baacd7a024c1e30db5c.zip | |
app: add main menu button tooltip
Diffstat (limited to 'lang')
| -rw-r--r-- | lang/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | lang/include/turns/lang/messages.hpp | 1 | ||||
| -rw-r--r-- | lang/po/tooltips/de.po | 3 | ||||
| -rw-r--r-- | lang/po/tooltips/en_US.po | 3 | ||||
| -rw-r--r-- | lang/tests/tooltips.cpp | 41 |
5 files changed, 34 insertions, 20 deletions
diff --git a/lang/CMakeLists.txt b/lang/CMakeLists.txt index 61e0488..dfea7fd 100644 --- a/lang/CMakeLists.txt +++ b/lang/CMakeLists.txt @@ -22,7 +22,11 @@ foreach(LANG IN LISTS TRANSLATIONS) "${MENU_ITEMS_SOURCE_FILE}" "${TOOLTIPS_SOURCE_FILE}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - DEPENDS "${SOURCE_FILE}" + DEPENDS + "${BASE_SOURCE_FILE}" + "${LABELS_SOURCE_FILE}" + "${MENU_ITEMS_SOURCE_FILE}" + "${TOOLTIPS_SOURCE_FILE}" COMMENT "Processing translation ${LANG}" ) diff --git a/lang/include/turns/lang/messages.hpp b/lang/include/turns/lang/messages.hpp index a6ff5ee..7973f15 100644 --- a/lang/include/turns/lang/messages.hpp +++ b/lang/include/turns/lang/messages.hpp @@ -17,6 +17,7 @@ namespace turns::lang namespace tooltips { auto constexpr static add_a_participant = "Add a participant"; + auto constexpr static main_menu = "Main Menu"; } // namespace tooltips } // namespace turns::lang diff --git a/lang/po/tooltips/de.po b/lang/po/tooltips/de.po index da788ae..4a93bee 100644 --- a/lang/po/tooltips/de.po +++ b/lang/po/tooltips/de.po @@ -1,2 +1,5 @@ msgid "Add a participant" msgstr "Teilnehmer hinzufügen" + +msgid "Main Menu" +msgstr "Hauptmenü"
\ No newline at end of file diff --git a/lang/po/tooltips/en_US.po b/lang/po/tooltips/en_US.po index cd80911..3b83fa3 100644 --- a/lang/po/tooltips/en_US.po +++ b/lang/po/tooltips/en_US.po @@ -1,2 +1,5 @@ msgid "Add a participant" msgstr "Add a participant" + +msgid "Main Menu" +msgstr "Main Menu"
\ No newline at end of file diff --git a/lang/tests/tooltips.cpp b/lang/tests/tooltips.cpp index 66b6d72..63831c5 100644 --- a/lang/tests/tooltips.cpp +++ b/lang/tests/tooltips.cpp @@ -3,31 +3,34 @@ #include <catch2/catch_test_macros.hpp> #include <catch2/generators/catch_generators.hpp> -#include <libintl.h> - #include <format> #include <string> -namespace turns::lang::tests -{ +#include <libintl.h> -TEST_CASE("Tooltip translations") +namespace turns::lang::tests { - auto message = GENERATE( - tooltips::add_a_participant - ); - - auto locale = GENERATE( - "de_CH.UTF-8", - "de_DE.UTF-8", - "de_AT.UTF-8" - ); - SECTION(std::format("'{}' has a translation in '{}'", message, locale)) + TEST_CASE("Tooltip translations") { - setlocale(LC_ALL, locale); - REQUIRE(std::string{gettext(message)} != message); + // clang-format off + auto message = GENERATE( + tooltips::add_a_participant, + tooltips::main_menu + ); + + auto locale = GENERATE( + "de_CH.UTF-8", + "de_DE.UTF-8", + "de_AT.UTF-8" + ); + // clang-format on + + SECTION(std::format("'{}' has a translation in '{}'", message, locale)) + { + setlocale(LC_ALL, locale); + REQUIRE(std::string{gettext(message)} != message); + } } -} -}
\ No newline at end of file +} // namespace turns::lang::tests
\ No newline at end of file |
