[NetworkManager-openvpn/lr/gettext: 2/2] build: replace intltool with gettext
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [NetworkManager-openvpn/lr/gettext: 2/2] build: replace intltool with gettext
- Date: Tue, 28 Jun 2022 11:34:31 +0000 (UTC)
commit 596803d48b8ca56703205e13af094f809b7fc0ed
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 | 22 +++++++++++++++++++++-
.gitlab-ci.yml | 1 -
Makefile.am | 12 +++---------
appdata/network-manager-openvpn.metainfo.xml.in | 10 +++++-----
autogen.sh | 2 --
configure.ac | 6 ++++--
po/Makevars | 9 +++++++++
po/POTFILES.in | 4 ++--
8 files changed, 44 insertions(+), 22 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index cf2e77d..bbdd783 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,7 @@
*.la
*.bz2
*.swp
+ABOUT-NLS
Makefile
Makefile.in*
configure
@@ -24,12 +25,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-openvpn.metainfo.xml
/cscope.files
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 65112ab..929ecd0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -19,7 +19,6 @@ stages:
gettext-devel
glib2-devel
gtk3-devel
- intltool
libtool
libsecret-devel
libnma-devel
diff --git a/Makefile.am b/Makefile.am
index 72bb8f3..49dabdd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -438,7 +438,9 @@ if WITH_GNOME
appdata_DATA = $(appdata_files)
endif
appdata_in_files = appdata/network-manager-openvpn.metainfo.xml.in
-@INTLTOOL_XML_RULE@
+
+appdata/network-manager-openvpn.metainfo.xml: appdata/network-manager-openvpn.metainfo.xml.in
+ $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
nm-openvpn-service.name: $(srcdir)/nm-openvpn-service.name.in
$(AM_V_GEN) sed -e 's|[@]LIBEXECDIR[@]|$(libexecdir)|g' \
@@ -456,9 +458,6 @@ EXTRA_DIST += \
$(dbusservice_DATA) \
$(appdata_in_files) \
$(appdata_files) \
- intltool-extract.in \
- intltool-merge.in \
- intltool-update.in \
\
shared/README \
shared/nm-utils/gsystem-local-alloc.h \
@@ -477,9 +476,4 @@ CLEANFILES += \
$(nmvpnservice_DATA) \
$(appdata_files)
-DISTCLEANFILES = \
- intltool-extract \
- intltool-merge \
- intltool-update
-
ACLOCAL_AMFLAGS = -I m4
diff --git a/appdata/network-manager-openvpn.metainfo.xml.in b/appdata/network-manager-openvpn.metainfo.xml.in
index dbdbf6f..023f0f3 100644
--- a/appdata/network-manager-openvpn.metainfo.xml.in
+++ b/appdata/network-manager-openvpn.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>OpenVPN client</_name>
- <_summary>Client for OpenVPN virtual private networks</_summary>
+ <name>OpenVPN client</name>
+ <summary>Client for OpenVPN virtual private networks</summary>
<keywords>
<keyword>network</keyword>
@@ -20,8 +20,8 @@
</keywords>
<description>
- <_p>Support for configuring OpenVPN virtual private network connections.</_p>
- <_p>OpenVPN is a popular and flexible free-software VPN solution.</_p>
+ <p>Support for configuring OpenVPN virtual private network connections.</p>
+ <p>OpenVPN is a popular and flexible free-software VPN solution.</p>
</description>
<screenshots>
@@ -38,5 +38,5 @@
<url type="bugtracker">https://gitlab.gnome.org/GNOME/NetworkManager-openvpn/issues</url>
<update_contact>networkmanager-maint gnome bugs</update_contact>
<translation type="gettext">NetworkManager-openvpn</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 c0bcd42..117ad15 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -15,8 +15,6 @@ PKG_NAME=NetworkManager-openvpn
(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 cb64a46..c525356 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,8 +107,10 @@ GETTEXT_PACKAGE=NetworkManager-openvpn
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 7f0c1b7..b9d8284 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -3,11 +3,11 @@
appdata/network-manager-openvpn.metainfo.xml.in
auth-dialog/main.c
properties/import-export.c
-properties/nm-openvpn-editor-plugin.c
+properties/nm-openvpn-dialog.ui
properties/nm-openvpn-editor.c
+properties/nm-openvpn-editor-plugin.c
shared/nm-utils/nm-shared-utils.c
shared/nm-utils/nm-vpn-plugin-utils.c
shared/utils.c
src/nm-openvpn-service.c
src/nm-openvpn-service-openvpn-helper.c
-[type: gettext/glade]properties/nm-openvpn-dialog.ui
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]