diff --git a/app/main.c b/app/main.c index a2da39737a..0edc851b8d 100644 --- a/app/main.c +++ b/app/main.c @@ -1197,5 +1197,20 @@ gimp_init_i18n (void) bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif +#ifdef HAVE_ISO_CODES + /* This iso-codes domain is the only external text domain our core + * code is using. Let's make usre it's properly initialized. + */ +#ifdef ENABLE_RELOCATABLE_RESOURCES + gimp_bind_text_domain ("iso_639_3", gimp_locale_directory ()); +#else + gimp_bind_text_domain ("iso_639_3", ISOCODES_LOCALEDIR); +#endif + +#ifdef HAVE_BIND_TEXTDOMAIN_CODESET + bind_textdomain_codeset ("iso_639_3", "UTF-8"); +#endif +#endif + textdomain (GETTEXT_PACKAGE); } diff --git a/meson.build b/meson.build index c49e2bd253..f3860b698b 100644 --- a/meson.build +++ b/meson.build @@ -1184,6 +1184,7 @@ if isocodes.found() isocodes_prefix = isocodes.get_variable(pkgconfig: 'prefix') isocodes_location = isocodes_prefix / 'share' / 'xml' / 'iso-codes' isocodes_localedir= isocodes_prefix / 'share' / 'locale' + conf.set_quoted('ISOCODES_LOCALEDIR', isocodes_localedir) endif conf.set('HAVE_ISO_CODES', isocodes.found()) diff --git a/tools/meson.build b/tools/meson.build index e7b32cd6b0..6a39f71c8f 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -39,7 +39,6 @@ if isocodes.found() dependencies: [ native_gio ], c_args: [ '-DSRCDIR="@0@"'.format(meson.project_source_root()), - '-DISOCODES_LOCALEDIR="@0@"'.format(isocodes_localedir), ], native: true, install: false)