tools: bind the "iso_639_3" gettext domain to iso-codes location…

… found at build-time.

It was working on a machine with default paths and system-installed
packages (e.g. a typical Linux distributions) but needs to be manually
set up e.g. on Windows.
This commit is contained in:
Jehan 2024-08-15 13:22:48 +02:00
parent 364f541336
commit aba7316e34
3 changed files with 4 additions and 2 deletions

View file

@ -1053,8 +1053,8 @@ endif
isocodes = dependency('iso-codes', required: false) isocodes = dependency('iso-codes', required: false)
if isocodes.found() if isocodes.found()
isocodes_prefix = isocodes.get_variable(pkgconfig: 'prefix') isocodes_prefix = isocodes.get_variable(pkgconfig: 'prefix')
isocodes_location = isocodes_prefix / get_option('datadir') / 'xml' / 'iso-codes' isocodes_location = isocodes_prefix / 'share' / 'xml' / 'iso-codes'
isocodes_localedir= isocodes_prefix / get_option('datadir') / 'locale' isocodes_localedir= isocodes_prefix / 'share' / 'locale'
endif endif
conf.set('HAVE_ISO_CODES', isocodes.found()) conf.set('HAVE_ISO_CODES', isocodes.found())

View file

@ -287,6 +287,7 @@ gimp_language_store_parser_init (GError **error)
/* Generate the localized language names. */ /* Generate the localized language names. */
g_hash_table_iter_init (&lang_iter, l10n_lang_list); g_hash_table_iter_init (&lang_iter, l10n_lang_list);
gimp_bind_text_domain ("iso_639_3", ISOCODES_LOCALEDIR);
while (g_hash_table_iter_next (&lang_iter, &key, NULL)) while (g_hash_table_iter_next (&lang_iter, &key, NULL))
{ {
gchar *code = (gchar*) key; gchar *code = (gchar*) key;

View file

@ -38,6 +38,7 @@ gen_languages = executable('gen-languages',
link_with: [ libgimpbase ], link_with: [ libgimpbase ],
c_args: [ c_args: [
'-DSRCDIR="@0@"'.format(meson.project_source_root()), '-DSRCDIR="@0@"'.format(meson.project_source_root()),
'-DISOCODES_LOCALEDIR="@0@"'.format(isocodes_localedir),
], ],
install: false) install: false)