]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3-waf: Enable build of MO files for localization
authorIvan Korytov <korytovip@basealt.ru>
Tue, 25 Feb 2025 11:48:51 +0000 (14:48 +0300)
committerAlexander Bokovoy <ab@samba.org>
Fri, 28 Feb 2025 13:26:45 +0000 (13:26 +0000)
waf will now generate .mo files for pam_winbind and net when gettext support is enabled and gettext tools are available

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14491

Signed-off-by: Ivan Korytov <korytovip@basealt.ru>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Fri Feb 28 13:26:45 UTC 2025 on atb-devel-224

source3/locale/net/LINGUAS [new file with mode: 0644]
source3/locale/pam_winbind/LINGUAS [new file with mode: 0644]
source3/locale/wscript [new file with mode: 0644]
source3/wscript
source3/wscript_build

diff --git a/source3/locale/net/LINGUAS b/source3/locale/net/LINGUAS
new file mode 100644 (file)
index 0000000..7673daa
--- /dev/null
@@ -0,0 +1 @@
+de
diff --git a/source3/locale/pam_winbind/LINGUAS b/source3/locale/pam_winbind/LINGUAS
new file mode 100644 (file)
index 0000000..67baa1d
--- /dev/null
@@ -0,0 +1,20 @@
+ar
+cs
+da
+de
+es
+fi
+fr
+hu
+it
+ja
+ko
+nb
+nl
+pl
+pt_BR
+ru
+sv
+tr
+zh_CN
+zh_TW
diff --git a/source3/locale/wscript b/source3/locale/wscript
new file mode 100644 (file)
index 0000000..41b04a8
--- /dev/null
@@ -0,0 +1,7 @@
+#!/usr/bin/env python
+from waflib import Options
+
+def build(bld):
+    if (not Options.options.disable_gettext) and ('MSGFMT' in bld.env):
+        bld(features='intltool_po', appname='net', podir='net', install_path="${LOCALEDIR}")
+        bld(features='intltool_po', appname='pam_winbind', podir='pam_winbind', install_path="${LOCALEDIR}")
index fdb9436dafac508a62d951fc19c6b8f6c91924e7..0a2b9234e49d3d1ea3ffb977132611024281095b 100644 (file)
@@ -2060,4 +2060,7 @@ int main(void) {
                    "found. Use --with-shared-modules='!vfs_snapper' to disable "
                    "vfs_snapper support.")
 
+    if not Options.options.disable_gettext:
+        conf.load('gnu_dirs intltool')
+
     conf.SAMBA_CONFIG_H('include/config.h')
index 9e3efcabe07d2896c99b7c884396501a298015d4..9e42b046e3899e32c1755f0a9ddea3d880446b26 100644 (file)
@@ -1331,6 +1331,7 @@ bld.RECURSE('utils')
 bld.RECURSE('nmbd')
 bld.RECURSE('lib/util')
 bld.RECURSE('torture')
+bld.RECURSE('locale')
 
 bld.ENFORCE_GROUP_ORDERING()
 bld.CHECK_PROJECT_RULES()