diff --git a/meson_options.txt b/meson_options.txt index 6e104d21c3..d1096655dc 100644 --- a/meson_options.txt +++ b/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') diff --git a/po/meson.build b/po/meson.build index 193f614f4f..139f393e33 100644 --- a/po/meson.build +++ b/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