[gnome-sudoku] Stop using intltool



commit f2cfa38f099f153f8b5710f140842df017b653f2
Author: Sahil Sareen <sahil sareen hotmail com>
Date:   Sun Nov 6 09:12:40 2016 +0000

    Stop using intltool

 autogen.sh                       |    1 -
 configure.ac                     |    6 ++-
 data/Makefile.am                 |   14 ++++--
 data/gnome-sudoku.appdata.xml.in |   20 +++++-----
 data/gnome-sudoku.desktop.in     |    6 +-
 git.mk                           |    2 +
 po/Makevars                      |   78 ++++++++++++++++++++++++++++++++++++++
 po/POTFILES.in                   |    7 +--
 8 files changed, 109 insertions(+), 25 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 60d0584..6ef8fc6 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -32,7 +32,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 5a4016c..45510c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,8 +68,10 @@ dnl ###########################################################################
 dnl Internationalization
 dnl ###########################################################################
 
-IT_PROG_INTLTOOL([0.50])
-AC_SUBST(GETTEXT_PACKAGE, gnome-sudoku)
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.19.8])
+
+AC_SUBST([GETTEXT_PACKAGE], [gnome-sudoku])
 
 dnl ###########################################################################
 dnl Documentation
diff --git a/data/Makefile.am b/data/Makefile.am
index a81c2fa..76f925b 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,17 +1,18 @@
 SUBDIRS = icons
 
-gsettings_SCHEMAS = org.gnome.sudoku.gschema.xml
-@GSETTINGS_RULES@
-
 desktopdir = $(datadir)/applications
 desktop_in_files = gnome-sudoku.desktop.in
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
-@INTLTOOL_DESKTOP_RULE@
+
+$(desktop_DATA): $(desktop_in_files)
+       $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
 
 appstream_in_files = gnome-sudoku.appdata.xml.in
 appstream_XML = $(appstream_in_files:.xml.in=.xml)
 @APPSTREAM_XML_RULES@
-@INTLTOOL_XML_RULE@
+
+$(appstream_XML): $(appstream_in_files)
+       $(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
 
 pixmapdir = $(datadir)/gnome-sudoku/images/
 pixmap_DATA = footprints.png
@@ -23,6 +24,9 @@ dist_noinst_DATA = \
        print-dialog.ui \
        gnome-sudoku.css
 
+gsettings_SCHEMAS = org.gnome.sudoku.gschema.xml
+@GSETTINGS_RULES@
+
 man_MANS = gnome-sudoku.6
 
 EXTRA_DIST = \
diff --git a/data/gnome-sudoku.appdata.xml.in b/data/gnome-sudoku.appdata.xml.in
index 6a83411..80520b4 100644
--- a/data/gnome-sudoku.appdata.xml.in
+++ b/data/gnome-sudoku.appdata.xml.in
@@ -4,30 +4,30 @@
   <id>gnome-sudoku.desktop</id>
   <metadata_license>CC0-1.0</metadata_license>
   <project_license>GPL-3.0+</project_license>
-  <_name>GNOME Sudoku</_name>
-  <_summary>Test your logic skills in this number grid puzzle</_summary>
+  <name>GNOME Sudoku</name>
+  <summary>Test your logic skills in this number grid puzzle</summary>
   <description>
-    <_p>
+    <p>
       Play the popular Japanese logic game. GNOME Sudoku is a must-install for
       Sudoku lovers, with a simple, unobtrusive interface that makes playing
       Sudoku fun for players of any skill level.
-    </_p>
-    <_p>
+    </p>
+    <p>
       Each game is assigned a difficulty similar to those given by newspapers
       and websites, so your game will be as easy or as difficult as you want it
       to be.
-    </_p>
-    <_p>
+    </p>
+    <p>
       If you like to play on paper, you can print games out. You can choose how
       many games you want to print per page and what difficulty of games you
       want to print: as a result, GNOME Sudoku can act a renewable Sudoku book
       for you.
-    </_p>
+    </p>
   </description>
   <screenshots>
     <screenshot height="577" width="748" type="default">
       <image>https://people.gnome.org/~mcatanzaro/gnome-sudoku.png</image>
-      <_caption>A GNOME sudoku game preview</_caption>
+      <caption>A GNOME sudoku game preview</caption>
     </screenshot>
   </screenshots>
   <url type="homepage">https://wiki.gnome.org/Apps/Sudoku</url>
@@ -44,5 +44,5 @@
     <kudo>UserDocs</kudo>
   </kudos>
   <translation type="gettext">gnome-sudoku</translation>
-  <_developer_name>The GNOME Project</_developer_name>
+  <developer_name>The GNOME Project</developer_name>
 </component>
diff --git a/data/gnome-sudoku.desktop.in b/data/gnome-sudoku.desktop.in
index 5f74ad7..216a628 100644
--- a/data/gnome-sudoku.desktop.in
+++ b/data/gnome-sudoku.desktop.in
@@ -1,7 +1,7 @@
 [Desktop Entry]
-_Name=Sudoku
-_Comment=Test your logic skills in this number grid puzzle
-_Keywords=magic;square;
+Name=Sudoku
+Comment=Test your logic skills in this number grid puzzle
+Keywords=magic;square;
 Exec=gnome-sudoku
 Icon=gnome-sudoku
 Terminal=false
diff --git a/git.mk b/git.mk
index 5467b86..7b5c1ca 100644
--- a/git.mk
+++ b/git.mk
@@ -83,6 +83,7 @@ GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL = \
                ar-lib \
                compile \
                config.guess \
+               config.rpath \
                config.sub \
                depcomp \
                install-sh \
@@ -196,6 +197,7 @@ $(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
                fi; \
                if test -f $(srcdir)/po/Makefile.in.in; then \
                        for x in \
+                               ABOUT-NLS \
                                po/Makefile.in.in \
                                po/Makefile.in.in~ \
                                po/Makefile.in \
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..da1fabe
--- /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 = 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 =
+
+# 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
\ No newline at end of file
diff --git a/po/POTFILES.in b/po/POTFILES.in
index dc49213..795d7e9 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,12 +1,11 @@
 # List of source files containing translatable strings.
 # Please keep this file in alphabetical order.
-[encoding: UTF-8]
 data/gnome-sudoku.appdata.xml.in
 data/gnome-sudoku.desktop.in
-[type: gettext/glade]data/gnome-sudoku-menu.ui
-[type: gettext/glade]data/gnome-sudoku.ui
+data/gnome-sudoku-menu.ui
+data/gnome-sudoku.ui
 data/org.gnome.sudoku.gschema.xml
-[type: gettext/glade]data/print-dialog.ui
+data/print-dialog.ui
 lib/sudoku-game.vala
 lib/sudoku-board.vala
 src/gnome-sudoku.vala


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