Commit 72028806 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 a4aaf578
Pipeline #62740 passed with stage
in 4 minutes and 33 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
......@@ -89,6 +80,9 @@ all: $(defaultmakedeps)
XDGMIME_PATH=@XDGMIME_PATH@
po/shared-mime-info.pot:
make -C po shared-mime-info.pot
local-test: po/shared-mime-info.pot freedesktop.org.xml update-mime-database$(EXEEXT)
if CROSS_COMPILING
@echo "Cross compiling: Skipping checks"
......
<its:rules version="2.0"
xmlns:its="http://www.w3.org/2005/11/its"
xmlns:mi="http://www.freedesktop.org/standards/shared-mime-info">
<?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"
xmlns:mi="http://www.freedesktop.org/standards/shared-mime-info"
version="2.0">
<its:translateRule translate="yes" selector="//mi:comment"/>
<its:translateRule translate="no" selector="//mi:expanded-acronym"/>
<its:translateRule translate="no" selector="//mi:acronym"/>
</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>
......@@ -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