[gnome-photos/wip/rishi/collection: 1/16] Migrate from Intltool to Gettext
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/collection: 1/16] Migrate from Intltool to Gettext
- Date: Mon, 4 Sep 2017 18:33:17 +0000 (UTC)
commit 343bb33654a4c8d63f49b94d0c14f4562a182fd8
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Fri Sep 1 11:25:06 2017 +0200
Migrate from Intltool to Gettext
https://bugzilla.gnome.org/show_bug.cgi?id=787105
Makefile.am | 12 -----
autogen.sh | 2 -
configure.ac | 15 +++----
data/Makefile.am | 8 +++-
data/org.gnome.Photos.appdata.xml.in | 26 ++++++------
data/org.gnome.Photos.desktop.in.in | 6 +-
po/Makevars | 78 ++++++++++++++++++++++++++++++++++
po/POTFILES.in | 16 ++++----
8 files changed, 114 insertions(+), 49 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 14b8fa5..6e77e6b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,12 +2,6 @@ ACLOCAL_AMFLAGS = -I m4 -I libgd ${ACLOCAL_FLAGS}
SUBDIRS = . data libgd src po tests help
-INTLTOOL_FILES = \
- intltool-extract.in \
- intltool-merge.in \
- intltool-update.in \
- $(NULL)
-
photosdocdir = $(docdir)
photosdoc_DATA = \
ARTISTS \
@@ -20,7 +14,6 @@ photosdoc_DATA = \
# There is no way to generate the AUTHORS in tarball builds
EXTRA_DIST = \
- $(INTLTOOL_FILES) \
$(photosdoc_DATA) \
AUTHORS \
$(NULL)
@@ -30,10 +23,6 @@ CLEANFILES = \
$(NULL)
DISTCLEANFILES = \
- intltool-extract \
- intltool-merge \
- intltool-update \
- po/.intltool-merge-cache \
$(NULL)
MAINTAINERCLEANFILES = \
@@ -59,7 +48,6 @@ MAINTAINERCLEANFILES = \
GITIGNOREFILES = \
config \
- m4/intltool.m4 \
m4/libtool.m4 \
m4/lt* \
$(NULL)
diff --git a/autogen.sh b/autogen.sh
index d0c3afa..9b1180d 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -23,8 +23,6 @@ if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
fi
git submodule update --init --recursive || 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 8ed3638..df7827c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,14 +48,16 @@ GTK_MIN_VERSION=3.22.16
G_LOG_DOMAIN=AC_PACKAGE_TARNAME
AC_DEFINE_UNQUOTED([G_LOG_DOMAIN], ["$G_LOG_DOMAIN"], [Log domain])
-AX_REQUIRE_DEFINED([IT_PROG_INTLTOOL])
-IT_PROG_INTLTOOL([0.50.1])
-
GETTEXT_PACKAGE=AC_PACKAGE_TARNAME
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"],
[GETTEXT package name])
-AM_GLIB_GNU_GETTEXT
+
+AX_REQUIRE_DEFINED([AM_GNU_GETTEXT_VERSION])
+AM_GNU_GETTEXT_VERSION([0.19.8])
+
+AX_REQUIRE_DEFINED([AM_GNU_GETTEXT])
+AM_GNU_GETTEXT([external])
LT_INIT
@@ -147,11 +149,6 @@ fi
AX_REQUIRE_DEFINED([YELP_HELP_INIT])
YELP_HELP_INIT
-# work around intltool-update issues during 'make distcheck'
-AS_IF([test "x$0" != "x./configure"], [
- AC_SUBST([INTLTOOL_UPDATE], [/bin/true])
-])
-
AC_CONFIG_FILES([
Makefile
data/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index 7914453..0919c5f 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -8,12 +8,10 @@ desktopdir = $(datadir)/applications
desktop_in_in_files = org.gnome.Photos.desktop.in.in
desktop_in_files = org.gnome.Photos.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
-@INTLTOOL_DESKTOP_RULE@
gsettings_SCHEMAS = org.gnome.photos.gschema.xml
.PRECIOUS: $(gsettings_SCHEMAS)
-@INTLTOOL_XML_RULE@
@GSETTINGS_RULES@
searchproviderdir = $(datadir)/gnome-shell/search-providers
@@ -57,4 +55,10 @@ org.gnome.Photos.service: org.gnome.Photos.service.in
[ -d $(@D) ] || $(mkdir_p) $(@D) ; \
sed -e "s|\@bindir\@|$(bindir)|" $< > $@.tmp && mv $@.tmp $@
+org.gnome.Photos.appdata.xml: org.gnome.Photos.appdata.xml.in
+ $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
+
+org.gnome.Photos.desktop: org.gnome.Photos.desktop.in
+ $(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
+
-include $(top_srcdir)/git.mk
diff --git a/data/org.gnome.Photos.appdata.xml.in b/data/org.gnome.Photos.appdata.xml.in
index 949cc98..414fafe 100644
--- a/data/org.gnome.Photos.appdata.xml.in
+++ b/data/org.gnome.Photos.appdata.xml.in
@@ -4,24 +4,24 @@
<id>org.gnome.Photos.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+</project_license>
- <_name>Photos</_name>
- <_summary>Access, organize and share your photos on GNOME</_summary>
+ <name>Photos</name>
+ <summary>Access, organize and share your photos on GNOME</summary>
<description>
- <_p>
+ <p>
A simple application to access, organize and share your photos on
GNOME. It is meant to be a simple and elegant replacement for using a
file manager to deal with photos. 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 photos</_li>
- <_li>Access your Facebook or Flickr content</_li>
- <_li>Send photos to remote DLNA renderers</_li>
- <_li>Set as background</_li>
- <_li>Print photos</_li>
- <_li>Select favorites</_li>
- <_li>Allow opening full featured editor for more advanced changes</_li>
+ <li>View recent local and online photos</li>
+ <li>Access your Facebook or Flickr content</li>
+ <li>Send photos to remote DLNA renderers</li>
+ <li>Set as background</li>
+ <li>Print photos</li>
+ <li>Select favorites</li>
+ <li>Allow opening full featured editor for more advanced changes</li>
</ul>
</description>
<kudos>
@@ -46,7 +46,7 @@
<url type="donation">http://www.gnome.org/friends</url>
<url type="homepage">https://wiki.gnome.org/Apps/Photos</url>
<url type="translate">https://wiki.gnome.org/TranslationProject</url>
- <_developer_name>The GNOME Project</_developer_name>
+ <developer_name>The GNOME Project</developer_name>
<project_group>GNOME</project_group>
<update_contact>debarshir_at_gnome.org</update_contact>
<translation type="gettext">gnome-photos</translation>
diff --git a/data/org.gnome.Photos.desktop.in.in b/data/org.gnome.Photos.desktop.in.in
index 028f845..0579841 100644
--- a/data/org.gnome.Photos.desktop.in.in
+++ b/data/org.gnome.Photos.desktop.in.in
@@ -1,6 +1,6 @@
[Desktop Entry]
-_Name=Photos
-_Comment=Access, organize and share photos
+Name=Photos
+Comment=Access, organize and share photos
Exec=@PACKAGE_TARNAME@
Icon=org.gnome.Photos
DBusActivatable=true
@@ -9,4 +9,4 @@ Terminal=false
Type=Application
OnlyShowIn=GNOME;
Categories=GNOME;GTK;Core;Graphics;Photography;
-_Keywords=Photos;Pictures;
+Keywords=Photos;Pictures;
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..e3ae552
--- /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 Photos 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-photos&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 fc42acb..3af387d 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -6,25 +6,25 @@ data/org.gnome.photos.gschema.xml
src/photos-application.c
src/photos-base-item.c
src/photos-delete-notification.c
-[type: gettext/glade]src/photos-dlna-renderers-dialog.ui
+src/photos-dlna-renderers-dialog.ui
src/photos-done-notification.c
src/photos-embed.c
src/photos-empty-results-box.c
-[type: gettext/glade]src/photos-export-dialog.ui
+src/photos-export-dialog.ui
src/photos-export-dialog.c
src/photos-export-notification.c
src/photos-facebook-item.c
src/photos-fetch-metas-job.c
src/photos-flickr-item.c
src/photos-google-item.c
-[type: gettext/glade]src/photos-help-overlay.ui
+src/photos-help-overlay.ui
src/photos-indexing-notification.c
src/photos-local-item.c
src/photos-main-toolbar.c
src/photos-main-window.c
-[type: gettext/glade]src/photos-menus.ui
+src/photos-menus.ui
src/photos-organize-collection-dialog.c
-[type: gettext/glade]src/photos-preview-menu.ui
+src/photos-preview-menu.ui
src/photos-preview-nav-buttons.c
src/photos-print-notification.c
src/photos-print-operation.c
@@ -32,10 +32,10 @@ src/photos-print-setup.c
src/photos-properties-dialog.c
src/photos-search-match-manager.c
src/photos-search-type-manager.c
-[type: gettext/glade]src/photos-selection-menu.ui
+src/photos-selection-menu.ui
src/photos-selection-toolbar.c
-[type: gettext/glade]src/photos-selection-toolbar.ui
-[type: gettext/glade]src/photos-share-dialog.ui
+src/photos-selection-toolbar.ui
+src/photos-share-dialog.ui
src/photos-share-point-email.c
src/photos-share-point-google.c
src/photos-source-manager.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]