]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: move i18n module import to only when it is used
authorEli Schwartz <eschwartz93@gmail.com>
Thu, 19 May 2022 10:54:40 +0000 (06:54 -0400)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 30 Jul 2022 04:58:22 +0000 (13:58 +0900)
When translations are disabled, it's not necessary to `import('i18n')`
and do nothing with it. Also, importing it is (slightly) slow as Meson
needs to load another implementation file from disk, so why bother with
that work?

More particularly, muon does not yet implement this module and fails to
setup. Since there's already an option to disable using it, it makes
sense to let that option completely skip the not-implemented
functionality and actually succeed.

po/meson.build

index 139f393e331648fc54864a12716cd29a29e9c105..0a140b40b50cba43fee87974b62c95ebf7c40813 100644 (file)
@@ -1,9 +1,9 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-i18n = import('i18n')
 want_translations = get_option('translations')
 
 if want_translations
+        i18n = import('i18n')
         i18n.gettext(meson.project_name(),
                      preset : 'glib',
                      data_dirs : '.')