[NetworkManager-vpnc/lr/test] build: replace intltool with gettext
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [NetworkManager-vpnc/lr/test] build: replace intltool with gettext
- Date: Mon, 27 Jun 2022 14:36:10 +0000 (UTC)
commit 603c7d25fab7d54eeadef76d2fd4dbd4f676d057
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Mon Jun 27 16:34:14 2022 +0200
build: replace intltool with gettext
Gettext, since version 0.19, provides infrastructure equivalent to
intltool (generating po/Makefile and translating .desktop files or .xml).
Also, it seems to work better in that it actually honors MSGFMT_OPTS
that are determined by the configure script. That one typically ends up
set to "-c", meaning "check". Without it the bugs in the .po files are
easy to overlook.
.gitignore | 42 +++++++++++++++++++++++++++-
.gitlab-ci.yml | 1 -
Makefile.am | 11 +++-----
appdata/network-manager-vpnc.metainfo.xml.in | 10 +++----
autogen.sh | 2 --
configure.ac | 6 ++--
po/Makevars | 9 ++++++
po/POTFILES.in | 2 +-
8 files changed, 64 insertions(+), 19 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0734662..ccdafe1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
*.o
*.lo
*.la
+ABOUT-NLS
Makefile
Makefile.in*
configure
@@ -23,12 +24,31 @@ stamp-*
.libs
autom4te.cache
intltool-*
-po/*.gmo
po/.intltool-merge-cache
+po/*.gmo
+po/boldquot.sed
+po/en@boldquot.header
+po/en@quot.header
+po/insert-header.sin
+po/Makevars.template
+po/quot.sed
+po/remove-potcdate.sed
+po/remove-potcdate.sin
+po/Rules-quot
+m4/gettext.m4
m4/gtk-doc.m4
+m4/host-cpu-c-abi.m4
+m4/iconv.m4
+m4/intlmacosx.m4
m4/intltool.m4
+m4/lib-ld.m4
+m4/lib-link.m4
+m4/lib-prefix.m4
m4/libtool.m4
m4/lt*.m4
+m4/nls.m4
+m4/po.m4
+m4/progtest.m4
appdata/network-manager-vpnc.metainfo.xml
/test-driver
@@ -54,3 +74,23 @@ src/test-vpnc-output
gtk4
/NetworkManager-vpnc*.tar*
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/^m4
+
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6cbaba7..6916232 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -13,7 +13,6 @@
gettext-devel
glib2-devel
gtk3-devel
- intltool
libtool
libsecret-devel
libnma-devel
diff --git a/Makefile.am b/Makefile.am
index c221a7d..4d96f05 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -260,7 +260,9 @@ if WITH_GNOME
appdata_DATA = $(appdata_files)
endif
appdata_in_files = appdata/network-manager-vpnc.metainfo.xml.in
-@INTLTOOL_XML_RULE@
+
+appdata/network-manager-vpnc.metainfo.xml: appdata/network-manager-vpnc.metainfo.xml.in
+ $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
nm-vpnc-service.name: $(srcdir)/nm-vpnc-service.name.in
sed -e 's|[@]LIBEXECDIR[@]|$(libexecdir)|g' \
@@ -301,10 +303,7 @@ EXTRA_DIST = \
nm-vpnc-service.name.in \
$(dbusservice_DATA) \
$(appdata_in_files) \
- $(appdata_files) \
- intltool-extract.in \
- intltool-merge.in \
- intltool-update.in
+ $(appdata_files)
# Include a prebuilt file in tarball, to avoid hitting
# https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4415
@@ -319,6 +318,4 @@ CLEANFILES = *.bak *~ \
gtk4/resources.c \
gtk4/nm-vpnc-dialog.ui
-DISTCLEANFILES = intltool-extract intltool-merge intltool-update
-
ACLOCAL_AMFLAGS = -I m4
diff --git a/appdata/network-manager-vpnc.metainfo.xml.in b/appdata/network-manager-vpnc.metainfo.xml.in
index 5784e7f..d0db808 100644
--- a/appdata/network-manager-vpnc.metainfo.xml.in
+++ b/appdata/network-manager-vpnc.metainfo.xml.in
@@ -7,8 +7,8 @@
<extends>nm-connection-editor.desktop</extends>
<extends>org.gnome.Settings.desktop</extends>
<extends>gnome-control-center.desktop</extends>
- <_name>Legacy Cisco VPNC client</_name>
- <_summary>Client for Cisco IPsec virtual private networks</_summary>
+ <name>Legacy Cisco VPNC client</name>
+ <summary>Client for Cisco IPsec virtual private networks</summary>
<keywords>
<keyword>network</keyword>
@@ -22,8 +22,8 @@
</keywords>
<description>
- <_p>Support for configuring virtual private networks based on VPNC.</_p>
- <_p>Compatible with Cisco VPN concentrators configured to use IPsec.</_p>
+ <p>Support for configuring virtual private networks based on VPNC.</p>
+ <p>Compatible with Cisco VPN concentrators configured to use IPsec.</p>
</description>
<screenshots>
@@ -40,5 +40,5 @@
<url type="bugtracker">https://gitlab.gnome.org/GNOME/NetworkManager-vpnc/issues</url>
<update_contact>networkmanager-maint gnome bugs</update_contact>
<translation type="gettext">NetworkManager-vpnc</translation>
- <_developer_name>The NetworkManager Developers</_developer_name>
+ <developer_name>The NetworkManager Developers</developer_name>
</component>
diff --git a/autogen.sh b/autogen.sh
index 2359abd..26089cb 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -15,8 +15,6 @@ PKG_NAME=NetworkManager-vpnc
(cd $srcdir;
autoreconf --install --symlink &&
- intltoolize --force &&
- autoreconf &&
./configure --enable-maintainer-mode --enable-more-warnings=error $@
)
diff --git a/configure.ac b/configure.ac
index 842fb65..82003b3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,8 +87,10 @@ GETTEXT_PACKAGE=NetworkManager-vpnc
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
-IT_PROG_INTLTOOL([0.35])
-AM_GLIB_GNU_GETTEXT
+AM_GNU_GETTEXT([external])
+# Remove AM_GNU_GETTEXT_VERSION once autoreconf supports REQUIRE_VERSION
+AM_GNU_GETTEXT_VERSION([0.19])
+AM_GNU_GETTEXT_REQUIRE_VERSION([0.19])
PKG_CHECK_MODULES(GLIB, gmodule-2.0 glib-2.0 >= 2.34)
GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_34"
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..aed76ae
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,9 @@
+DOMAIN = $(PACKAGE)
+
+subdir = po
+top_builddir = ..
+
+XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2
--keyword=g_dngettext:2,3 --add-comments
+COPYRIGHT_HOLDER = $(PACKAGE) authors
+MSGID_BUGS_ADDRESS = https://gitlab.gnome.org/GNOME/$(PACKAGE)/
+EXTRA_LOCALE_CATEGORIES =
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 520809d..da40e13 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -7,4 +7,4 @@ properties/nm-vpnc-editor.c
src/nm-vpnc-service.c
shared/nm-utils/nm-shared-utils.c
shared/nm-utils/nm-vpn-plugin-utils.c
-[type: gettext/glade]properties/nm-vpnc-dialog.ui
+properties/nm-vpnc-dialog.ui
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]