[notification-daemon] use upstream gettext
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [notification-daemon] use upstream gettext
- Date: Wed, 16 Sep 2015 00:13:15 +0000 (UTC)
commit b33710c893a63dd7f4721124c31a04b8bbf0769e
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Wed Sep 16 02:59:25 2015 +0300
use upstream gettext
Makefile.am | 13 ++++
autogen.sh | 1 -
configure.ac | 5 +-
data/Makefile.am | 6 +-
data/notification-daemon-autostart.desktop.in.in | 4 +-
data/notification-daemon.desktop.in.in | 4 +-
po/Makevars | 81 ++++++++++++++++++++++
po/POTFILES.in | 6 +-
po/POTFILES.skip | 4 +-
9 files changed, 111 insertions(+), 13 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 7e374d9..7241706 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,9 +19,22 @@ MAINTAINERCLEANFILES = \
$(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN) \
$(GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL) \
`find "m4" -type f -name "*.m4" -print` \
+ $(srcdir)/ABOUT-NLS \
$(srcdir)/INSTALL \
+ $(srcdir)/build-aux/config.rpath \
$(srcdir)/config.h.in~ \
$(srcdir)/configure \
+ $(srcdir)/po/Makefile.in.in \
+ $(srcdir)/po/Makevars.template \
+ $(srcdir)/po/Rules-quot \
+ $(srcdir)/po/boldquot.sed \
+ $(srcdir)/po/en boldquot header \
+ $(srcdir)/po/en quot header \
+ $(srcdir)/po/notification-daemon.pot \
+ $(srcdir)/po/insert-header.sin \
+ $(srcdir)/po/quot.sed \
+ $(srcdir)/po/remove-potcdate.sin \
+ $(srcdir)/po/stamp-po \
$(NULL)
GITIGNOREFILES = $(PACKAGE)-\*.tar.{gz,bz2,xz}
diff --git a/autogen.sh b/autogen.sh
index 16d2495..4e9c78d 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -21,7 +21,6 @@ fi
set -x
aclocal --install || exit 1
-intltoolize --force --copy --automake || exit 1
autoreconf --verbose --force --install -Wno-portability || exit 1
{ set +x; } 2>/dev/null
diff --git a/configure.ac b/configure.ac
index a388a04..2592cbf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,6 +10,7 @@ AX_IS_RELEASE([git-directory])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar -Wno-portability])
AM_MAINTAINER_MODE([[enable]])
@@ -39,10 +40,10 @@ LT_INIT
dnl ---------------------------------------------------------------------------
dnl i18n stuff
dnl ---------------------------------------------------------------------------
-IT_PROG_INTLTOOL([0.40.0])
+AM_GNU_GETTEXT_VERSION([0.19.4])
+AM_GNU_GETTEXT([external])
AC_SUBST([GETTEXT_PACKAGE], [notification-daemon])
-AM_GLIB_GNU_GETTEXT
AC_DEFINE([GETTEXT_PACKAGE], [PACKAGE_TARNAME], [Define to the gettext package name.])
diff --git a/data/Makefile.am b/data/Makefile.am
index e232cf4..7cd4d08 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -3,13 +3,15 @@ autostart_in_in_files = notification-daemon-autostart.desktop.in.in
autostart_in_files = notification-daemon-autostart.desktop.in
autostart_DATA = $(autostart_in_files:.desktop.in=.desktop)
- INTLTOOL_DESKTOP_RULE@
-
desktopdir = $(datadir)/applications
desktop_in_in_files = notification-daemon.desktop.in.in
desktop_in_files = notification-daemon.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+%.desktop: %.desktop.in
+ $(AM_V_GEN) $(MSGFMT) --desktop --template $< -o $ -t \
+ -d $(top_srcdir)/po && mv $ -t $@
+
EXTRA_DIST = \
$(autostart_in_in_files) \
$(desktop_in_in_files)
diff --git a/data/notification-daemon-autostart.desktop.in.in
b/data/notification-daemon-autostart.desktop.in.in
index 1a45ab0..1c3e152 100644
--- a/data/notification-daemon-autostart.desktop.in.in
+++ b/data/notification-daemon-autostart.desktop.in.in
@@ -1,6 +1,6 @@
[Desktop Entry]
-_Name=Notification Daemon
-_Comment=Display notifications
+Name=Notification Daemon
+Comment=Display notifications
Exec= LIBEXECDIR@/notification-daemon
Terminal=false
Type=Application
diff --git a/data/notification-daemon.desktop.in.in b/data/notification-daemon.desktop.in.in
index e13b8fe..c067f18 100644
--- a/data/notification-daemon.desktop.in.in
+++ b/data/notification-daemon.desktop.in.in
@@ -1,6 +1,6 @@
[Desktop Entry]
-_Name=Notification Daemon
-_Comment=Display notifications
+Name=Notification Daemon
+Comment=Display notifications
Exec= LIBEXECDIR@/notification-daemon
Terminal=false
Type=Application
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..f002562
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,81 @@
+# 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=_ --flag=_:1:pass-c-format \
+ --keyword=N_ --flag=N_:1:pass-c-format \
+ --flag=error:3:c-format --flag=error_at_line:5:c-format
+
+# 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 5e69956..9340b43 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,7 +1,9 @@
+# List of source files containing translatable strings.
+# Please keep this file sorted alphabetically.
+data/notification-daemon.desktop.in.in
+data/notification-daemon-autostart.desktop.in.in
src/daemon.c
src/nd-bubble.c
src/nd-notification-box.c
src/nd-queue.c
src/sound.c
-data/notification-daemon.desktop.in.in
-data/notification-daemon-autostart.desktop.in.in
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 9418776..0fb3682 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,2 +1,2 @@
-data/notification-daemon.desktop.in
-data/notification-daemon-autostart.desktop.in
+# List of source files that should *not* be translated.
+# Please keep this file sorted alphabetically.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]