[gnome-packagekit] Port away from intltool



commit e871200b695a659ad770cbd0be51fa09cd851a6d
Author: Richard Hughes <richard hughsie com>
Date:   Tue Dec 6 16:28:39 2016 +0000

    Port away from intltool

 Makefile.am                                        |   10 +--
 autogen.sh                                         |    2 -
 configure.ac                                       |    5 +-
 contrib/gnome-packagekit.spec.in                   |    1 -
 data/Makefile.am                                   |    6 +-
 data/appdata/Makefile.am                           |    6 +-
 .../org.gnome.PackageUpdater.appdata.xml.in        |   12 ++--
 data/appdata/org.gnome.Packages.appdata.xml.in     |   12 ++--
 po/.gitignore                                      |   21 ++++--
 po/Makevars                                        |   78 ++++++++++++++++++++
 po/POTFILES.in                                     |   19 ++---
 po/refresh.sh                                      |    5 -
 12 files changed, 125 insertions(+), 52 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 59331a2..cd67f8f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,10 +8,7 @@ SUBDIRS =                                              \
 ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
 
 EXTRA_DIST =                                           \
-       MAINTAINERS                                     \
-       intltool-extract.in                             \
-       intltool-merge.in                               \
-       intltool-update.in
+       MAINTAINERS
 
 clean-local :
        rm -f *~
@@ -20,15 +17,14 @@ snapshot:
        $(MAKE) dist distdir=$(PACKAGE)-$(VERSION)-`date +"%Y%m%d"`
 
 DISTCLEANFILES =                                       \
-       intltool-extract                                \
-       intltool-merge                                  \
-       intltool-update                                 \
        gnome-packagekit-*.tar.gz
 
 DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper
 
 MAINTAINERCLEANFILES =                                 \
        *~                                              \
+       ABOUT-NLS                                       \
+       config.rpath                                    \
        aclocal.m4                                      \
        compile                                         \
        config.guess                                    \
diff --git a/autogen.sh b/autogen.sh
index ba43e7d..9a0985b 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -23,9 +23,7 @@ if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
 fi
 
 aclocal --install || exit 1
-glib-gettextize --force --copy || 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 303d05e..4f72969 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,7 +13,6 @@ AC_PROG_CC
 AC_PROG_INSTALL
 LT_INIT
 AM_PROG_CC_C_O
-IT_PROG_INTLTOOL([0.35.0])
 
 # set up gtk-doc
 GTK_DOC_CHECK(1.9)
@@ -78,11 +77,11 @@ fi
 dnl ---------------------------------------------------------------------------
 dnl - gettext stuff
 dnl ---------------------------------------------------------------------------
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.19.7])
 GETTEXT_PACKAGE=AC_PACKAGE_NAME
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE(GETTEXT_PACKAGE, "AC_PACKAGE_NAME", [foo])
-
-AM_GLIB_GNU_GETTEXT
 GLIB_GSETTINGS
 
 dnl ---------------------------------------------------------------------------
diff --git a/contrib/gnome-packagekit.spec.in b/contrib/gnome-packagekit.spec.in
index 8965e69..9502a19 100644
--- a/contrib/gnome-packagekit.spec.in
+++ b/contrib/gnome-packagekit.spec.in
@@ -19,7 +19,6 @@ BuildRequires: cairo-devel
 BuildRequires: startup-notification-devel
 BuildRequires: perl(XML::Parser)
 BuildRequires: PackageKit-devel >= 0.5.0
-BuildRequires: intltool
 BuildRequires: xorg-x11-proto-devel
 BuildRequires: fontconfig-devel
 BuildRequires: libcanberra-devel
diff --git a/data/Makefile.am b/data/Makefile.am
index 78044a9..8b79762 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -5,7 +5,9 @@ SUBDIRS = appdata icons
 migrationdir = $(datadir)/GConf/gsettings
 dist_migration_DATA = org.gnome.packagekit.gschema.migrate
 
-@INTLTOOL_DESKTOP_RULE@
+%.desktop: %.desktop.in
+       $(AM_V_GEN) msgfmt --desktop -d $(top_srcdir)/po --template $< -o $@
+
 desktopdir = $(datadir)/applications
 desktop_in_files =                                     \
        gpk-install-local-file.desktop.in               \
@@ -17,8 +19,6 @@ desktop_in_files =                                    \
 
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
-@INTLTOOL_DESKTOP_RULE@
-
 @GSETTINGS_RULES@
 gsettings_SCHEMAS = org.gnome.packagekit.gschema.xml
 
diff --git a/data/appdata/Makefile.am b/data/appdata/Makefile.am
index 9fc0b9e..20e4673 100644
--- a/data/appdata/Makefile.am
+++ b/data/appdata/Makefile.am
@@ -1,5 +1,7 @@
-@INTLTOOL_XML_RULE@
-appdatadir = $(datadir)/metainfo
+%.appdata.xml: %.appdata.xml.in
+       $(AM_V_GEN) msgfmt --xml -d $(top_srcdir)/po --template $< -o $@
+
+appdatadir = $(datadir)/appdata
 appdata_DATA = $(appdata_in_files:.xml.in=.xml)
 appdata_in_files =                                     \
        org.gnome.Packages.appdata.xml.in               \
diff --git a/data/appdata/org.gnome.PackageUpdater.appdata.xml.in 
b/data/appdata/org.gnome.PackageUpdater.appdata.xml.in
index b7abc30..8d08b6c 100644
--- a/data/appdata/org.gnome.PackageUpdater.appdata.xml.in
+++ b/data/appdata/org.gnome.PackageUpdater.appdata.xml.in
@@ -4,18 +4,18 @@
   <id>org.gnome.PackageUpdater.desktop</id>
   <metadata_license>CC0-1.0</metadata_license>
   <project_license>GPL-2.0+</project_license>
-  <_name>GNOME Package Updater</_name>
-  <_summary>Update software installed on the system</_summary>
+  <name>GNOME Package Updater</name>
+  <summary>Update software installed on the system</summary>
   <description>
-    <_p>
+    <p>
       Package Updater allows you to update packages on your system without
       rebooting.
       You can view details about each update and choose which updates to apply.
-    </_p>
-    <_p>
+    </p>
+    <p>
       Package Updater uses PackageKit and can work on any distribution using
       the native package management framework.
-    </_p>
+    </p>
   </description>
   <screenshots>
     <screenshot 
type="default">https://git.gnome.org/browse/gnome-packagekit/plain/data/appdata/ss-updater.png</screenshot>
diff --git a/data/appdata/org.gnome.Packages.appdata.xml.in b/data/appdata/org.gnome.Packages.appdata.xml.in
index d3f37dd..ee64df5 100644
--- a/data/appdata/org.gnome.Packages.appdata.xml.in
+++ b/data/appdata/org.gnome.Packages.appdata.xml.in
@@ -4,20 +4,20 @@
   <id>org.gnome.Packages.desktop</id>
   <metadata_license>CC0-1.0</metadata_license>
   <project_license>GPL-2.0+</project_license>
-  <_name>GNOME Packages</_name>
-  <_summary>Add or remove software installed on the system</_summary>
+  <name>GNOME Packages</name>
+  <summary>Add or remove software installed on the system</summary>
   <description>
-    <_p>
+    <p>
       Packages allows you to install and remove packages on your system.
       You can view and search packages by name, details or even file name
       and also see dependencies of one package on other packages.
       Searching by groups is possible and is an easy way to find software in
       your favorite desktop environment.
-    </_p>
-    <_p>
+    </p>
+    <p>
       Packages uses PackageKit and can work on any distribution using
       the native package management framework.
-    </_p>
+    </p>
   </description>
   <screenshots>
     <screenshot 
type="default">https://git.gnome.org/browse/gnome-packagekit/plain/data/appdata/ss-application.png</screenshot>
diff --git a/po/.gitignore b/po/.gitignore
index 610f080..d5904f3 100644
--- a/po/.gitignore
+++ b/po/.gitignore
@@ -1,10 +1,19 @@
+boldquot.sed
+en@boldquot.header
+en@quot.header
+*.gmo
+insert-header.sin
 Makefile
 Makefile.in
-.intltool-merge-cache
+Makefile.in.in
+Makefile.in.in~
+Makevars.template
+*.po~
+*.pot
 POTFILES
+quot.sed
+remove-potcdate.sed
+remove-potcdate.sin
+Rules-quot
 stamp-it
-*.pot
-*.gmo
-.svn
-Makefile.in.in
-
+stamp-po
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..55b76d7
--- /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 = --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
+# 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 = 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
+#   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 = richard hughsie com
+
+# 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 = --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 b4701ac..d0daa52 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,21 +1,18 @@
-[encoding: UTF-8]
-# List of source files containing translatable strings.
-# Please keep this file sorted alphabetically.
 data/appdata/org.gnome.Packages.appdata.xml.in
 data/appdata/org.gnome.PackageUpdater.appdata.xml.in
 data/org.gnome.Packages.desktop.in
-[type: gettext/glade]src/gpk-application.ui
-[type: gettext/glade]src/gpk-client.ui
-[type: gettext/glade]src/gpk-error.ui
-[type: gettext/glade]src/gpk-eula.ui
+src/gpk-application.ui
+src/gpk-client.ui
+src/gpk-error.ui
+src/gpk-eula.ui
 data/gpk-install-local-file.desktop.in
 data/gpk-log.desktop.in
-[type: gettext/glade]src/gpk-log.ui
+src/gpk-log.ui
 data/gpk-prefs.desktop.in
-[type: gettext/glade]src/gpk-prefs.ui
-[type: gettext/glade]src/gpk-signature.ui
+src/gpk-prefs.ui
+src/gpk-signature.ui
 data/org.gnome.PackageUpdater.desktop.in
-[type: gettext/glade]src/gpk-update-viewer.ui
+src/gpk-update-viewer.ui
 data/org.gnome.packagekit.gschema.xml
 src/gpk-application.c
 src/gpk-common.c


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