Merge pull request #18186 from DaanDeMeyer/translations-option
meson: Add option to disable translations
This commit is contained in:
commit
91737e1453
|
@ -161,6 +161,8 @@ option('man', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||||
option('html', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('html', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||||
value : 'false',
|
value : 'false',
|
||||||
description : 'build and install html pages')
|
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',
|
option('certificate-root', type : 'string', value : '/etc/ssl',
|
||||||
description : 'the prefix for TLS certificates')
|
description : 'the prefix for TLS certificates')
|
||||||
|
|
|
@ -84,7 +84,13 @@ if [ ! -f "$BUILDDIR"/build.ninja ] ; then
|
||||||
fi
|
fi
|
||||||
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
|
fi
|
||||||
|
|
||||||
cd "$BUILDDIR"
|
cd "$BUILDDIR"
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
|
||||||
i18n = import('i18n')
|
i18n = import('i18n')
|
||||||
i18n.gettext(meson.project_name(),
|
want_translations = get_option('translations')
|
||||||
preset : 'glib',
|
|
||||||
data_dirs : '.')
|
if want_translations
|
||||||
|
i18n.gettext(meson.project_name(),
|
||||||
|
preset : 'glib',
|
||||||
|
data_dirs : '.')
|
||||||
|
endif
|
||||||
|
|
Loading…
Reference in a new issue