Merge pull request #18186 from DaanDeMeyer/translations-option

meson: Add option to disable translations
This commit is contained in:
Luca Boccassi 2021-01-10 14:37:56 +00:00 committed by GitHub
commit 91737e1453
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 4 deletions

View File

@ -161,6 +161,8 @@ option('man', type : 'combo', choices : ['auto', 'true', 'false'],
option('html', type : 'combo', choices : ['auto', 'true', 'false'],
value : 'false',
description : 'build and install html pages')
option('translations', type : 'boolean', value : true,
description : 'build and install translations')
option('certificate-root', type : 'string', value : '/etc/ssl',
description : 'the prefix for TLS certificates')

View File

@ -84,7 +84,13 @@ if [ ! -f "$BUILDDIR"/build.ninja ] ; then
fi
fi
meson "$BUILDDIR" -D "sysvinit-path=$sysvinit_path" -D "rootprefix=$rootprefix" -D man=false -D "nobody-user=$nobody_user" -D "nobody-group=$nobody_group"
meson "$BUILDDIR" \
-D "sysvinit-path=$sysvinit_path" \
-D "rootprefix=$rootprefix" \
-D man=false \
-D "nobody-user=$nobody_user" \
-D "nobody-group=$nobody_group" \
-D translations=false
fi
cd "$BUILDDIR"

View File

@ -1,6 +1,10 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
i18n = import('i18n')
i18n.gettext(meson.project_name(),
want_translations = get_option('translations')
if want_translations
i18n.gettext(meson.project_name(),
preset : 'glib',
data_dirs : '.')
endif