[gvfs] build: Use upstream gettext instead intltool



commit 812f42e6bec9d9adf7c97d83fb55f0f0e4f3e3d6
Author: Javier Jardón <jjardon gnome org>
Date:   Tue Jul 12 01:40:59 2016 +0100

    build: Use upstream gettext instead intltool
    
    See for more info:
    https://wiki.gnome.org/MigratingFromIntltoolToGettext
    
    Modified by Ondrej Holy.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768707

 .gitignore                                      |    8 ++-
 Makefile.am                                     |    6 --
 autogen.sh                                      |    1 -
 configure.ac                                    |   28 +-------
 daemon/Makefile.am                              |    4 +-
 daemon/org.gtk.vfs.file-operations.policy.in.in |    8 +-
 po/Makevars                                     |   78 +++++++++++++++++++++++
 po/POTFILES.in                                  |    1 -
 8 files changed, 96 insertions(+), 38 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 3f0d0cf..e864568 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,7 +21,6 @@ config.guess
 config.sub
 configure
 libtool
-intltool-*.in
 depcomp
 ltmain.sh
 install-sh
@@ -45,3 +44,10 @@ man/*.1
 man/*.7
 test-driver
 INSTALL
+ABOUT-NLS
+config.rpath
+Makevars.template
+Rules-quot
+*.header
+*.sed
+*.sin
diff --git a/Makefile.am b/Makefile.am
index 7484b42..03e9e3f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,12 +27,6 @@ EXTRA_DIST = \
        m4                      \
        $(NULL)
 
-DISTCLEANFILES = \
-       intltool-extract        \
-       intltool-merge          \
-       intltool-update         \
-       $(NULL)
-
 distclean-local:
        if test "$(srcdir)" = "."; then :; else \
                rm -f ChangeLog; \
diff --git a/autogen.sh b/autogen.sh
index bc7661a..9a0985b 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -24,7 +24,6 @@ fi
 
 aclocal --install || exit 1
 gtkdocize --copy || exit 1
-intltoolize --force --copy --automake || exit 1
 autoreconf --verbose --force --install || exit 1
 
 cd "$olddir"
diff --git a/configure.ac b/configure.ac
index dcb0136..8ab4fdc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,35 +87,15 @@ if test "x$enable_gcr" != "xno"; then
 fi
 
 dnl ****************************
-dnl *** Checks for intltool  ***
+dnl *** Checks for gettext   ***
 dnl ****************************
+AM_GNU_GETTEXT_VERSION([0.19.4])
+AM_GNU_GETTEXT([external])
 
-IT_PROG_INTLTOOL([0.35.0])
 GETTEXT_PACKAGE=gvfs
-
 AC_SUBST([GETTEXT_PACKAGE])
 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[The gettext domain name])
-AM_GLIB_GNU_GETTEXT
-
-dnl ****************************
-dnl *** Checks for gettext   ***
-dnl ****************************
-
-dnl *** disabled by now, using intltool ***
-dnl *** we'll revert when glib-gettexttize will be able
-dnl *** to manage [enconding: UTF-8] in POTIFILES.in
-
-dnl GETTEXT_PACKAGE=gvfs
-dnl AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The gettext domain name])
-dnl AC_SUBST(GETTEXT_PACKAGE)
-
-dnl ALL_LINGUAS=""
-
-dnl AM_GLIB_GNU_GETTEXT
-
-dnl LIBS="$LIBS $INTLLIBS"
 
-dnl AM_GLIB_DEFINE_LOCALEDIR(GVFS_LOCALEDIR)
 
 dnl ****************************
 dnl *** Checks for ssh stuff ***
@@ -152,7 +132,7 @@ AC_ARG_ENABLE([admin], [AS_HELP_STRING([--disable-admin],[build without admin ba
 msg_admin=no
 
 if test "x$enable_admin" != "xno"; then
-  PKG_CHECK_MODULES([ADMIN], [polkit-gobject-1], [msg_admin=yes])
+  PKG_CHECK_MODULES([ADMIN], [polkit-gobject-1 >= 0.114], [msg_admin=yes])
 
   if test "x$msg_admin" = "xyes"; then
     AC_DEFINE([HAVE_ADMIN], 1, [Define to 1 if admin backend is going to be built])
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 22f0929..818dd0c 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -665,7 +665,9 @@ gvfs_gschemas_convert_DATA = $(gvfs_gschemas_convert)
 org.gtk.vfs.file-operations.policy.in: org.gtk.vfs.file-operations.policy.in.in Makefile
        $(AM_V_GEN) sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
 
-@INTLTOOL_POLICY_RULE@
+org.gtk.vfs.file-operations.policy: org.gtk.vfs.file-operations.policy.in Makefile
+       $(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@ || cp $< $@
+
 gvfs_polkit_actionsdir = $(datadir)/polkit-1/actions
 gvfs_polkit_actions_in_files = org.gtk.vfs.file-operations.policy.in
 gvfs_polkit_actions_DATA = org.gtk.vfs.file-operations.policy
diff --git a/daemon/org.gtk.vfs.file-operations.policy.in.in b/daemon/org.gtk.vfs.file-operations.policy.in.in
index a371a0d..f48a923 100644
--- a/daemon/org.gtk.vfs.file-operations.policy.in.in
+++ b/daemon/org.gtk.vfs.file-operations.policy.in.in
@@ -9,8 +9,8 @@
   <vendor_url>http://git.gnome.org/browse/gvfs</vendor_url>
 
   <action id="org.gtk.vfs.file-operations-helper">
-    <_description>Perform file operations</_description>
-    <_message>Authentication is required to perform file operations</_message>
+    <description>Perform file operations</description>
+    <message>Authentication is required to perform file operations</message>
     <defaults>
       <allow_any>no</allow_any>
       <allow_inactive>no</allow_inactive>
@@ -20,8 +20,8 @@
   </action>
 
   <action id="org.gtk.vfs.file-operations">
-    <_description>Perform file operations</_description>
-    <_message>Authentication is required to perform file operations</_message>
+    <description>Perform file operations</description>
+    <message>Authentication is required to perform file operations</message>
     <defaults>
       <allow_any>no</allow_any>
       <allow_inactive>no</allow_inactive>
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..df09a7b
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,78 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --from-code=UTF-8
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+
+# This tells whether or not to prepend "GNU " prefix to the package
+# name that gets inserted into the header of the $(DOMAIN).pot file.
+# Possible values are "yes", "no", or empty.  If it is empty, try to
+# detect it automatically by scanning the files in $(top_srcdir) for
+# "GNU packagename" string.
+PACKAGE_GNU =
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+#   in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+#   understood.
+# - Strings which make invalid assumptions about notation of date, time or
+#   money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS =
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
+
+# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
+# context.  Possible values are "yes" and "no".  Set this to yes if the
+# package uses functions taking also a message context, like pgettext(), or
+# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
+USE_MSGCTXT = no
+
+# These options get passed to msgmerge.
+# Useful options are in particular:
+#   --previous            to keep previous msgids of translated messages,
+#   --quiet               to reduce the verbosity.
+MSGMERGE_OPTIONS =
+
+# These options get passed to msginit.
+# If you want to disable line wrapping when writing PO files, add
+# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
+# MSGINIT_OPTIONS.
+MSGINIT_OPTIONS =
+
+# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
+# has changed.  Possible values are "yes" and "no".  Set this to no if
+# the POT file is checked in the repository and the version control
+# program ignores timestamps.
+PO_DEPENDS_ON_POT = no
+
+# This tells whether or not to forcibly update $(DOMAIN).pot and
+# regenerate PO files on "make dist".  Possible values are "yes" and
+# "no".  Set this to no if the POT file and PO files are maintained
+# externally.
+DIST_DEPENDS_ON_UPDATE_PO = no
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 2566ed9..d60fd49 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,6 +1,5 @@
 # List of source files containing translatable strings.
 # Please keep this file sorted alphabetically.
-[encoding: UTF-8]
 client/gdaemonfile.c
 client/gdaemonfileenumerator.c
 client/gdaemonfileinputstream.c


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