diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2024-07-12 14:29:38 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2024-07-12 14:29:38 +0200 |
| commit | 88d45641e8c06936635034cd83c8c7df1bd59439 (patch) | |
| tree | 04bb5c3f83f68edb021b09876242c6493683ebb2 /test_support | |
| parent | 0e2b0878e4c344d1fdbadfb37350bded783789f3 (diff) | |
| download | turns-88d45641e8c06936635034cd83c8c7df1bd59439.tar.xz turns-88d45641e8c06936635034cd83c8c7df1bd59439.zip | |
turns: add basic i18n
Diffstat (limited to 'test_support')
| -rw-r--r-- | test_support/CMakeLists.txt | 10 | ||||
| -rw-r--r-- | test_support/src/gtk_main.cpp | 5 |
2 files changed, 14 insertions, 1 deletions
diff --git a/test_support/CMakeLists.txt b/test_support/CMakeLists.txt index 04bb256..fe30782 100644 --- a/test_support/CMakeLists.txt +++ b/test_support/CMakeLists.txt @@ -1,3 +1,5 @@ +get_target_property(TRANSLATIONS_BINARY_DIR "lang" BINARY_DIR) + add_library("test_support-gtk" OBJECT "src/gtk_main.cpp" ) @@ -8,7 +10,13 @@ target_compile_features("test_support-gtk" PRIVATE "cxx_std_23" ) +target_compile_definitions("test_support-gtk" PUBLIC + "TESTLOCALEDIR=\"${TRANSLATIONS_BINARY_DIR}\"" +) + target_link_libraries("test_support-gtk" PUBLIC + "turns::lang" + "PkgConfig::adwaita" "PkgConfig::gtkmm" -)
\ No newline at end of file +) diff --git a/test_support/src/gtk_main.cpp b/test_support/src/gtk_main.cpp index 02173f9..cb2ae5c 100644 --- a/test_support/src/gtk_main.cpp +++ b/test_support/src/gtk_main.cpp @@ -5,6 +5,11 @@ auto main(int argc, char * argv[]) -> int { + setlocale(LC_ALL, ""); + bindtextdomain("turns", TESTLOCALEDIR); + bind_textdomain_codeset("turns", "UTF-8"); + textdomain("turns"); + Gtk::init_gtkmm_internals(); adw_init(); |
