Commit c8d9be8c authored by Bastien Nocera's avatar Bastien Nocera

build: Don't use an intermediate .pot file to do translations

Declare freedesktop.org.xml.in to be translatable directly, without
extracting translatable strings from a .pot which we then translate,
which we then need to merge into translations.

Files in its/ from Robert Ancell <robert.ancell@canonical.com>
!4
parent c8e36f73
Pipeline #62451 failed with stage
in 4 minutes and 3 seconds
......@@ -24,6 +24,8 @@ endif
man_MANS = update-mime-database.1
ITS_FILES = its/shared-mime-info.loc its/shared-mime-info.its
EXTRA_DIST = \
shared-mime-info-spec.xml \
freedesktop.org.xml.in \
......@@ -32,28 +34,17 @@ EXTRA_DIST = \
README \
HACKING \
$(man_MANS) \
shared-mime-info.pc.in \
shared-mime-info.pot \
mime-info.its
$(ITS_FILES) \
shared-mime-info.pc.in
CLEANFILES = freedesktop.org.xml po/stamp-it
MAINTAINERCLEANFILES = shared-mime-info.pot
pkgconfigdir = $(datadir)/pkgconfig
pkgconfig_DATA = shared-mime-info.pc
$(pkgconfig_DATA): config.status
all-recursive: shared-mime-info.pot
shared-mime-info.pot: freedesktop.org.xml.in mime-info.its
$(AM_V_GEN)$(ITSTOOL) -i $(srcdir)/mime-info.its -o $@ $<
test "$(srcdir)" = . || cp shared-mime-info.pot $(srcdir)/shared-mime-info.pot
po/shared-mime-info.pot: shared-mime-info.pot
$(MAKE) -C po shared-mime-info.pot
freedesktop.org.xml: freedesktop.org.xml.in shared-mime-info.pot
freedesktop.org.xml: freedesktop.org.xml.in
$(MAKE) -C po update-gmo
$(AM_V_GEN)$(ITSTOOL) -j $< -o $@ $(top_srcdir)/po/*.gmo
......
<?xml version="1.0"?>
<its:rules xmlns:its="http://www.w3.org/2005/11/its"
xmlns:gt="https://www.gnu.org/s/gettext/ns/its/extensions/1.0"
version="2.0">
<its:translateRule selector="/comment" translate="yes"/>
</its:rules>
<?xml version="1.0"?>
<locatingRules>
<locatingRule name="shared-mime-info" pattern="*.xml">
<documentRule localName="mime-info" target="shared-mime-info.its"/>
</locatingRule>
</locatingRules>
<its:rules version="2.0"
xmlns:its="http://www.w3.org/2005/11/its"
xmlns:mi="http://www.freedesktop.org/standards/shared-mime-info">
<its:translateRule translate="no" selector="//mi:expanded-acronym"/>
<its:translateRule translate="no" selector="//mi:acronym"/>
</its:rules>
......@@ -7,6 +7,9 @@ DOMAIN = $(PACKAGE)
subdir = po
top_builddir = ..
# This allows us using local its files
XGETTEXT := env GETTEXTDATADIRS="$(top_srcdir)/" $(XGETTEXT)
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
......
shared-mime-info.pot
freedesktop.org.xml.in
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment