summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-10-29 16:10:25 +0800
committerraveit65 <[email protected]>2019-11-07 11:22:37 +0100
commitcd5b6003a7c380e95d8422b66f116d294c09b945 (patch)
treec8b7858f68d996adf2a5341e3b55125140ff3ac5
parent9f5e0db85fe80f97c38576922c2748eb94b46a4b (diff)
downloadmate-notification-daemon-cd5b6003a7c380e95d8422b66f116d294c09b945.tar.bz2
mate-notification-daemon-cd5b6003a7c380e95d8422b66f116d294c09b945.tar.xz
migrate from intltools to gettext
-rw-r--r--Makefile.am12
-rw-r--r--configure.ac7
-rw-r--r--data/Makefile.am1
-rw-r--r--po/Makevars79
-rw-r--r--po/POTFILES.in4
-rw-r--r--src/capplet/Makefile.am4
-rw-r--r--src/capplet/mate-notification-properties.desktop.in6
7 files changed, 95 insertions, 18 deletions
diff --git a/Makefile.am b/Makefile.am
index 0ce5cb1..7f47541 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = data po src
+SUBDIRS = po data src
# Point to our macro directory and pick up user flags from the environment
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
@@ -7,10 +7,7 @@ EXTRA_DIST = \
AUTHORS NEWS COPYING README \
ChangeLog \
autogen.sh \
- configure.ac \
- intltool-extract.in \
- intltool-merge.in \
- intltool-update.in
+ configure.ac
$(OBJECTS): libtool
libtool: $(LIBTOOL_DEPS)
@@ -20,10 +17,7 @@ DISTCHECK_CONFIGURE_FLAGS = \
--disable-icon-update \
CFLAGS='-Wno-deprecated-declarations'
-DISTCLEANFILES = \
- intltool-extract \
- intltool-merge \
- intltool-update
+DISTCLEANFILES =
MAINTAINERCLEANFILES = \
$(srcdir)/INSTALL \
diff --git a/configure.ac b/configure.ac
index 06a22c7..037b68f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,9 +74,12 @@ LT_INIT
dnl ---------------------------------------------------------------------------
dnl i18n stuff
dnl ---------------------------------------------------------------------------
-IT_PROG_INTLTOOL([0.50.1])
+
+AM_GNU_GETTEXT_VERSION([0.19.8])
+AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.8])
+AM_GNU_GETTEXT([external])
+
AC_SUBST([GETTEXT_PACKAGE], [mate-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 6c70b9d..623725d 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -18,7 +18,6 @@ service_DATA = org.freedesktop.mate.Notifications.service
gsettingsschema_in_files = org.mate.NotificationDaemon.gschema.xml.in
gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml)
-@INTLTOOL_XML_NOMERGE_RULE@
@GSETTINGS_RULES@
EXTRA_DIST = \
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..31f6faf
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,79 @@
+# 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=Translators:
+
+# 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 = MATE Desktop Environment team
+
+# 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
+$(DOMAIN).pot-update: export GETTEXTDATADIRS = $(top_srcdir)
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 64a83b1..117a89c 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,7 +1,7 @@
-[type: gettext/gsettings]data/org.mate.NotificationDaemon.gschema.xml.in
+data/org.mate.NotificationDaemon.gschema.xml.in
src/capplet/mate-notification-properties.c
src/capplet/mate-notification-properties.desktop.in
-[type: gettext/glade]src/capplet/mate-notification-properties.ui
+src/capplet/mate-notification-properties.ui
src/daemon/daemon.c
src/daemon/sound.c
src/themes/coco/coco-theme.c
diff --git a/src/capplet/Makefile.am b/src/capplet/Makefile.am
index 26a188a..509133d 100644
--- a/src/capplet/Makefile.am
+++ b/src/capplet/Makefile.am
@@ -1,7 +1,5 @@
bin_PROGRAMS = mate-notification-properties
-@INTLTOOL_DESKTOP_RULE@
-
BUILT_SOURCES = mate-notification-properties-resources.h mate-notification-properties-resources.c
mate_notification_properties_LDADD = $(NOTIFICATION_CAPPLET_LIBS)
@@ -14,6 +12,8 @@ mate-notification-properties-resources.h mate-notification-properties-resources.
desktopdir = $(datadir)/applications
desktop_in_files = mate-notification-properties.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+$(desktop_DATA): $(desktop_in_files)
+ $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
man_MANS = mate-notification-properties.1
diff --git a/src/capplet/mate-notification-properties.desktop.in b/src/capplet/mate-notification-properties.desktop.in
index 5a90f57..c96e053 100644
--- a/src/capplet/mate-notification-properties.desktop.in
+++ b/src/capplet/mate-notification-properties.desktop.in
@@ -1,11 +1,13 @@
[Desktop Entry]
-_Name=Popup Notifications
-_Comment=Set your popup notification preferences
+Name=Popup Notifications
+Comment=Set your popup notification preferences
Exec=mate-notification-properties
+# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=mate-notification-properties
Terminal=false
Type=Application
StartupNotify=true
Categories=GTK;Settings;DesktopSettings;
OnlyShowIn=MATE;
+# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
Keywords=MATE;Notification;Theme;