Browse Source

Merge pull request #18186 from DaanDeMeyer/translations-option

meson: Add option to disable translations
master
Luca Boccassi 1 year ago committed by GitHub
parent
commit
91737e1453
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      meson_options.txt
  2. 8
      mkosi.build
  3. 10
      po/meson.build

2
meson_options.txt

@ -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')

8
mkosi.build

@ -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"

10
po/meson.build

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

Loading…
Cancel
Save