meson: Ensure clapper uses local translations within the devenv

This patch modifies the initialization routines of clapper to check for
    CLAPPER_GTK_OVERRIDE_LOCALEDIR and
    CLAPPER_APP_OVERRIDE_LOCALEDIR
and uses that instead of the LOCALEDIR specified in the config.h.

It also fixes the bug where libclapper-gtk loads the translations for
the clapper application and the clapper application loads the
translations for the libclapper-gtk. (It took me shockingly long to
figure out why the translations weren't working 🙃)

Co-authored-by: Rafał Dzięgiel <rafostar.github@gmail.com>
Signed-off-by: Florian "sp1rit"​ <sp1rit@disroot.org>
This commit is contained in:
Florian "sp1rit"​
2024-04-09 18:00:47 +02:00
parent 5e7305516e
commit 3841a906fd
7 changed files with 19 additions and 4 deletions

View File

@@ -19,6 +19,8 @@ clapper_version_suffix = '-' + version_array[0] + '.0'
clapper_api_name = meson.project_name() + clapper_version_suffix
devenv = environment()
gnome = import('gnome')
pkgconfig = import('pkgconfig')
i18n = import('i18n')
@@ -124,6 +126,8 @@ endif
subdir('src')
subdir('doc')
meson.add_devenv(devenv)
summary({
'prefix': prefix,
'bindir': bindir,