meson: add 'nls' option. Closes T6398

terminology-1.2
Boris Faure 5 years ago
parent 2b79f06e8d
commit 6513de27bb
  1. 26
      meson.build
  2. 6
      meson_options.txt
  3. 62
      po/meson.build

@ -59,26 +59,9 @@ terminology_dependencies = []
edje_cc_path = ''
edj_targets = []
edj_files = []
use_translations = false
intl_lib = cc.find_library('intl', required: false)
if intl_lib.found()
config_data.set('HAVE_GETTEXT', 1)
config_data.set('ENABLE_NLS', 1)
terminology_dependencies += [intl_lib]
use_translations = true
else
gettext_code = '''
#include <libintl.h>
int main(int argc, char *argv[]) {
(void)ngettext("", "", 0);
return 0;
}
'''
if cc.links(gettext_code)
config_data.set('HAVE_GETTEXT', 1)
config_data.set('ENABLE_NLS', 1)
use_translations = true
endif
if get_option('nls') == true
subdir('po')
endif
foreach efl_dep: efl_deps
@ -137,9 +120,6 @@ configure_file(input: join_paths('pkgbuild', 'PKGBUILD.in'),
config_dir = include_directories('.')
subdir('data')
subdir('man')
if use_translations
subdir('po')
endif
subdir('src/bin')
meson.add_install_script('meson_install_themes.sh', edj_files)

@ -4,4 +4,8 @@ option('edje-cc',
option('fuzzing',
type: 'boolean',
value: false,
description: 'Enable fuzzing on terminology. Binaries are not suited for production.')
description: 'Enable fuzzing on terminology. Binaries are not suited for production. (default=false)')
option('nls',
type: 'boolean',
value: true,
description: 'enable localization: (default=true)')

@ -1,29 +1,33 @@
i18n = import('i18n')
i18n.gettext('terminology',
languages: [
'ca',
'de',
'el',
'eo',
'es',
'fi',
'fr',
'hi',
'it',
'ko',
'ms',
'sl',
'sr',
'tr',
'vi'
],
args: [
'--keyword=_',
'--keyword=d_:1',
'--keyword=P_:1,2',
'--keyword=dP_:1,2',
'--keyword=N_',
'--keyword=NP_:1,2',
'--from-code=UTF-8',
'--foreign-user'
])
if get_option('nls')
i18n = import('i18n')
i18n.gettext('terminology',
languages: [
'ca',
'de',
'el',
'eo',
'es',
'fi',
'fr',
'hi',
'it',
'ko',
'ms',
'sl',
'sr',
'tr',
'vi'
],
args: [
'--keyword=_',
'--keyword=d_:1',
'--keyword=P_:1,2',
'--keyword=dP_:1,2',
'--keyword=N_',
'--keyword=NP_:1,2',
'--from-code=UTF-8',
'--foreign-user'
])
config_data.set('HAVE_GETTEXT', '1')
config_data.set('ENABLE_NLS', '1')
endif

Loading…
Cancel
Save