Use upstream gettext

Drop the intltool dependency that was recently added, and use
upstream gettext and its its features for the same purpose.
Note that polkit currently does not install .its files (I've
sent a patch). Until that is in place, this change has the
effect of installing the untranslated policy file.
tingping/wmclass
Matthias Clasen 2016-07-15 10:37:58 -04:00
parent eb4835a31b
commit 3c52321a40
5 changed files with 76 additions and 26 deletions

View File

@ -42,7 +42,5 @@ fi
autoreconf --force --install --verbose || exit $?
intltoolize || exit 1
cd "$olddir"
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"

View File

@ -32,8 +32,6 @@ GLIB_REQS=2.40
AC_USE_SYSTEM_EXTENSIONS
IT_PROG_INTLTOOL([0.35.0])
AC_PROG_CC
AM_PROG_CC_C_O
AC_DISABLE_STATIC
@ -47,9 +45,9 @@ AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11 no-define no-dist-gzip dist-xz tar-ustar foreign subdir-objects])
AC_PROG_SED
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$PACKAGE_NAME"],[gettext domain])
AM_GLIB_GNU_GETTEXT
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19.7])
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$PACKAGE", [gettext domain])
# Enable silent rules is available
AM_SILENT_RULES([yes])

53
po/Makevars 100644
View File

@ -0,0 +1,53 @@
# 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_
# 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 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://github.com/flatpak/flatpak/issues
# 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 =

View File

@ -33,7 +33,8 @@ polkit_policydir = $(datadir)/polkit-1/actions
polkit_policy_DATA = \
system-helper/org.freedesktop.Flatpak.policy
@INTLTOOL_POLICY_RULE@
%.policy: %.policy.in
$(AM_V_GEN) $(MSGFMT) --xml -d $(top_srcdir)/po --template $< -o $@ || cp $< $@
EXTRA_DIST += system-helper/org.freedesktop.Flatpak.policy.in system-helper/org.freedesktop.Flatpak.SystemHelper.conf system-helper/org.freedesktop.Flatpak.rules.in
DISTCLEANFILES += system-helper/org.freedesktop.Flatpak.policy system-helper/org.freedesktop.Flatpak.rules system-helper/flatpak-system-helper.service system-helper/org.freedesktop.Flatpak.SystemHelper.service

View File

@ -20,8 +20,8 @@
- Paranoid users (or parents!) can change this to 'auth_admin' or
'auth_admin_keep'.
-->
<_description>Install signed application</_description>
<_message>Authentication is required to install software</_message>
<description>Install signed application</description>
<message>Authentication is required to install software</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
@ -37,8 +37,8 @@
- Paranoid users (or parents!) can change this to 'auth_admin' or
'auth_admin_keep'.
-->
<_description>Install signed runtime</_description>
<_message>Authentication is required to install software</_message>
<description>Install signed runtime</description>
<message>Authentication is required to install software</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
@ -55,8 +55,8 @@
- Changing this to anything other than 'yes' will break unattended
updates.
-->
<_description>Update signed application</_description>
<_message>Authentication is required to update software</_message>
<description>Update signed application</description>
<message>Authentication is required to update software</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
@ -73,8 +73,8 @@
- Changing this to anything other than 'yes' will break unattended
updates.
-->
<_description>Update signed runtime</_description>
<_message>Authentication is required to update software</_message>
<description>Update signed runtime</description>
<message>Authentication is required to update software</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
@ -84,8 +84,8 @@
</action>
<action id="org.freedesktop.Flatpak.install-bundle">
<_description>Install bundle</_description>
<_message>Authentication is install software</_message>
<description>Install bundle</description>
<message>Authentication is install software</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
@ -95,8 +95,8 @@
</action>
<action id="org.freedesktop.Flatpak.runtime-uninstall">
<_description>Uninstall runtime</_description>
<_message>Authentication is required to uninstall software</_message>
<description>Uninstall runtime</description>
<message>Authentication is required to uninstall software</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
@ -106,8 +106,8 @@
</action>
<action id="org.freedesktop.Flatpak.app-uninstall">
<_description>Uninstall app</_description>
<_message>Authentication is required to uninstall software</_message>
<description>Uninstall app</description>
<message>Authentication is required to uninstall software</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
@ -117,8 +117,8 @@
</action>
<action id="org.freedesktop.Flatpak.configure-remote">
<_description>Configure Remote</_description>
<_message>Authentication is required to configure software repositories</_message>
<description>Configure Remote</description>
<message>Authentication is required to configure software repositories</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
@ -135,8 +135,8 @@
- Changing this to anything other than 'yes' will break unattended
updates.
-->
<_description>Update appstream</_description>
<_message>Authentication is required to update software</_message>
<description>Update appstream</description>
<message>Authentication is required to update software</message>
<icon_name>package-x-generic</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>