[devhelp] build: Stop using intltool



commit 2f7ad2c5160387c701d863a4c9d5a8749a69e5d9
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Thu Nov 10 17:11:08 2016 -0600

    build: Stop using intltool
    
    intltool is deprecated.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774069

 Makefile.am                                 |    4 --
 autogen.sh                                  |    1 -
 configure.ac                                |    3 +-
 data/Makefile.am                            |    9 ++--
 data/org.gnome.Devhelp.appdata.xml.in       |   12 ++--
 data/org.gnome.Devhelp.desktop.in.in        |   10 ++--
 misc/gedit-plugin/Makefile.am               |    4 +-
 misc/gedit-plugin/devhelp.plugin.desktop.in |    5 +-
 po/Makevars                                 |   78 +++++++++++++++++++++++++++
 po/POTFILES.in                              |   12 ++--
 10 files changed, 109 insertions(+), 29 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 0e8351b..93e7ebd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,7 +6,3 @@ AM_DISTCHECK_CONFIGURE_FLAGS =  \
 SUBDIRS = po src data misc contrib docs
 
 EXTRA_DIST = autogen.sh
-
-DISTCLEANFILES = intltool-extract  \
-                intltool-merge    \
-                intltool-update
diff --git a/autogen.sh b/autogen.sh
index 9bf7673..b6efba6 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 45ad8a2..f496e8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,7 +79,8 @@ AC_SUBST(ZLIB_LDFLAGS)
 AC_SUBST(ZLIB_LIBS)
 
 # i18n stuff
-IT_PROG_INTLTOOL([0.40.0])
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.19.7])
 
 GETTEXT_PACKAGE=devhelp
 AC_SUBST(GETTEXT_PACKAGE)
diff --git a/data/Makefile.am b/data/Makefile.am
index 522ad63..72c467c 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -18,15 +18,16 @@ appstream_in_files = org.gnome.Devhelp.appdata.xml.in
 appstream_XML = $(appstream_in_files:.xml.in=.xml)
 @APPSTREAM_XML_RULES@
 
-@INTLTOOL_XML_RULE@
-
-
-@INTLTOOL_DESKTOP_RULE@
+$(appstream_XML): $(appstream_in_files)
+       $(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
 
 desktopdir = $(datadir)/applications
 desktop_in_files = org.gnome.Devhelp.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
+$(desktop_DATA): $(desktop_in_files)
+       $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
+
 dbusservicedir = $(datadir)/dbus-1/services
 dbusservice_DATA = org.gnome.Devhelp.service
 
diff --git a/data/org.gnome.Devhelp.appdata.xml.in b/data/org.gnome.Devhelp.appdata.xml.in
index ff92ca8..369f99f 100644
--- a/data/org.gnome.Devhelp.appdata.xml.in
+++ b/data/org.gnome.Devhelp.appdata.xml.in
@@ -3,18 +3,18 @@
   <id>org.gnome.Devhelp.desktop</id>
   <metadata_license>CC0-1.0</metadata_license>
   <project_license>GPL-2.0+</project_license>
-  <_name>Devhelp</_name>
-  <_summary>Developer's Help program</_summary>
+  <name>Devhelp</name>
+  <summary>Developer's Help program</summary>
   <description>
-    <_p>
+    <p>
       Devhelp is an API documentation browser.
       It provides an easy way to navigate through libraries, search by function,
       struct, or macro.
       It provides a tabbed interface and allows to print results.
-    </_p>
-    <_p>
+    </p>
+    <p>
       Devhelp integrates with other applications such as Glade, Anjuta, or Geany.
-    </_p>
+    </p>
   </description>
   <url type="homepage">https://wiki.gnome.org/Apps/Devhelp/</url>
   <url type="bugtracker">https://bugzilla.gnome.org/enter_bug.cgi?product=devhelp</url>
diff --git a/data/org.gnome.Devhelp.desktop.in.in b/data/org.gnome.Devhelp.desktop.in.in
index 3c61788..5755fbc 100644
--- a/data/org.gnome.Devhelp.desktop.in.in
+++ b/data/org.gnome.Devhelp.desktop.in.in
@@ -1,11 +1,13 @@
 [Desktop Entry]
-_Name=Devhelp
-_Comment=Developer's Help program
-_GenericName=Documentation Browser
-_Keywords=documentation;information;manual;developer;api;
+Name=Devhelp
+Comment=Developer's Help program
+GenericName=Documentation Browser
+# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list 
MUST also end with a semicolon!
+Keywords=documentation;information;manual;developer;api;
 Exec=devhelp
 Terminal=false
 Type=Application
+# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
 Icon=devhelp
 Categories=GNOME;GTK;Development;
 StartupNotify=true
diff --git a/misc/gedit-plugin/Makefile.am b/misc/gedit-plugin/Makefile.am
index 558746f..a97206a 100644
--- a/misc/gedit-plugin/Makefile.am
+++ b/misc/gedit-plugin/Makefile.am
@@ -1,7 +1,9 @@
-@INTLTOOL_DESKTOP_RULE@
 DESKTOP_IN_FILES = devhelp.plugin.desktop.in
 DESKTOP_FILES = devhelp.plugin.desktop
 
+$(DESKTOP_FILES): $(DESKTOP_IN_FILES)
+       $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
+
 plugindir = $(libdir)/gedit/plugins
 plugin_PYTHON = devhelp.py
 plugin_DATA = devhelp.plugin
diff --git a/misc/gedit-plugin/devhelp.plugin.desktop.in b/misc/gedit-plugin/devhelp.plugin.desktop.in
index cac9c4e..3a4d585 100644
--- a/misc/gedit-plugin/devhelp.plugin.desktop.in
+++ b/misc/gedit-plugin/devhelp.plugin.desktop.in
@@ -2,9 +2,10 @@
 Loader=python3
 Module=devhelp
 IAge=3
-_Name=Devhelp support
-_Description=Makes F2 bring up Devhelp for the word at the cursor
+Name=Devhelp support
+Description=Makes F2 bring up Devhelp for the word at the cursor
 Authors=Richard Hult
+# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
 Icon=devhelp
 Copyright=Copyright © 2006 Richard Hult
 Website=https://wiki.gnome.org/Apps/Devhelp
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..6800e27
--- /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 --add-comments
+
+# 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 = 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 =
+
+# 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 = yes
+
+# 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 72ed081..936328b 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -2,14 +2,14 @@
 # Please keep this file sorted alphabetically.
 data/org.gnome.Devhelp.appdata.xml.in
 data/org.gnome.Devhelp.desktop.in.in
-[type: gettext/gsettings]data/org.gnome.devhelp.gschema.xml
+data/org.gnome.devhelp.gschema.xml
 misc/gedit-plugin/devhelp.plugin.desktop.in
 misc/gedit-plugin/devhelp.py
-[type: gettext/glade]src/devhelp-menu.ui
-[type: gettext/glade]src/help-overlay.ui
+src/devhelp-menu.ui
+src/help-overlay.ui
 src/dh-app.c
 src/dh-assistant.c
-[type: gettext/glade]src/dh-assistant.ui
+src/dh-assistant.ui
 src/dh-assistant-view.c
 src/dh-book.c
 src/dh-book-tree.c
@@ -17,8 +17,8 @@ src/dh-keyword-model.c
 src/dh-link.c
 src/dh-main.c
 src/dh-parser.c
-[type: gettext/glade]src/dh-preferences.ui
+src/dh-preferences.ui
 src/dh-sidebar.c
 src/dh-util.c
 src/dh-window.c
-[type: gettext/glade]src/dh-window.ui
+src/dh-window.ui


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