mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
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:
@@ -29,13 +29,16 @@
|
||||
gint
|
||||
main (gint argc, gchar **argv)
|
||||
{
|
||||
const gchar *clapper_ldir;
|
||||
GApplication *application;
|
||||
gint status;
|
||||
|
||||
g_setenv ("GSK_RENDERER", "gl", FALSE);
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||
if (!(clapper_ldir = g_getenv ("CLAPPER_APP_OVERRIDE_LOCALEDIR")))
|
||||
clapper_ldir = LOCALEDIR;
|
||||
bindtextdomain (GETTEXT_PACKAGE, clapper_ldir);
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
textdomain (GETTEXT_PACKAGE);
|
||||
|
||||
|
Reference in New Issue
Block a user