[gnome-games] build: Migrate from intltool to gettext
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] build: Migrate from intltool to gettext
- Date: Fri, 29 Jun 2018 13:37:53 +0000 (UTC)
commit ab7bed753635b1ba53551b56797a9b6a8ec34eb8
Author: Denis Ollier <larchunix users noreply github com>
Date: Sun May 6 18:34:15 2018 +0200
build: Migrate from intltool to gettext
autogen.sh | 1 -
configure.ac | 3 +-
data/Makefile.am | 6 ++-
data/org.gnome.Games.appdata.xml.in | 22 +++++------
data/org.gnome.Games.desktop.in | 8 ++--
po/Makevars | 78 +++++++++++++++++++++++++++++++++++++
po/POTFILES.in | 40 +++++++++----------
7 files changed, 119 insertions(+), 39 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index c0175f5..b928005 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -24,7 +24,6 @@ set -x
#aclocal --install || exit 1
#glib-gettextize --force --copy || exit 1
#gtkdocize --copy || exit 1
-intltoolize --force --copy --automake || exit 1
autoreconf --verbose --force --install -Wno-portability || exit 1
set +x
diff --git a/configure.ac b/configure.ac
index f6c6580..c15f91e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,8 @@ AC_INIT([gnome-games], [3.29.1])
AM_INIT_AUTOMAKE([foreign subdir-objects tar-ustar no-dist-gzip dist-xz])
# i18 support
-IT_PROG_INTLTOOL(0.40.0)
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.19.6])
GETTEXT_PACKAGE=AC_PACKAGE_NAME
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The name of the gettext domain])
diff --git a/data/Makefile.am b/data/Makefile.am
index a9fa5ef..18a6e3e 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -3,12 +3,14 @@ SUBDIRS = icons options
appdatadir = $(datadir)/metainfo
appdata_in_files = org.gnome.Games.appdata.xml.in
appdata_DATA = $(appdata_in_files:.appdata.xml.in=.appdata.xml)
-@INTLTOOL_XML_RULE@
+$(appdata_DATA): $(appdata_in_files)
+ $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
desktopdir = $(datadir)/applications
desktop_in_files = org.gnome.Games.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 $@
gsettings_SCHEMAS = org.gnome.Games.gschema.xml
@GSETTINGS_RULES@
diff --git a/data/org.gnome.Games.appdata.xml.in b/data/org.gnome.Games.appdata.xml.in
index 0d55ca2..db7bb62 100644
--- a/data/org.gnome.Games.appdata.xml.in
+++ b/data/org.gnome.Games.appdata.xml.in
@@ -3,26 +3,26 @@
<id>org.gnome.Games.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0+</project_license>
- <_name>Games</_name>
- <_summary>Simple game launcher for GNOME</_summary>
+ <name>Games</name>
+ <summary>Simple game launcher for GNOME</summary>
<description>
- <_p>
+ <p>
Games is a GNOME 3 application to browse your video games library and to
easily pick and play a game from it. It aims to do for games what Music
already does for your music library.
- </_p>
- <_p>
+ </p>
+ <p>
You want to install Games if you just want a very simple and comfortable
way to play your games and you don’t need advanced features such as
speedrunning tools or video game development tools.
- </_p>
- <_p>Features:</_p>
+ </p>
+ <p>Features:</p>
<ul>
- <_li>List your installed games, your Steam games, your game ROMs…</_li>
- <_li>Search in your games collection</_li>
- <_li>Play your games</_li>
- <_li>Resume your game to where you left it</_li>
+ <li>List your installed games, your Steam games, your game ROMs…</li>
+ <li>Search in your games collection</li>
+ <li>Play your games</li>
+ <li>Resume your game to where you left it</li>
</ul>
</description>
diff --git a/data/org.gnome.Games.desktop.in b/data/org.gnome.Games.desktop.in
index 749e1b6..4ecaabf 100644
--- a/data/org.gnome.Games.desktop.in
+++ b/data/org.gnome.Games.desktop.in
@@ -1,8 +1,8 @@
[Desktop Entry]
-_Name=Games
-_GenericName=Video game player
-_Comment=View and play your video games collection
-_Keywords=game;videogame;video game;player;
+Name=Games
+GenericName=Video game player
+Comment=View and play your video games collection
+Keywords=game;videogame;video game;player;
Exec=gnome-games %U
Icon=org.gnome.Games
Terminal=false
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..eb64998
--- /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 = GNOME Games 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://gitlab.gnome.org/GNOME/gnome-games/issues
+
+# 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 4d070c6..d5b0497 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -3,26 +3,26 @@
data/org.gnome.Games.appdata.xml.in
data/org.gnome.Games.desktop.in
data/org.gnome.Games.gschema.xml
-[type: gettext/glade]data/ui/collection-box.ui
-[type: gettext/glade]data/ui/collection-header-bar.ui
-[type: gettext/glade]data/ui/display-header-bar.ui
-[type: gettext/glade]data/ui/dummy-display.ui
-[type: gettext/glade]data/ui/empty-collection.ui
-[type: gettext/glade]data/ui/gamepad-configurer.ui
-[type: gettext/glade]data/ui/gamepad-mapper.ui
-[type: gettext/glade]data/ui/keyboard-configurer.ui
-[type: gettext/glade]data/ui/keyboard-mapper.ui
-[type: gettext/glade]data/ui/media-menu-button.ui
-[type: gettext/glade]data/ui/preferences-page-controllers.ui
-[type: gettext/glade]data/ui/preferences-page-plugins.ui
-[type: gettext/glade]data/ui/preferences-page-video.ui
-[type: gettext/glade]data/ui/preferences-window.ui
-[type: gettext/glade]data/ui/quit-dialog.ui
-[type: gettext/glade]data/ui/remote-display.ui
-[type: gettext/glade]data/ui/reset-controller-mapping-dialog.ui
-[type: gettext/glade]data/ui/resume-dialog.ui
-[type: gettext/glade]data/ui/resume-failed-dialog.ui
-[type: gettext/glade]data/ui/shortcuts-window.ui
+data/ui/collection-box.ui
+data/ui/collection-header-bar.ui
+data/ui/display-header-bar.ui
+data/ui/dummy-display.ui
+data/ui/empty-collection.ui
+data/ui/gamepad-configurer.ui
+data/ui/gamepad-mapper.ui
+data/ui/keyboard-configurer.ui
+data/ui/keyboard-mapper.ui
+data/ui/media-menu-button.ui
+data/ui/preferences-page-controllers.ui
+data/ui/preferences-page-plugins.ui
+data/ui/preferences-page-video.ui
+data/ui/preferences-window.ui
+data/ui/quit-dialog.ui
+data/ui/remote-display.ui
+data/ui/reset-controller-mapping-dialog.ui
+data/ui/resume-dialog.ui
+data/ui/resume-failed-dialog.ui
+data/ui/shortcuts-window.ui
plugins/desktop/src/desktop-plugin.vala
plugins/dreamcast/src/dreamcast-header.vala
plugins/game-cube/src/game-cube-header.vala
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]