po/metainfo.its: New file.
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 11 Jul 2020 04:37:36 +0000 (06:37 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 11 Jul 2020 04:37:34 +0000 (06:37 +0200)
Add a ITS file for metainfo.xml format, and use it when extracting strings for
for translation.

po/automake.mk
po/metainfo.its [new file with mode: 0644]

index ebdb57e343afbb9f63fc190e533d096e5999e2bf..828192a7caab6e31f4a697246f6a9216aecf9ffd 100644 (file)
@@ -63,8 +63,8 @@ ALL_TRANSLATEABLE_FILES = \
 $(POTFILE): $(ALL_TRANSLATABLE_FILES)
        @$(MKDIR_P) po
        $(AM_V_GEN)$(XGETTEXT) $(XGETTEXT_OPTIONS) $(TRANSLATABLE_FILES) --language=C --keyword=_ --keyword=N_ -o $@,tmp
-       $(AM_V_at)$(XGETTEXT) $(XGETTEXT_OPTIONS) -j $(UI_FILES) --language=glade -o $@,tmp
-       $(AM_V_at)$(XGETTEXT) $(XGETTEXT_OPTIONS) -j src/ui/gui/org.fsf.pspp.metainfo.xml.in -o $@,tmp
+       $(AM_V_at)$(XGETTEXT) $(XGETTEXT_OPTIONS) -j $(UI_FILES) --language=Glade -o $@,tmp
+       $(AM_V_at)$(XGETTEXT) $(XGETTEXT_OPTIONS) --its=$(top_srcdir)/po/metainfo.its -j src/ui/gui/org.fsf.pspp.metainfo.xml.in -o $@,tmp
        $(AM_V_at)$(XGETTEXT) $(XGETTEXT_OPTIONS) -j src/ui/gui/org.fsf.pspp.desktop.in -o $@,tmp
        $(AM_V_at)$(SED) -e '/^"POT-Creation-Date: .*/d' $@,tmp > $@
 
@@ -106,6 +106,7 @@ EXTRA_DIST += \
        $(LOCALPOFILES) \
        $(POFILES) \
        $(POTFILE) \
+       po/metainfo.its \
        po/LINGUAS \
        po/ChangeLog \
        po/cs.po,aux
diff --git a/po/metainfo.its b/po/metainfo.its
new file mode 100644 (file)
index 0000000..213d0bd
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!--
+  Copyright (C) 2020 Free Software Foundation, Inc.
+
+  This program is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <https://www.gnu.org/licenses/>.
+-->
+<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="/component" translate="no"/>
+  <its:translateRule selector="/component/summary" translate="yes"/>
+  <its:translateRule selector="/component/description" translate="yes"/>
+  <its:translateRule selector="/component/screenshots//caption" translate="yes"/>
+</its:rules>