[pan2/nuke-intltool] Nuke intltool



commit 3fd9edc9c0d3f70b6bdf803abc7ad85005b81eff
Author: Petr Kovar <pknbe volny cz>
Date:   Tue Mar 21 23:51:56 2017 +0100

    Nuke intltool
    
    Cf. https://wiki.gnome.org/MigratingFromIntltoolToGettext

 .gitignore         |   23 +++++++++------
 Makefile.am        |   32 ++++++++++-----------
 configure.ac       |    5 ++-
 pan.appdata.xml.in |   14 ++++----
 pan.desktop.in     |    9 +++--
 po/Makevars        |   78 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 po/POTFILES.in     |    3 +-
 po/POTFILES.skip   |    3 +-
 8 files changed, 126 insertions(+), 41 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 9caf952..d47f0f4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
 *~
+ABOUT-NLS
 aclocal.m4
 autom4te.cache
 *.bak
@@ -9,34 +10,38 @@ config.guess
 config.h
 config.h.in
 config.log
+config.rpath
 config.status
 config.sub
 configure
 depcomp
 .deps
-gnome-doc-utils.m4
-gnome-doc-utils.make
 INSTALL
 install-sh
-intltool-*
+m4/
 Makefile
 Makefile.in*
 missing
 mkinstalldirs
 pan.desktop
-pan.iss
 pan-git.version
-pan/data/decode-test-cache/Makefile
 pan/icons/pan-pixbufs.h
 pan/icons/pan-pixbufs-internal.h
+pan.iss
+po/boldquot.sed
+po/en@boldquot.header
+po/en@quot.header
 po/*.gmo
-po/Makefile
-po/Makefile.in.in
+po/insert-header.sin
+po/Makevars.template
+po/pan.pot
 po/POTFILES
-po/stamp-it
+po/quot.sed
+po/remove-potcdate.sin
+po/Rules-quot
+po/stamp-po
 README.windows
 stamp-h1
 Thumbs.db
 .waf*/
 waf*/
-
diff --git a/Makefile.am b/Makefile.am
index 6d23e4f..4e7731a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,24 +1,23 @@
-SUBDIRS = po uulib pan
+SUBDIRS = . uulib pan po
 
+pan.desktop: pan.desktop.in
+       $(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
 desktopdir = $(datadir)/applications
-desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
-desktop_in_files = pan.desktop.in
-@INTLTOOL_DESKTOP_RULE@
+desktop_DATA = pan.desktop
 
-@INTLTOOL_XML_RULE@
+pan.appdata.xml: pan.appdata.xml.in
+       $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
 appdatadir = $(datadir)/appdata
-appdata_DATA = $(appdata_in_files:.xml.in=.xml)
-appdata_in_files = pan.appdata.xml.in
+appdata_DATA = pan.appdata.xml
 
 CLEANFILES = \
- $(srcdir)/pan.appdata.xml \
+ pan.appdata.xml \
+ pan.desktop \
  $(appdata_DATA)
 
 DISTCLEANFILES = \
- $(srcdir)/intltool-extract \
- $(srcdir)/intltool-merge \
- $(srcdir)/intltool-update \
- $(desktop_DATA)
+ pan.appdata.xml \
+ pan.desktop
 
 MAINTAINERCLEANFILES = \
  $(srcdir)/INSTALL \
@@ -31,7 +30,6 @@ MAINTAINERCLEANFILES = \
  $(srcdir)/install-sh \
  $(srcdir)/missing \
  $(srcdir)/mkinstalldirs \
- $(srcdir)/po/Makefile.in.in \
  `find "$(srcdir)" -type f -name Makefile.in -print` \
  $(NULL)
 
@@ -39,11 +37,11 @@ EXTRA_DIST = \
  README \
  README.windows \
  Pan.ico \
+ pan.appdata.xml.in \
+ pan.desktop.in \
  pan.png \
- $(appdata_in_files) \
- $(desktop_in_files) \
- intltool-extract.in intltool-merge.in intltool-update.in \
- pan-git.version
+ pan-git.version \
+ $(NULL)
 
 icon_DATA = pan.png
 icondir = $(datadir)/pixmaps
diff --git a/configure.ac b/configure.ac
index 23675d9..29d13c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -88,10 +88,11 @@ dnl for libuu
 AC_CHECK_HEADERS([errno.h fcntl.h])
 
 dnl I18n support
-IT_PROG_INTLTOOL([0.40.6])
 GETTEXT_PACKAGE=pan
 AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[gettext package name])
+AM_GNU_GETTEXT_VERSION([0.19.7])
+AM_GNU_GETTEXT([external])
+AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Gettext Package])
 panlocaledir=[${datadir}/locale]
 
 dnl libz for xzver
diff --git a/pan.appdata.xml.in b/pan.appdata.xml.in
index f2db8f3..08c5be0 100644
--- a/pan.appdata.xml.in
+++ b/pan.appdata.xml.in
@@ -2,23 +2,23 @@
 <component type="desktop">
   <id>pan.desktop</id>
   <metadata_license>CC0-1.0</metadata_license>
-  <_name>Pan Newsreader</_name>
-  <_summary>Read and post Usenet articles</_summary>
+  <name>Pan Newsreader</name>
+  <summary>Read and post Usenet articles</summary>
   <description>
-  <_p>
+  <p>
   Pan is a Usenet newsreader that is good at both text and binaries. It supports
   offline reading, scoring and killfiles, yEnc, NZB, PGP handling, multiple
   servers, and secure connections.
-  </_p>
-  <_p>
+  </p>
+  <p>
   It is also the only Unix newsreader to get a perfect score on the Good
   Net-Keeping Seal of Approval evaluations.
-  </_p>
+  </p>
   </description>
   <screenshots>
     <screenshot height="1127" width="637" type="default">
       <image>http://pan.rebelbase.com/screenshots/pan-140.png</image>
-      <!--<_caption>Pan: main window</_caption>-->
+      <!--<caption>Pan: main window</caption>-->
     </screenshot>
   </screenshots>
   <url type="homepage">http://pan.rebelbase.com/</url>
diff --git a/pan.desktop.in b/pan.desktop.in
index 3645703..8d13868 100644
--- a/pan.desktop.in
+++ b/pan.desktop.in
@@ -1,10 +1,11 @@
 [Desktop Entry]
-_Name=Pan
-_GenericName=Newsreader
-_Comment=Read and post Usenet articles
+Name=Pan
+GenericName=Newsreader
+Comment=Read and post Usenet articles
 # Translators: Search terms to find this application. Do NOT translate or localise the semicolons! The list 
MUST also end with a semicolon!
-_Keywords=usenet;news;newsreader;newsgroup;article;yenc;nzb;
+Keywords=usenet;news;newsreader;newsgroup;article;yenc;nzb;
 Exec=pan
+# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
 Icon=pan
 Terminal=false
 Type=Application
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..8468342
--- /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 =
+
+# 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 a5a4cfd..70c513f 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,4 +1,5 @@
-[encoding: UTF-8]
+# List of source files containing translatable strings.
+# Please keep this file sorted alphabetically.
 pan.appdata.xml.in
 pan.desktop.in
 pan/data/article-cache.cc
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 2cb4f40..c07d731 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,2 +1,3 @@
-# List of source files to be ignored
+# List of source files that should *not* be translated.
+# Please keep this file sorted alphabetically.
 uulib/uuencode.c


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