[gnome-documents] Migrate from Intltool to Gettext
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] Migrate from Intltool to Gettext
- Date: Wed, 23 Aug 2017 11:05:23 +0000 (UTC)
commit 4df587ed389359d273aa236112a1c035702ca5a1
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Aug 17 14:01:19 2017 +0200
Migrate from Intltool to Gettext
See: https://wiki.gnome.org/MigratingFromIntltoolToGettext
https://bugzilla.gnome.org/show_bug.cgi?id=786418
autogen.sh | 3 -
configure.ac | 8 +++-
data/Makefile.am | 14 ++++-
data/org.gnome.Books.appdata.xml.in | 18 ++++----
data/org.gnome.Books.desktop.in | 6 +-
data/org.gnome.Documents.appdata.xml.in | 26 +++++-----
data/org.gnome.Documents.desktop.in | 6 +-
po/Makevars | 78 +++++++++++++++++++++++++++++++
po/POTFILES.in | 17 +++----
9 files changed, 132 insertions(+), 44 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 77e683f..9b1180d 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -23,9 +23,6 @@ if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
fi
git submodule update --init --recursive || exit 1
-
-aclocal --install || 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 fde9705..58347be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,13 @@ AX_CHECK_ENABLE_DEBUG([yes],,, [$ax_is_release])
GETTEXT_PACKAGE=AC_PACKAGE_NAME
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The name of the gettext domain])
-IT_PROG_INTLTOOL(0.50.1)
+
+AX_REQUIRE_DEFINED([AM_GNU_GETTEXT_VERSION])
+AM_GNU_GETTEXT_VERSION([0.19.8])
+
+AX_REQUIRE_DEFINED([AM_GNU_GETTEXT])
+AM_GNU_GETTEXT([external])
+
PKG_PROG_PKG_CONFIG([0.22])
AX_REQUIRE_DEFINED([YELP_HELP_INIT])
diff --git a/data/Makefile.am b/data/Makefile.am
index 7c4c0a8..6f14cc8 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -27,17 +27,25 @@ appdata_in_files = \
org.gnome.Documents.appdata.xml.in \
org.gnome.Books.appdata.xml.in
-@INTLTOOL_XML_RULE@
+org.gnome.Books.appdata.xml: org.gnome.Books.appdata.xml.in
+ $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
+
+org.gnome.Documents.appdata.xml: org.gnome.Documents.appdata.xml.in
+ $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
desktopdir = $(datadir)/applications
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
desktop_in_files = org.gnome.Documents.desktop.in org.gnome.Books.desktop.in
+org.gnome.Books.desktop: org.gnome.Books.desktop.in
+ $(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
+
+org.gnome.Documents.desktop: org.gnome.Documents.desktop.in
+ $(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
+
searchproviderdir = $(datadir)/gnome-shell/search-providers
searchprovider_DATA = org.gnome.Documents.search-provider.ini
-@INTLTOOL_DESKTOP_RULE@
-
check-local: org.gnome.Documents.desktop org.gnome.Books.desktop
$(DESKTOP_FILE_VALIDATE) org.gnome.Documents.desktop
$(DESKTOP_FILE_VALIDATE) org.gnome.Books.desktop
diff --git a/data/org.gnome.Books.appdata.xml.in b/data/org.gnome.Books.appdata.xml.in
index b7a3383..396f106 100644
--- a/data/org.gnome.Books.appdata.xml.in
+++ b/data/org.gnome.Books.appdata.xml.in
@@ -4,20 +4,20 @@
<id>org.gnome.Books.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+</project_license>
- <_name>Books</_name>
- <_summary>An e-book manager application for GNOME</_summary>
+ <name>Books</name>
+ <summary>An e-book manager application for GNOME</summary>
<description>
- <_p>
+ <p>
A simple application to access and organize your e-books on
GNOME. It is meant to be a simple and elegant replacement for using a
file manager to deal with e-books.
- </_p>
- <_p>It lets you:</_p>
+ </p>
+ <p>It lets you:</p>
<ul>
- <_li>View recent e-books</_li>
- <_li>Search through e-books</_li>
- <_li>View e-books (PDF and comics) fullscreen</_li>
- <_li>Print e-books</_li>
+ <li>View recent e-books</li>
+ <li>Search through e-books</li>
+ <li>View e-books (PDF and comics) fullscreen</li>
+ <li>Print e-books</li>
</ul>
</description>
<kudos>
diff --git a/data/org.gnome.Books.desktop.in b/data/org.gnome.Books.desktop.in
index c0f66c2..1b30423 100644
--- a/data/org.gnome.Books.desktop.in
+++ b/data/org.gnome.Books.desktop.in
@@ -1,6 +1,6 @@
[Desktop Entry]
-_Name=Books
-_Comment=Access, manage and share books
+Name=Books
+Comment=Access, manage and share books
Exec=gnome-books
Icon=org.gnome.Books
Terminal=false
@@ -9,4 +9,4 @@ StartupNotify=true
DBusActivatable=true
OnlyShowIn=GNOME;
Categories=GNOME;GTK;Utility;Core;
-_Keywords=Books;Comics;ePub;PDF;
+Keywords=Books;Comics;ePub;PDF;
diff --git a/data/org.gnome.Documents.appdata.xml.in b/data/org.gnome.Documents.appdata.xml.in
index d3e981d..fd70950 100644
--- a/data/org.gnome.Documents.appdata.xml.in
+++ b/data/org.gnome.Documents.appdata.xml.in
@@ -4,25 +4,25 @@
<id>org.gnome.Documents.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+</project_license>
- <_name>Documents</_name>
- <_summary>A document manager application for GNOME</_summary>
+ <name>Documents</name>
+ <summary>A document manager application for GNOME</summary>
<description>
- <_p>
+ <p>
A simple application to access, organize and share your documents on
GNOME. It is meant to be a simple and elegant replacement for using a
file manager to deal with documents. Seamless cloud integration is
offered through GNOME Online Accounts.
- </_p>
- <_p>It lets you:</_p>
+ </p>
+ <p>It lets you:</p>
<ul>
- <_li>View recent local and online documents</_li>
- <_li>Access your Google, ownCloud or OneDrive content</_li>
- <_li>Search through documents</_li>
- <_li>See new documents shared by friends</_li>
- <_li>View documents fullscreen</_li>
- <_li>Print documents</_li>
- <_li>Select favorites</_li>
- <_li>Allow opening full featured editor for non-trivial changes</_li>
+ <li>View recent local and online documents</li>
+ <li>Access your Google, ownCloud or OneDrive content</li>
+ <li>Search through documents</li>
+ <li>See new documents shared by friends</li>
+ <li>View documents fullscreen</li>
+ <li>Print documents</li>
+ <li>Select favorites</li>
+ <li>Allow opening full featured editor for non-trivial changes</li>
</ul>
</description>
<kudos>
diff --git a/data/org.gnome.Documents.desktop.in b/data/org.gnome.Documents.desktop.in
index f469c3f..22976d1 100644
--- a/data/org.gnome.Documents.desktop.in
+++ b/data/org.gnome.Documents.desktop.in
@@ -1,6 +1,6 @@
[Desktop Entry]
-_Name=Documents
-_Comment=Access, manage and share documents
+Name=Documents
+Comment=Access, manage and share documents
Exec=gnome-documents
Icon=org.gnome.Documents
Terminal=false
@@ -9,4 +9,4 @@ StartupNotify=true
DBusActivatable=true
OnlyShowIn=GNOME;
Categories=GNOME;GTK;Utility;Core;
-_Keywords=Docs;PDF;Document;
+Keywords=Docs;PDF;Document;
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..2637b23
--- /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 Documents Authors
+
+# 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=gnome-documents&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 94d87b5..a0257de 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,20 +1,19 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
-[encoding: UTF-8]
data/org.gnome.Books.appdata.xml.in
data/org.gnome.Books.desktop.in
data/org.gnome.books.gschema.xml
data/org.gnome.Documents.appdata.xml.in
data/org.gnome.Documents.desktop.in
data/org.gnome.documents.gschema.xml
-[type: gettext/glade]data/ui/app-menu.ui
-[type: gettext/glade]data/ui/help-overlay.ui
-[type: gettext/glade]data/ui/organize-collection-dialog.ui
-[type: gettext/glade]data/ui/preview-context-menu.ui
-[type: gettext/glade]data/ui/preview-menu.ui
-[type: gettext/glade]data/ui/selection-menu.ui
-[type: gettext/glade]data/ui/selection-toolbar.ui
-[type: gettext/glade]data/ui/view-menu.ui
+data/ui/app-menu.ui
+data/ui/help-overlay.ui
+data/ui/organize-collection-dialog.ui
+data/ui/preview-context-menu.ui
+data/ui/preview-menu.ui
+data/ui/selection-menu.ui
+data/ui/selection-toolbar.ui
+data/ui/view-menu.ui
src/application.js
src/documents.js
src/edit.js
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]