[iagno] Gettext migration (bgo#793040)



commit d22f560ac80d0ded2cb3a38cb10a65e17ead3850
Author: Robert Roth <robert roth off gmail com>
Date:   Wed Jan 31 08:47:14 2018 +0200

    Gettext migration (bgo#793040)

 configure.ac                       |    3 +-
 data/Makefile.am                   |    7 ++-
 data/iagno.appdata.xml.in          |   16 ++++----
 data/iagno.desktop.in              |   16 ++++---
 data/themes/Makefile.am            |    4 +-
 data/themes/adwaita.theme.in       |    2 +-
 data/themes/classic.theme.in       |    2 +-
 data/themes/high_contrast.theme.in |    2 +-
 data/themes/sun_and_star.theme.in  |    2 +-
 po/Makevars                        |   78 ++++++++++++++++++++++++++++++++++++
 po/POTFILES.in                     |   17 ++++----
 11 files changed, 115 insertions(+), 34 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8b0ab35..5f04782 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,7 +48,8 @@ dnl ###########################################################################
 dnl Internationalization
 dnl ###########################################################################
 
-IT_PROG_INTLTOOL([0.50])
+AM_GNU_GETTEXT_VERSION([0.19.8])
+AM_GNU_GETTEXT([external])
 AC_SUBST(GETTEXT_PACKAGE, iagno)
 
 dnl ###########################################################################
diff --git a/data/Makefile.am b/data/Makefile.am
index 7efacf4..4f777a7 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -23,12 +23,13 @@ sounds_DATA = \
 desktopdir = $(datadir)/applications
 desktop_in_files = iagno.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 = iagno.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 $@
 
 gsettings_SCHEMAS = org.gnome.iagno.gschema.xml
 @GSETTINGS_RULES@
diff --git a/data/iagno.appdata.xml.in b/data/iagno.appdata.xml.in
index 05c1732..dc1b917 100644
--- a/data/iagno.appdata.xml.in
+++ b/data/iagno.appdata.xml.in
@@ -4,25 +4,25 @@
   <id>iagno.desktop</id>
   <metadata_license>CC0-1.0</metadata_license>
   <project_license>GPL-3.0+</project_license>
-  <_name>Iagno</_name>
-  <_summary>Dominate the board in a classic version of Reversi</_summary>
+  <name>Iagno</name>
+  <summary>Dominate the board in a classic version of Reversi</summary>
   <description>
-    <_p>
+    <p>
       Iagno is a computer version of the game Reversi, a two-player strategy
       board game. The game is played with tiles that are dark on one side and
       light on the other.
-    </_p>
-    <_p>
+    </p>
+    <p>
       The object of Iagno is to flip as many of your opponent’s tiles to your
       color as possible while preventing your opponent from flipping your tiles
       to his color. This is done by trapping your opponent’s tiles between two
       tiles of your own color.
-    </_p>
+    </p>
   </description>
   <screenshots>
     <screenshot height="447" width="700" type="default">
       <image>https://people.gnome.org/~mcatanzaro/iagno.png</image>
-      <_caption>A GNOME Iagno game preview</_caption>
+      <caption>A GNOME Iagno game preview</caption>
     </screenshot>
   </screenshots>
   <url type="homepage">https://wiki.gnome.org/Apps/Iagno</url>
@@ -38,7 +38,7 @@
     <kudo>UserDocs</kudo>
   </kudos>
   <translation type="gettext">iagno</translation>
-  <_developer_name>The GNOME Project</_developer_name>
+  <developer_name>The GNOME Project</developer_name>
   <content_rating type="oars-1.0">
     <content_attribute id="violence-cartoon">none</content_attribute>
     <content_attribute id="violence-fantasy">none</content_attribute>
diff --git a/data/iagno.desktop.in b/data/iagno.desktop.in
index c1fb78a..ffbbfdf 100644
--- a/data/iagno.desktop.in
+++ b/data/iagno.desktop.in
@@ -1,9 +1,11 @@
 [Desktop Entry]
+# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
 Icon=iagno
-_Name=Iagno
-_GenericName=Reversi
-_Comment=Dominate the board in a classic version of Reversi
-_Keywords=reversi;othello;
+Name=Iagno
+GenericName=Reversi
+Comment=Dominate the board in a classic version of Reversi
+# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list 
MUST also end with a semicolon!
+Keywords=reversi;othello;
 Exec=iagno
 Terminal=false
 Type=Application
@@ -12,13 +14,13 @@ StartupNotify=true
 Actions=First;Second;TwoPlayers;
 
 [Desktop Action First]
-_Name=Play first (Dark)
+Name=Play first (Dark)
 Exec=iagno --first
 
 [Desktop Action Second]
-_Name=Play second (Light)
+Name=Play second (Light)
 Exec=iagno --second
 
 [Desktop Action TwoPlayers]
-_Name=Two players game
+Name=Two players game
 Exec=iagno --two-players
diff --git a/data/themes/Makefile.am b/data/themes/Makefile.am
index 1f7b15e..ff8ec59 100644
--- a/data/themes/Makefile.am
+++ b/data/themes/Makefile.am
@@ -6,8 +6,8 @@ themes_key_in_files = \
        sun_and_star.theme.in
 themes_key_DATA = $(themes_key_in_files:.theme.in=.theme)
 
-%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po)
-       $(AM_V_GEN) LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache 
$(top_srcdir)/po $< $@
+%.theme: %.theme.in
+       $(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
 
 EXTRA_DIST = $(themes_key_in_files)
 
diff --git a/data/themes/adwaita.theme.in b/data/themes/adwaita.theme.in
index cdef55f..396e540 100644
--- a/data/themes/adwaita.theme.in
+++ b/data/themes/adwaita.theme.in
@@ -1,6 +1,6 @@
 [Theme]
 Id=adwaita
-_Name=Adwaita
+Name=Adwaita
 
 [Pieces]
 #Animated=True
diff --git a/data/themes/classic.theme.in b/data/themes/classic.theme.in
index 301e0ba..8b25217 100644
--- a/data/themes/classic.theme.in
+++ b/data/themes/classic.theme.in
@@ -1,6 +1,6 @@
 [Theme]
 Id=classic
-_Name=Classic
+Name=Classic
 
 [Pieces]
 #Animated=True
diff --git a/data/themes/high_contrast.theme.in b/data/themes/high_contrast.theme.in
index 8100936..fb8f833 100644
--- a/data/themes/high_contrast.theme.in
+++ b/data/themes/high_contrast.theme.in
@@ -1,6 +1,6 @@
 [Theme]
 Id=high_contrast
-_Name=Black and White
+Name=Black and White
 
 [Pieces]
 #Animated=True
diff --git a/data/themes/sun_and_star.theme.in b/data/themes/sun_and_star.theme.in
index bb1020c..f6d931f 100644
--- a/data/themes/sun_and_star.theme.in
+++ b/data/themes/sun_and_star.theme.in
@@ -1,6 +1,6 @@
 [Theme]
 Id=sun_and_star
-_Name=Sun and Star
+Name=Sun and Star
 
 [Pieces]
 #Animated=True
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..e995ef5
--- /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 = Iagno Contributors
+
+# 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 = 
https://bugzilla.gnome.org/enter_bug.cgi?product=iagno&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 =
+
+# 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 51a9955..5b38102 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,16 +1,15 @@
 # List of source files containing translatable strings.
 # Please keep this file in alphabetical order.
-[encoding: UTF-8]
 data/iagno.appdata.xml.in
 data/iagno.desktop.in
-[type: gettext/glade]data/iagno-menus.ui
-[type: gettext/glade]data/iagno-screens.ui
-[type: gettext/glade]data/iagno-themes.ui
-[type: gettext/glade]data/iagno.ui
-[type: gettext/ini]data/themes/adwaita.theme.in
-[type: gettext/ini]data/themes/classic.theme.in
-[type: gettext/ini]data/themes/high_contrast.theme.in
-[type: gettext/ini]data/themes/sun_and_star.theme.in
+data/iagno-menus.ui
+data/iagno-screens.ui
+data/iagno-themes.ui
+data/iagno.ui
+data/themes/adwaita.theme.in
+data/themes/classic.theme.in
+data/themes/high_contrast.theme.in
+data/themes/sun_and_star.theme.in
 data/org.gnome.iagno.gschema.xml
 src/computer-player.vala
 src/game.vala


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