meson: add 'nls' option. Closes T6398
This commit is contained in:
parent
2b79f06e8d
commit
6513de27bb
26
meson.build
26
meson.build
|
@ -59,26 +59,9 @@ terminology_dependencies = []
|
||||||
edje_cc_path = ''
|
edje_cc_path = ''
|
||||||
edj_targets = []
|
edj_targets = []
|
||||||
edj_files = []
|
edj_files = []
|
||||||
use_translations = false
|
|
||||||
intl_lib = cc.find_library('intl', required: false)
|
if get_option('nls') == true
|
||||||
if intl_lib.found()
|
subdir('po')
|
||||||
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
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
foreach efl_dep: efl_deps
|
foreach efl_dep: efl_deps
|
||||||
|
@ -137,9 +120,6 @@ configure_file(input: join_paths('pkgbuild', 'PKGBUILD.in'),
|
||||||
config_dir = include_directories('.')
|
config_dir = include_directories('.')
|
||||||
subdir('data')
|
subdir('data')
|
||||||
subdir('man')
|
subdir('man')
|
||||||
if use_translations
|
|
||||||
subdir('po')
|
|
||||||
endif
|
|
||||||
subdir('src/bin')
|
subdir('src/bin')
|
||||||
|
|
||||||
meson.add_install_script('meson_install_themes.sh', edj_files)
|
meson.add_install_script('meson_install_themes.sh', edj_files)
|
||||||
|
|
|
@ -4,4 +4,8 @@ option('edje-cc',
|
||||||
option('fuzzing',
|
option('fuzzing',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
value: false,
|
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')
|
if get_option('nls')
|
||||||
i18n.gettext('terminology',
|
i18n = import('i18n')
|
||||||
languages: [
|
i18n.gettext('terminology',
|
||||||
'ca',
|
languages: [
|
||||||
'de',
|
'ca',
|
||||||
'el',
|
'de',
|
||||||
'eo',
|
'el',
|
||||||
'es',
|
'eo',
|
||||||
'fi',
|
'es',
|
||||||
'fr',
|
'fi',
|
||||||
'hi',
|
'fr',
|
||||||
'it',
|
'hi',
|
||||||
'ko',
|
'it',
|
||||||
'ms',
|
'ko',
|
||||||
'sl',
|
'ms',
|
||||||
'sr',
|
'sl',
|
||||||
'tr',
|
'sr',
|
||||||
'vi'
|
'tr',
|
||||||
],
|
'vi'
|
||||||
args: [
|
],
|
||||||
'--keyword=_',
|
args: [
|
||||||
'--keyword=d_:1',
|
'--keyword=_',
|
||||||
'--keyword=P_:1,2',
|
'--keyword=d_:1',
|
||||||
'--keyword=dP_:1,2',
|
'--keyword=P_:1,2',
|
||||||
'--keyword=N_',
|
'--keyword=dP_:1,2',
|
||||||
'--keyword=NP_:1,2',
|
'--keyword=N_',
|
||||||
'--from-code=UTF-8',
|
'--keyword=NP_:1,2',
|
||||||
'--foreign-user'
|
'--from-code=UTF-8',
|
||||||
])
|
'--foreign-user'
|
||||||
|
])
|
||||||
|
config_data.set('HAVE_GETTEXT', '1')
|
||||||
|
config_data.set('ENABLE_NLS', '1')
|
||||||
|
endif
|
||||||
|
|
Loading…
Reference in New Issue