[rygel] Use upstream gettext install intltool/glib-gettext



commit 2e9bc7b09bae4a7b0376b64671900d7bd0ec5f34
Author: Javier Jardón <jjardon gnome org>
Date:   Sun Mar 13 23:29:27 2016 +0000

    Use upstream gettext install intltool/glib-gettext
    
    https://bugzilla.gnome.org/show_bug.cgi?id=763586

 .gitignore                           |    2 -
 Makefile.am                          |    1 +
 autogen.sh                           |    2 -
 configure.ac                         |    8 +--
 data/Makefile.am                     |   11 ++++-
 data/rygel-preferences.desktop.in.in |    4 +-
 data/rygel.desktop.in.in             |    8 ++--
 po/Makevars                          |   78 ++++++++++++++++++++++++++++++++++
 po/POTFILES.in                       |    3 +-
 po/POTFILES.skip                     |    4 --
 10 files changed, 97 insertions(+), 24 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 40e1dc1..8ae24a3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,7 +24,6 @@ stamp-*
 *.typelib
 core
 *.log
-.intltool-merge-cache
 po/rygel.pot
 .version
 aclocal.m4
@@ -66,7 +65,6 @@ data/xml/RuihServer2.xml.in
 data/xml/UIList.xml
 data/xml/X_MS_MediaReceiverRegistrar1.xml
 libtool
-m4/intltool.m4
 m4/libtool.m4
 m4/lt~obsolete.m4
 m4/ltoptions.m4
diff --git a/Makefile.am b/Makefile.am
index 21d1d26..3f6a082 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,6 +8,7 @@ pkgconfig_DATA += rygel-renderer-gst-2.6.pc
 endif
 
 EXTRA_DIST = rygel-core-2.6.pc.in rygel-renderer-2.6.pc.in \
+             build-aux/config.rpath \
              rygel-server-2.6.pc.in .version \
              build-aux/git-version-gen
 
diff --git a/autogen.sh b/autogen.sh
index b9b9daf..aaa3abf 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -36,8 +36,6 @@ if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
 fi
 
 aclocal --install || exit 1
-glib-gettextize --force --copy || exit 1
-intltoolize --force --copy --automake || exit 1
 autoreconf --verbose --force --install -Wno-portability || exit 1
 
 cd $olddir
diff --git a/configure.ac b/configure.ac
index 2b65503..6f8bc21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -444,14 +444,14 @@ RYGEL_CHECK_VALA([$VALA_REQUIRED],
                   posix])
 
 dnl Gettext
+AM_GNU_GETTEXT_VERSION([0.19.7])
+AM_GNU_GETTEXT([external])
+
 GETTEXT_PACKAGE=rygel
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], 
   [Define the gettext package to be used])
 
-AM_GLIB_GNU_GETTEXT
-IT_PROG_INTLTOOL([0.40.0])
-
 dnl Shave the output
 AM_SILENT_RULES([yes])
 
@@ -522,8 +522,6 @@ data/icons/48x48/Makefile
 data/icons/120x120/Makefile
 data/icons/128x128/Makefile
 data/icons/scalable/Makefile
-data/rygel.desktop.in
-data/rygel-preferences.desktop.in
 doc/Makefile
 doc/reference/Makefile
 doc/reference/librygel-core/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index 2ec40f1..fc1af54 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -19,8 +19,14 @@ $(dbusservice_DATA): $(dbusservice_in_files) Makefile
 
 # Rule to create the .desktop files
 desktop_in_files = rygel.desktop.in rygel-preferences.desktop.in
-desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
- INTLTOOL_DESKTOP_RULE@
+desktop_DATA = rygel.desktop rygel-preferences.desktop
+
+$(desktop_in_files): rygel.desktop.in.in rygel-preferences.desktop.in.in
+       $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
+
+# Substitute variables in a Desktop Entry file.
+$(desktop_DATA): $(desktop_in_files)
+       $(AM_V_GEN) sed -e 's|@VERSION[ ]|$(VERSION)|g' $< > $@
 
 preset_DATA = $(srcdir)/presets/avenc_aac.prs \
        $(srcdir)/presets/avenc_mp2.prs \
@@ -39,4 +45,3 @@ EXTRA_DIST = $(dbusservice_in_files) \
             $(sysconf_DATA) \
             $(pixmaps_DATA) \
             $(preset_DATA)
-
diff --git a/data/rygel-preferences.desktop.in.in b/data/rygel-preferences.desktop.in.in
index 54bdad7..9f83d1a 100644
--- a/data/rygel-preferences.desktop.in.in
+++ b/data/rygel-preferences.desktop.in.in
@@ -1,6 +1,6 @@
 [Desktop Entry]
-_Name=Rygel Preferences
-_GenericName=UPnP/DLNA Preferences
+Name=Rygel Preferences
+GenericName=UPnP/DLNA Preferences
 Categories=Settings;X-GNOME-PersonalSettings;
 Icon=rygel
 Exec=rygel-preferences
diff --git a/data/rygel.desktop.in.in b/data/rygel.desktop.in.in
index c9eb1f7..6d82a70 100644
--- a/data/rygel.desktop.in.in
+++ b/data/rygel.desktop.in.in
@@ -1,8 +1,8 @@
 [Desktop Entry]
-_Name=Rygel
-_GenericName=UPnP/DLNA Services
-_Comment=UPnP/DLNA Services
-_Keywords=mediaserver;mediarenderer;share;audio;video;pictures;
+Name=Rygel
+GenericName=UPnP/DLNA Services
+Comment=UPnP/DLNA Services
+Keywords=mediaserver;mediarenderer;share;audio;video;pictures;
 Categories=
 Exec=rygel
 Terminal=false
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..df09a7b
--- /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 = --keyword=_ --keyword=N_ --from-code=UTF-8
+
+# 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 = Free Software Foundation, Inc.
+
+# 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 = 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 1967aee..1d25671 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,9 +1,8 @@
 # List of source files containing translatable strings.
 # Please keep this file sorted alphabetically.
-[encoding: UTF-8]
 data/rygel.desktop.in.in
 data/rygel-preferences.desktop.in.in
-[type: gettext/glade]data/rygel-preferences.ui
+data/rygel-preferences.ui
 data/xml/AVTransport2.xml.in
 data/xml/ConnectionManager.xml.in
 data/xml/ContentDirectory.xml.in
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 3ab37a1..8df9f20 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,5 +1,3 @@
-data/rygel.desktop.in
-data/rygel-preferences.desktop.in
 data/xml/AVTransport2.xml
 data/xml/ConnectionManager.xml
 data/xml/ContentDirectory.xml
@@ -275,8 +273,6 @@ src/ui/rygel-preferences-dialog.c
 src/ui/rygel-preferences-section.c
 src/ui/rygel-user-config.c
 src/ui/rygel-writable-user-config.c
-sub/data/rygel-preferences.desktop.in
-sub/data/rygel.desktop.in
 tests/object-creator/rygel-m3u-playlist.c
 tests/object-creator/rygel-object-creator.c
 tests/plugins/media-export/regression.c


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