From 40879a72e313124001c9545060c48897e7440914 Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Wed, 7 Feb 2024 08:03:16 +0300 Subject: kxkb: utilize a translations provseided by xkeyboard-config xkeyboard-config package comes with a message catalogue of its own to translate locale, keyboard model and xkb option names. It would be easier and more robust to utilize it instead of redoing all translation in-house. Signed-off-by: Alexander Golubev (cherry picked from commit 18a8b8d43577941388fa40666641f628860d6f7a) --- ConfigureChecks.cmake | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'ConfigureChecks.cmake') diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 12185432a..b72d866df 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -563,6 +563,20 @@ if( BUILD_KXKB ) message( STATUS "No additional XKb rules directory found" ) endif( ) + if( WITH_XKB_TRANSLATIONS ) + if( NOT XKB_CONFIG_LOCALE_DIR ) + pkg_get_variable( XKB_CONFIG_DATADIR xkeyboard-config datadir ) + if( XKB_CONFIG_DATADIR ) + set( XKB_CONFIG_LOCALE_DIR "${XKB_CONFIG_DATADIR}/locale" CACHE INTERNAL "" ) + message( STATUS "Found xkeybord-config locale dir: ${XKB_CONFIG_LOCALE_DIR}" ) + endif( ) + endif( ) + + if( NOT XKB_CONFIG_LOCALE_DIR ) + tde_message_fatal( "Translations for xkb messages were requested but the xkeyboard-config locale directory could not be determined." ) + endif( ) + endif( ) + endif( ) if( BUILD_KCONTROL OR BUILD_TDM ) -- cgit v1.2.1