[gnome-dictionary] Drop intltool
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-dictionary] Drop intltool
- Date: Tue, 11 Apr 2017 21:56:00 +0000 (UTC)
commit a59170f4ca223d8c030f7767949edc101ddccf4d
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Apr 11 21:18:25 2017 +0100
Drop intltool
Use an updated version of Gettext; it's plenty capable of dealing with
all that we use in Dictionary.
autogen.sh | 8 ----
configure.ac | 6 +--
data/Makefile.am | 30 ++++++++++----
data/default.desktop.in | 2 +-
data/org.gnome.Dictionary.desktop.in | 7 ++-
data/spanish.desktop.in | 2 +-
data/thai.desktop.in | 2 +-
po/Makevars | 78 ++++++++++++++++++++++++++++++++++
po/POTFILES.in | 10 ++--
9 files changed, 114 insertions(+), 31 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index c251e84..a0388e5 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -25,14 +25,6 @@ else
gtkdocize || exit $?
fi
-INTLTOOLIZE=$(which intltoolize 2>/dev/null)
-if test -z $INTLTOOLIZE; then
- echo "*** No intltoolize found, please install intltool ***"
- exit 1
-else
- intltoolize --force --copy --automake || exit $?
-fi
-
AUTORECONF=$(which autoreconf 2>/dev/null)
if test -z $AUTORECONF; then
echo "*** No autoreconf found, please install it ***"
diff --git a/configure.ac b/configure.ac
index 997e6f6..1257511 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,14 +24,12 @@ AC_HEADER_STDC
PKG_PROG_PKG_CONFIG([0.22])
AC_PROG_SED
-IT_PROG_INTLTOOL([0.40])
-
+AM_GNU_GETTEXT_VERSION([0.19.8])
+AM_GNU_GETTEXT([external])
GETTEXT_PACKAGE=AC_PACKAGE_NAME
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The name of the gettext domain])
AC_SUBST(GETTEXT_PACKAGE)
-AM_GLIB_GNU_GETTEXT
-
GLIB_MKENUMS=`$PKG_CONFIG --variable glib_mkenums glib-2.0`
GLIB_GENMARSHAL=`$PKG_CONFIG --variable glib_genmarshal glib-2.0`
GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable glib_compile_resources gio-2.0`
diff --git a/data/Makefile.am b/data/Makefile.am
index 449fab2..d82804f 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -9,11 +9,14 @@ EXTRA_DIST += $(man_MANS)
gdictappdir = $(datadir)/applications
gdictapp_in_files = org.gnome.Dictionary.desktop.in
gdictapp_DATA = $(gdictapp_in_files:.desktop.in=.desktop)
+
+org.gnome.Dictionary.desktop: $(gdictapp_in_files)
+ $(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
+
EXTRA_DIST += $(gdictapp_in_files)
CLEANFILES += $(gdictapp_DATA)
-@INTLTOOL_DESKTOP_RULE@
-
+# DBus activation service
dbusservicedir = $(datadir)/dbus-1/services
dbusservice_in_files = org.gnome.Dictionary.service.in
dbusservice_DATA = $(dbusservice_in_files:.service.in=.service)
@@ -24,14 +27,15 @@ org.gnome.Dictionary.service: $(dbusservice_in_files) Makefile
EXTRA_DIST += $(dbusservice_in_files)
CLEANFILES += $(dbusservice_DATA)
-@INTLTOOL_XML_RULE@
+# AppData
appdatadir = $(datadir)/appdata
appdata_DATA = $(appdata_in_files:.xml.in=.xml)
appdata_in_files = org.gnome.Dictionary.appdata.xml.in
-EXTRA_DIST += \
- $(appdata_in_files) \
- $(gsettings_SCHEMAS) \
- $(NULL)
+
+org.gnome.Dictionary.appdata.xml: $(appdata_in_files) Makefile
+ $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
+
+EXTRA_DIST += $(appdata_in_files)
CLEANFILES += $(appdata_DATA)
# dictionary sources definitions
@@ -42,12 +46,22 @@ dictsource_in_files = \
thai.desktop.in \
$(NULL)
dictsource_DATA = $(dictsource_in_files:.desktop.in=.desktop)
-@INTLTOOL_DESKTOP_RULE@
+
+default.desktop: default.desktop.in Makefile
+ $(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
+
+spanish.desktop: spanish.desktop.in Makefile
+ $(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
+
+thai.desktop: thai.desktop.in Makefile
+ $(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
EXTRA_DIST += $(dictsource_in_files)
CLEANFILES += $(dictsource_DATA)
+# GSettings
gsettings_SCHEMAS = org.gnome.dictionary.gschema.xml
+EXTRA_DIST += $(gsettings_SCHEMAS)
@GSETTINGS_RULES@
diff --git a/data/default.desktop.in b/data/default.desktop.in
index bc72b7d..ba1d560 100644
--- a/data/default.desktop.in
+++ b/data/default.desktop.in
@@ -1,7 +1,7 @@
[Dictionary Source]
# Translators: Do not translate the Name key
Name=Default
-_Comment=Default Dictionary Server
+Comment=Default Dictionary Server
Transport=dictd
Hostname=dict.org
Port=2628
diff --git a/data/org.gnome.Dictionary.desktop.in b/data/org.gnome.Dictionary.desktop.in
index eb5e70c..51d82ff 100644
--- a/data/org.gnome.Dictionary.desktop.in
+++ b/data/org.gnome.Dictionary.desktop.in
@@ -1,10 +1,11 @@
[Desktop Entry]
-_Name=Dictionary
-_Comment=Check word definitions and spellings in an online dictionary
-_Keywords=word;synonym;definition;spelling;
+Name=Dictionary
+Comment=Check word definitions and spellings in an online dictionary
+Keywords=word;synonym;definition;spelling;
Exec=gnome-dictionary
Terminal=false
Type=Application
+# Translators: Do not translate the Icon key
Icon=accessories-dictionary
StartupNotify=true
Categories=GNOME;GTK;Office;Dictionary;
diff --git a/data/spanish.desktop.in b/data/spanish.desktop.in
index 84a6f47..a525ea7 100644
--- a/data/spanish.desktop.in
+++ b/data/spanish.desktop.in
@@ -1,7 +1,7 @@
[Dictionary Source]
# Translators: Do not translate the Name key
Name=spanish
-_Comment=Spanish Dictionaries
+Comment=Spanish Dictionaries
Transport=dictd
Hostname=es.dict.org
Port=2628
diff --git a/data/thai.desktop.in b/data/thai.desktop.in
index 79efb71..1c75b84 100644
--- a/data/thai.desktop.in
+++ b/data/thai.desktop.in
@@ -1,7 +1,7 @@
[Dictionary Source]
# Translators: Do not translate the Name key
Name=Thai
-_Comment=Longdo Thai-English Dictionaries
+Comment=Longdo Thai-English Dictionaries
Transport=dictd
Hostname=dict.longdo.com
Port=2628
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..8eff9af
--- /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 Dictionary 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 =
+
+# 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 = yes
+
+# 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 = yes
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 167d8a5..15574ac 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -2,11 +2,7 @@
# Please keep this file sorted alphabetically.
data/default.desktop.in
data/org.gnome.Dictionary.appdata.xml.in
-[type: gettext/glade]src/gdict-app-menus.ui
-[type: gettext/glade]src/gdict-pref-dialog.ui
-[type: gettext/glade]src/gdict-source-dialog.ui
-[type: gettext/glade]src/gdict-app-window.ui
-data/org.gnome.Dictionary.desktop.in.in
+data/org.gnome.Dictionary.desktop.in
data/org.gnome.dictionary.gschema.xml
data/spanish.desktop.in
data/thai.desktop.in
@@ -19,8 +15,12 @@ libgdict/gdict-speller.c
libgdict/gdict-strategy-chooser.c
libgdict/gdict-utils.c
src/gdict-about.c
+src/gdict-app-menus.ui
+src/gdict-app-window.ui
src/gdict-app.c
src/gdict-pref-dialog.c
+src/gdict-pref-dialog.ui
src/gdict-print.c
src/gdict-source-dialog.c
+src/gdict-source-dialog.ui
src/gdict-window.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]