[NetworkManager-fortisslvpn] build: replace intltool with gettext



commit 2ccbd710a8f1683a4b2a77f7c31916cc2e266f8d
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Wed Mar 20 17:03:35 2019 +0100

    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                                         | 43 +++++++++++++++++++++-
 Makefile.am                                        | 12 ++----
 .../network-manager-fortisslvpn.metainfo.xml.in    | 10 ++---
 autogen.sh                                         |  8 ++--
 configure.ac                                       |  4 +-
 po/Makevars                                        |  9 +++++
 po/POTFILES.in                                     |  2 +-
 7 files changed, 66 insertions(+), 22 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 02b9357..947cf3c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
 *.o
 *.lo
 *.la
+ABOUT-NLS
 Makefile
 Makefile.in*
 configure
@@ -21,13 +22,53 @@ stamp-*
 .libs
 autom4te.cache
 intltool-*
-po/NetworkManager-fortisslvpn.pot
+po/boldquot.sed
+po/en@boldquot.header
+po/en@quot.header
 po/*.gmo
+po/insert-header.sin
 po/.intltool-merge-cache
+po/Makevars.template
+po/NetworkManager-fortisslvpn.pot
+po/quot.sed
+po/remove-potcdate.sin
+po/Rules-quot
+m4/codeset.m4
+m4/extern-inline.m4
+m4/fcntl-o.m4
+m4/gettext.m4
+m4/glibc21.m4
+m4/glibc2.m4
 m4/gtk-doc.m4
+m4/iconv.m4
+m4/intdiv0.m4
+m4/intldir.m4
+m4/intl.m4
+m4/intlmacosx.m4
 m4/intltool.m4
+m4/intmax.m4
+m4/inttypes_h.m4
+m4/inttypes-pri.m4
+m4/lcmessage.m4
+m4/lib-ld.m4
+m4/lib-link.m4
+m4/lib-prefix.m4
 m4/libtool.m4
+m4/lock.m4
+m4/longlong.m4
 m4/lt*.m4
+m4/nls.m4
+m4/po.m4
+m4/printf-posix.m4
+m4/progtest.m4
+m4/size_max.m4
+m4/stdint_h.m4
+m4/threadlib.m4
+m4/uintmax_t.m4
+m4/visibility.m4
+m4/wchar_t.m4
+m4/wint_t.m4
+m4/xsize.m4
 network-manager-fortisslvpn.metainfo.xml
 
 /cscope.in.out
diff --git a/Makefile.am b/Makefile.am
index 0bde080..ee7fa9f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -307,7 +307,9 @@ if WITH_GNOME
 appdata_DATA = $(appdata_files)
 endif
 appdata_in_files = appdata/network-manager-fortisslvpn.metainfo.xml.in
-@INTLTOOL_XML_RULE@
+
+appdata/network-manager-fortisslvpn.metainfo.xml: appdata/network-manager-fortisslvpn.metainfo.xml.in
+       $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
 
 nm-fortisslvpn-service.name: $(srcdir)/nm-fortisslvpn-service.name.in
        $(AM_V_GEN) sed -e 's|[@]LIBEXECDIR[@]|$(libexecdir)|g' \
@@ -319,9 +321,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 \
@@ -337,9 +336,4 @@ CLEANFILES += \
        $(nmvpnservice_DATA) \
        $(appdata_files)
 
-DISTCLEANFILES = \
-       intltool-extract \
-       intltool-merge \
-       intltool-update
-
 ACLOCAL_AMFLAGS = -I m4
diff --git a/appdata/network-manager-fortisslvpn.metainfo.xml.in 
b/appdata/network-manager-fortisslvpn.metainfo.xml.in
index 1c9d05a..4c06ccc 100644
--- a/appdata/network-manager-fortisslvpn.metainfo.xml.in
+++ b/appdata/network-manager-fortisslvpn.metainfo.xml.in
@@ -6,8 +6,8 @@
   <metadata_license>CC0-1.0</metadata_license>
   <extends>nm-connection-editor.desktop</extends>
   <extends>gnome-control-center.desktop</extends>
-  <_name>Fortinet SSLVPN client</_name>
-  <_summary>Client for Fortinet SSLVPN virtual private networks</_summary>
+  <name>Fortinet SSLVPN client</name>
+  <summary>Client for Fortinet SSLVPN virtual private networks</summary>
 
   <keywords>
     <keyword>network</keyword>
@@ -21,7 +21,7 @@
   </keywords>
 
   <description>
-    <_p>Support for configuring Fortinet SSLVPN virtual private network connections.</_p>
+    <p>Support for configuring Fortinet SSLVPN virtual private network connections.</p>
   </description>
 
   <screenshots>
@@ -36,7 +36,7 @@
 
   <url type="homepage">https://wiki.gnome.org/Projects/NetworkManager/VPN</url>
   <url type="bugtracker">https://gitlab.gnome.org/GNOME/NetworkManager-fortisslvpn/issues</url>
-  <update_contact>networkmanager-maint gnome bugs</update_contact>
+  <update_contact>networkmanager-list gnome org</update_contact>
   <translation type="gettext">NetworkManager-fortisslvpn</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 757e75e..b75f91f 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -14,9 +14,9 @@ PKG_NAME=NetworkManager-fortisslvpn
 }
 
 (cd $srcdir;
-    autoreconf --install --symlink &&
-    intltoolize --force &&
-    autoreconf &&
-    ./configure --enable-maintainer-mode $@
+    autoreconf --force --install --symlink
 )
 
+if test -z "$NOCONFIGURE"; then
+    "$srcdir/configure" --enable-maintainer-mode --enable-more-warnings=error "$@"
+fi
diff --git a/configure.ac b/configure.ac
index f21588f..bb3344b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,8 +98,8 @@ GETTEXT_PACKAGE=NetworkManager-fortisslvpn
 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])
+AM_GNU_GETTEXT_VERSION([0.19])
 
 # gio-unix will require glib and gio
 PKG_CHECK_MODULES(GLIB, gio-unix-2.0 >= 2.32)
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 d196f93..0646cd9 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -7,4 +7,4 @@ properties/nm-fortisslvpn-editor.c
 shared/nm-utils/nm-shared-utils.c
 shared/nm-utils/nm-vpn-plugin-utils.c
 src/nm-fortisslvpn-service.c
-[type: gettext/glade]properties/nm-fortisslvpn-dialog.ui
+properties/nm-fortisslvpn-dialog.ui


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]