[polari] build: Say good-bye to intltool



commit b1cc018f7efdf3084e1fabe2dde2d2ad9a80d51d
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Apr 22 23:33:01 2016 +0200

    build: Say good-bye to intltool
    
    intltool is unmaintained nowadays while upstream gettext gained
    support for everything we used it for, so make the switch.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=765445

 .gitignore                                   |    3 +-
 autogen.sh                                   |    1 -
 configure.ac                                 |   10 ++--
 data/Makefile.am                             |    3 +-
 data/appdata/Makefile.am                     |    4 +-
 data/appdata/org.gnome.Polari.appdata.xml.in |   12 ++--
 data/org.gnome.Polari.desktop.in             |    6 +-
 po/Makevars                                  |   68 ++++++++++++++++++++++++++
 po/POTFILES.in                               |   18 +++---
 9 files changed, 98 insertions(+), 27 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 3702ae4..ea2789b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,13 +34,12 @@ po/*.gmo
 po/*.header
 po/*.sed
 po/*.sin
-po/.intltool-merge-cache
 po/Makefile.in.in
 po/Makevars.template
 po/POTFILES
 po/Rules-quot
 po/polari.pot
-po/stamp-it
+po/stamp-po
 src/*.gresource
 src/config.js
 src/polari-accounts
diff --git a/autogen.sh b/autogen.sh
index a5fa458..2dce119 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -24,7 +24,6 @@ if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
 fi
 
 aclocal --install || exit 1
-intltoolize --force --copy --automake || exit 1
 autoreconf --verbose --force --install -Wno-portability || exit 1
 
 cd $olddir
diff --git a/configure.ac b/configure.ac
index 5a72e65..eb91bbd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,10 +11,6 @@ AM_INIT_AUTOMAKE([1.11 check-news dist-xz no-dist-gzip tar-ustar foreign subdir-
 AM_SILENT_RULES([yes])
 AM_MAINTAINER_MODE([enable])
 
-GETTEXT_PACKAGE=AC_PACKAGE_NAME
-AC_SUBST(GETTEXT_PACKAGE)
-IT_PROG_INTLTOOL([0.50.0])
-
 GOBJECT_INTROSPECTION_REQUIRE([0.9.6])
 
 AX_CHECK_ENABLE_DEBUG([yes])
@@ -23,6 +19,12 @@ AX_COMPILER_FLAGS()
 
 AC_PROG_CC
 
+GETTEXT_PACKAGE=AC_PACKAGE_NAME
+AC_SUBST(GETTEXT_PACKAGE)
+
+AM_GNU_GETTEXT_VERSION([0.19.6])
+AM_GNU_GETTEXT([external])
+
 # Initialize libtool
 AM_PROG_AR
 LT_PREREQ([2.2])
diff --git a/data/Makefile.am b/data/Makefile.am
index a3fd601..c3c21fd 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -4,7 +4,8 @@ desktopdir = $(datadir)/applications
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 desktop_in_files = $(APP_ID).desktop.in
 
- INTLTOOL_DESKTOP_RULE@
+%.desktop: %.desktop.in Makefile
+       $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
 
 servicedir = $(datadir)/dbus-1/services
 service_DATA = $(service_in_files:.service.in=.service)
diff --git a/data/appdata/Makefile.am b/data/appdata/Makefile.am
index 1323cbf..4e282fb 100644
--- a/data/appdata/Makefile.am
+++ b/data/appdata/Makefile.am
@@ -1,8 +1,10 @@
- INTLTOOL_XML_RULE@
 @APPSTREAM_XML_RULES@
 
 appstream_in_files = $(APP_ID).appdata.xml.in
 appstream_XML = $(appstream_in_files:.xml.in=.xml)
 
+%.xml: %.xml.in Makefile
+       $(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
+
 EXTRA_DIST = $(appstream_in_files)
 CLEANFILES = $(appstream_XML)
diff --git a/data/appdata/org.gnome.Polari.appdata.xml.in b/data/appdata/org.gnome.Polari.appdata.xml.in
index 9ac5c76..9eecd70 100644
--- a/data/appdata/org.gnome.Polari.appdata.xml.in
+++ b/data/appdata/org.gnome.Polari.appdata.xml.in
@@ -4,21 +4,21 @@
   <id>org.gnome.Polari.desktop</id>
   <metadata_license>CC0-1.0</metadata_license>
   <project_license>GPL-2.0+ and LGPL-2.1+</project_license>
-  <_name>Polari</_name>
-  <_summary>An Internet Relay Chat Client for GNOME</_summary>
+  <name>Polari</name>
+  <summary>An Internet Relay Chat Client for GNOME</summary>
   <description>
-    <_p>
+    <p>
       A simple Internet Relay Chat (IRC) client that is designed to integrate
       seamlessly with GNOME; it features a simple and beautiful interface which
       allows you to focus on your conversations.
-    </_p>
-    <_p>
+    </p>
+    <p>
       You can use Polari to publicly chat with people in a channel, and to
       have private one-to-one conversations. Notifications make sure that
       you never miss an important message - for private conversations,
       they even allow you to reply instantly without switching back to the
       application!
-    </_p>
+    </p>
   </description>
   <screenshots>
     <screenshot type="default">
diff --git a/data/org.gnome.Polari.desktop.in b/data/org.gnome.Polari.desktop.in
index 56095dd..9d6d2e5 100644
--- a/data/org.gnome.Polari.desktop.in
+++ b/data/org.gnome.Polari.desktop.in
@@ -1,6 +1,6 @@
 [Desktop Entry]
-_Name=Polari
-_Comment=An Internet Relay Chat Client for GNOME
+Name=Polari
+Comment=An Internet Relay Chat Client for GNOME
 Exec=gapplication launch org.gnome.Polari
 Icon=org.gnome.Polari
 Type=Application
@@ -9,4 +9,4 @@ StartupNotify=true
 DBusActivatable=true
 X-GNOME-UsesNotifications=true
 Categories=GNOME;GTK;Network;IRCClient;
-_Keywords=IRC;Internet;Relay;Chat;
+Keywords=IRC;Internet;Relay;Chat;
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..87e266d
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,68 @@
+# 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 \
+        --flag=g_dngettext:2:pass-c-format \
+        --flag=g_strdup_printf:1:c-format \
+        --flag=g_string_printf:2:c-format \
+        --flag=g_string_append_printf:2:c-format \
+        --flag=g_error_new:3:c-format \
+        --flag=g_set_error:4:c-format \
+        --flag=g_markup_printf_escaped:1:c-format \
+        --flag=g_log:3:c-format \
+        --flag=g_print:1:c-format \
+        --flag=g_printerr:1:c-format \
+        --flag=g_printf:1:c-format \
+        --flag=g_fprintf:2:c-format \
+        --flag=g_sprintf:2:c-format \
+        --flag=g_snprintf:3:c-format
+
+
+# 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 = Translation copyright holder
+# 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 = 
http://bugzilla.gnome.org/enter_bug.cgi?product=polari&keywords=I18N+L10N&component=general
+
+# 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 =
+
+# Ignore the timestamp of the .pot file, as git clones do not have
+# deterministic timestamps, and .po files are updated by translators
+# (only) in GNOME projects.
+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 cd8c721..c011eeb 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,15 +1,15 @@
 data/appdata/org.gnome.Polari.appdata.xml.in
 data/org.gnome.Polari.desktop.in
 data/org.gnome.Polari.gschema.xml
-[type: gettext/glade]data/resources/connection-details.ui
-[type: gettext/glade]data/resources/connection-properties.ui
-[type: gettext/glade]data/resources/entry-area.ui
-[type: gettext/glade]data/resources/help-overlay.ui
-[type: gettext/glade]data/resources/join-room-dialog.ui
-[type: gettext/glade]data/resources/main-window.ui
-[type: gettext/glade]data/resources/menus.ui
-[type: gettext/glade]data/resources/room-list-header.ui
-[type: gettext/glade]data/resources/user-list-details.ui
+data/resources/connection-details.ui
+data/resources/connection-properties.ui
+data/resources/entry-area.ui
+data/resources/help-overlay.ui
+data/resources/join-room-dialog.ui
+data/resources/main-window.ui
+data/resources/menus.ui
+data/resources/room-list-header.ui
+data/resources/user-list-details.ui
 src/application.js
 src/appNotifications.js
 src/chatView.js


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