<div dir="ltr">Hi<br><div><br><div class="gmail_quote"><div dir="ltr">On Tue, May 9, 2017 at 5:24 PM Christophe Fergeau <<a href="mailto:cfergeau@redhat.com">cfergeau@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, May 09, 2017 at 05:45:50PM +0300, <a href="mailto:marcandre.lureau@redhat.com" target="_blank">marcandre.lureau@redhat.com</a> wrote:<br>
> From: Marc-André Lureau <<a href="mailto:marcandre.lureau@redhat.com" target="_blank">marcandre.lureau@redhat.com</a>><br>
><br>
> intltool and glib-gettext are somehow related, and upstream gettext<br>
> should now support everything needed for GNOME projects.<br>
><br>
> intltool support never really worked, and we removed some of its<br>
> commented usage a while ago when dropping spicy desktop/mime.<br>
><br>
> Signed-off-by: Marc-André Lureau <<a href="mailto:marcandre.lureau@redhat.com" target="_blank">marcandre.lureau@redhat.com</a>><br>
> ---<br>
>  Makefile.am  | 17 ++------------<br>
>  README       |  2 +-<br>
>  autogen.sh   |  1 -<br>
>  <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> |  8 +++----<br>
>  po/Makevars  | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br>
>  5 files changed, 83 insertions(+), 21 deletions(-)<br>
>  create mode 100644 po/Makevars<br>
><br>
> diff --git a/Makefile.am b/Makefile.am<br>
> index f462ae0..30f05f4 100644<br>
> --- a/Makefile.am<br>
> +++ b/Makefile.am<br>
> @@ -26,20 +26,7 @@ if WITH_CONTROLLER<br>
>  pkgconfig_DATA += spice-controller.pc<br>
>  endif<br>
><br>
> -INTLTOOL_FILES =                             \<br>
> -     <a href="http://intltool-extract.in" rel="noreferrer" target="_blank">intltool-extract.in</a>                     \<br>
> -     <a href="http://intltool-merge.in" rel="noreferrer" target="_blank">intltool-merge.in</a>                       \<br>
> -     <a href="http://intltool-update.in" rel="noreferrer" target="_blank">intltool-update.in</a>                      \<br>
> -     $(NULL)<br>
> -<br>
> -DISTCLEANFILES =                             \<br>
> -     $(pkgconfig_DATA)                       \<br>
> -     intltool-extract                        \<br>
> -     intltool-merge                          \<br>
> -     intltool-update                         \<br>
> -     gnome-doc-utils.make                    \<br>
> -     po/.intltool-merge-cache                \<br>
> -     $(NULL)<br>
> +DISTCLEANFILES = $(pkgconfig_DATA)<br>
><br>
>  EXTRA_DIST =                                 \<br>
>       build-aux/git-version-gen               \<br>
> @@ -52,8 +39,8 @@ MAINTAINERCLEANFILES =                                      \<br>
>       $(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL)      \<br>
>       $(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN)   \<br>
>       $(GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL)    \<br>
> +     $(GITIGNORE_MAINTAINERCLEANFILES_M4_GETTEXT)    \<br>
>       m4/gtk-doc.m4                                   \<br>
> -     m4/intltool.m4                                  \<br>
>       gtk-doc.make                                    \<br>
>       $(NULL)<br>
><br>
> diff --git a/README b/README<br>
> index 2ab5b67..1ea621a 100644<br>
> --- a/README<br>
> +++ b/README<br>
> @@ -42,7 +42,7 @@ dnf builddep spice-gtk<br>
><br>
>  . or install:<br>
><br>
> -gtk3-devel spice-protocol intltool<br>
> +gtk3-devel spice-protocol<br>
<br>
Do we want to mention gettext instead, or are we just assuming this is<br>
pulled in indirectly, or will be there anyway?<br></blockquote><div><br></div><div>we didn't mention it before, but I can add gettext-devel, next to automake etc <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
>  openssl-devel pulseaudio-libs-devel pixman-devel<br>
>  gobject-introspection-devel libjpeg-turbo-devel zlib-devel<br>
>  cyrus-sasl-devel gtk-doc<br>
> diff --git a/autogen.sh b/autogen.sh<br>
> index da28eef..cc7bda3 100755<br>
> --- a/autogen.sh<br>
> +++ b/autogen.sh<br>
> @@ -10,7 +10,6 @@ test -z "$srcdir" && srcdir=.<br>
>      git submodule update --init --recursive<br>
>      gtkdocize<br>
>      autoreconf -v --force --install<br>
> -    intltoolize -f<br>
>  )<br>
><br>
>  CONFIGURE_ARGS="--enable-maintainer-mode --enable-gtk-doc --with-gtk=3.0 --enable-vala"<br>
> diff --git a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
> index 74b5811..9cf8441 100644<br>
> --- a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
> +++ b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
> @@ -13,11 +13,11 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])<br>
>  LT_INIT([disable-static win32-dll])<br>
>  AM_MAINTAINER_MODE<br>
><br>
> -IT_PROG_INTLTOOL([0.40.0])<br>
> -GETTEXT_PACKAGE=spice-gtk<br>
> +GETTEXT_PACKAGE=AC_PACKAGE_TARNAME<br>
>  AC_SUBST(GETTEXT_PACKAGE)<br>
> -AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],"$GETTEXT_PACKAGE", [GETTEXT package name])<br>
> -AM_GLIB_GNU_GETTEXT<br>
> +AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE", [GETTEXT package name])<br>
> +AM_GNU_GETTEXT_VERSION([0.19.8])<br>
<br>
This is the latest gettext release, which is not even 1 year old, is<br>
this the only one which is going to work? Or is it possible to relax<br>
this version chekc?<br></blockquote><div><br></div><div>It's quite a mess to downgrade gettext or find the minimum required version. RHEL7 has 0.19.8.1 already. I suppose it should work with earlier 0.19 releases, perhaps even older..<br><br></div><div>Normally, it's only needed for making release tarballs, so if a distro change the build-sys and needs to redo autotools, they can do it on a more recent system, or try to modify the minimum version, or even revert this patch.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> +AM_GNU_GETTEXT([external])<br>
><br>
><br>
>  SPICE_GTK_LOCALEDIR=[${datadir}/locale]<br>
> diff --git a/po/Makevars b/po/Makevars<br>
> new file mode 100644<br>
> index 0000000..df15f4a<br>
> --- /dev/null<br>
> +++ b/po/Makevars<br>
> @@ -0,0 +1,76 @@<br>
> +# Makefile variables for PO directory in any package using GNU gettext.<br>
> +<br>
> +# Usually the message domain is the same as the package name.<br>
> +DOMAIN = $(PACKAGE)<br>
> +<br>
> +# These two variables depend on the location of this directory.<br>
> +subdir = po<br>
> +top_builddir = ..<br>
> +<br>
> +# These options get passed to xgettext.<br>
> +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ \<br>
> +        --keyword=C_:1c,2 --keyword=NC_:1c,2 \<br>
> +        --keyword=g_dngettext:2,3 \<br>
> +        --flag=g_dngettext:2:pass-c-format \<br>
> +        --flag=g_strdup_printf:1:c-format \<br>
> +        --flag=g_string_printf:2:c-format \<br>
> +        --flag=g_string_append_printf:2:c-format \<br>
> +        --flag=g_error_new:3:c-format \<br>
> +        --flag=g_set_error:4:c-format \<br>
> +        --flag=g_markup_printf_escaped:1:c-format \<br>
> +        --flag=g_log:3:c-format \<br>
> +        --flag=g_print:1:c-format \<br>
> +        --flag=g_printerr:1:c-format \<br>
> +        --flag=g_printf:1:c-format \<br>
> +        --flag=g_fprintf:2:c-format \<br>
> +        --flag=g_sprintf:2:c-format \<br>
> +        --flag=g_snprintf:3:c-format<br>
> +<br>
> +<br>
> +# This is the copyright holder that gets inserted into the header of the<br>
> +# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding<br>
> +# package.  (Note that the msgstr strings, extracted from the package's<br>
> +# sources, belong to the copyright holder of the package.)  Translators are<br>
> +# expected to transfer the copyright for their translations to this person<br>
> +# or entity, or to disclaim their copyright.  The empty string stands for<br>
> +# the public domain; in this case the translators are expected to disclaim<br>
> +# their copyright.<br>
> +COPYRIGHT_HOLDER = Free Software Foundation, Inc.<br>
<br>
Not fully sure who the copyright holder should be here?<br>
<br></blockquote><div><br></div><div>Yeah, perhaps Red Hat?<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> +<br>
> +# This tells whether or not to prepend "GNU " prefix to the package<br>
> +# name that gets inserted into the header of the $(DOMAIN).pot file.<br>
> +# Possible values are "yes", "no", or empty.  If it is empty, try to<br>
> +# detect it automatically by scanning the files in $(top_srcdir) for<br>
> +# "GNU packagename" string.<br>
> +PACKAGE_GNU = no<br>
> +<br>
> +# This is the email address or URL to which the translators shall report<br>
> +# bugs in the untranslated strings:<br>
> +# - Strings which are not entire sentences, see the maintainer guidelines<br>
> +#   in the GNU gettext documentation, section 'Preparing Strings'.<br>
> +# - Strings which use unclear terms or require additional context to be<br>
> +#   understood.<br>
> +# - Strings which make invalid assumptions about notation of date, time or<br>
> +#   money.<br>
> +# - Pluralisation problems.<br>
> +# - Incorrect English spelling.<br>
> +# - Incorrect formatting.<br>
> +# It can be your email address, or a mailing list address where translators<br>
> +# can write to without being subscribed, or the URL of a web page through<br>
> +# which the translators can contact you.<br>
> +MSGID_BUGS_ADDRESS =<br>
<br>
We should fill this too<br></blockquote><div><br></div><div>yep  <a href="mailto:spice-devel@lists.freedesktop.org">spice-devel@lists.freedesktop.org</a> ?<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> +<br>
> +# This is the list of locale categories, beyond LC_MESSAGES, for which the<br>
> +# message catalogs shall be used.  It is usually empty.<br>
> +EXTRA_LOCALE_CATEGORIES =<br>
> +<br>
> +# Ignore the timestamp of the .pot file, as git clones do not have<br>
> +# deterministic timestamps, and .po files are updated by translators<br>
> +# (only) in GNOME projects.<br>
> +PO_DEPENDS_ON_POT = no<br>
<br>
Should we keep that GNOME reference?<br></blockquote><div><br></div><div>Perhaps not, since we don't have automated translation tools like gnome infra.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
When I look at Makevars.template on my machine, it has<br>
<br>
+# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'<br>
+# context.  Possible values are "yes" and "no".  Set this to yes if the<br>
+# package uses functions taking also a message context, like pgettext(), or<br>
+# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.<br>
+USE_MSGCTXT = no<br>
+<br>
<br>
dunno if it matters that we set it to yes, or if this is the default<br>
anyway.<br></blockquote><div><br></div><div>Default is probably no, I can add that section.  <br><br></div><div>Waiting for other remark, or I will resend with those minor modifications.<br><br></div><div><br></div></div></div></div><div dir="ltr">-- <br></div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Marc-André Lureau<br></div></div>