From 36e676c187eb2afc02c742624b7d42df4e024ea0 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 22 Jul 2016 09:25:32 +0100 Subject: Port away from intltool --- README.md | 2 +- RELEASE | 1 - autogen.sh | 2 +- configure.ac | 6 +++--- contrib/libappstream-glib.spec.in | 1 - po/Makevars | 38 +++++++++++++++++++++++++++++++++++++- po/POTFILES.in | 3 --- 7 files changed, 42 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 6ebb0e6..bd2d4ca 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ copy. To do the latter just do: dnf install automake autoconf libtool glib-devel docbook-utils \ gtk-doc gobject-introspection-devel rpm-devel \ gtk3-devel sqlite-devel libsoup-devel gettext-devel \ - intltool libarchive-devel libyaml-devel + libarchive-devel libyaml-devel ./autogen.sh make make install diff --git a/RELEASE b/RELEASE index abe9134..3cbd5d4 100644 --- a/RELEASE +++ b/RELEASE @@ -20,7 +20,6 @@ Bugfixes: cd po make appstream-glib.pot -INTLTOOL_EXTRACT="/usr/bin/intltool-extract" XGETTEXT="/usr/bin/xgettext --no-location" srcdir=. /usr/bin/intltool-update --gettext-package appstream-glib --pot tx push --source tx pull --all --minimum-perc=5 git add *.po diff --git a/autogen.sh b/autogen.sh index 2d0392d..fd3ef34 100755 --- a/autogen.sh +++ b/autogen.sh @@ -25,9 +25,9 @@ if ([ -z "$*" ] && [ "x$NOCONFIGURE" = "x" ]) ; then echo fi +(cd $srcdir && autopoint --force) || exit 1 (cd $srcdir && gtkdocize) || exit 1 (cd $srcdir && autoreconf --force --install) || exit 1 -(cd $srcdir && intltoolize --force --copy --automake) || exit 1 conf_flags="--enable-gtk-doc" diff --git a/configure.ac b/configure.ac index bad7425..18ecffd 100644 --- a/configure.ac +++ b/configure.ac @@ -91,10 +91,10 @@ GNOME_COMPILE_WARNINGS([maximum],[ ]) # internationalization -GETTEXT_PACKAGE=appstream-glib -AC_SUBST(GETTEXT_PACKAGE) +AM_GNU_GETTEXT([external]) +AM_GNU_GETTEXT_VERSION([0.19.8]) +AC_SUBST([GETTEXT_PACKAGE], [appstream-glib]) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext]) -IT_PROG_INTLTOOL([0.40.0]) # set up gtk-doc GTK_DOC_CHECK(1.9) diff --git a/contrib/libappstream-glib.spec.in b/contrib/libappstream-glib.spec.in index a0ea108..6c76f7e 100644 --- a/contrib/libappstream-glib.spec.in +++ b/contrib/libappstream-glib.spec.in @@ -19,7 +19,6 @@ BuildRequires: libsoup-devel >= 2.51.92 BuildRequires: gdk-pixbuf2-devel >= 2.31.5 BuildRequires: gtk3-devel BuildRequires: gettext -BuildRequires: intltool BuildRequires: libgcab1-devel BuildRequires: libuuid-devel BuildRequires: libstemmer-devel diff --git a/po/Makevars b/po/Makevars index fd21940..55b76d7 100644 --- a/po/Makevars +++ b/po/Makevars @@ -8,7 +8,7 @@ subdir = po top_builddir = .. # These options get passed to xgettext. -XGETTEXT_OPTIONS = --keyword=_ --from-code=UTF-8 +XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 # 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 @@ -20,6 +20,13 @@ XGETTEXT_OPTIONS = --keyword=_ --from-code=UTF-8 # their copyright. COPYRIGHT_HOLDER = Richard Hughes +# 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 = no + # 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 @@ -40,3 +47,32 @@ MSGID_BUGS_ADDRESS = richard@hughsie.com # 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 = --no-location --no-wrap + +# 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 = --no-wrap + +# 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 = yes + +# 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 48df45d..905d786 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,6 +1,3 @@ -# [encoding: UTF-8] -# List of source files containing translatable strings. -# Please keep this file sorted alphabetically. client/as-builder.c client/as-compose.c client/as-util.c -- cgit v1.2.1