[damned-lies] Refs #149 - Ship our own metainfo.its to avoid release note translations
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Refs #149 - Ship our own metainfo.its to avoid release note translations
- Date: Sat, 15 Jun 2019 10:29:17 +0000 (UTC)
commit b2c54ed2b64060a1f4c8adbd410bb8e4d86fcd54
Author: Claude Paroz <claude 2xlibre net>
Date: Sat Jun 15 12:26:37 2019 +0200
Refs #149 - Ship our own metainfo.its to avoid release note translations
damnedlies/settings.py | 8 +++++---
data/metainfo.its | 17 +++++++++++++++++
data/metainfo.loc | 9 +++++++++
3 files changed, 31 insertions(+), 3 deletions(-)
---
diff --git a/damnedlies/settings.py b/damnedlies/settings.py
index f51de40b..7bf12f1e 100644
--- a/damnedlies/settings.py
+++ b/damnedlies/settings.py
@@ -193,9 +193,11 @@ GETTEXT_ITS_DATA = {
os.path.join('gettext', 'its', 'gnome-keybindings.loc'),
],
'polkit': [os.path.join('data', 'polkit.its'), os.path.join('data', 'polkit.loc')],
- 'appstream': [
- os.path.join('data', 'its', 'metainfo.its'),
- os.path.join('data', 'its', 'metainfo.loc'),
+ # Copy of https://github.com/ximion/appstream/tree/master/data/its (2019-06-15)
+ # minus the release/description line (#149).
+ 'damned-lies': [
+ os.path.join('data', 'metainfo.its'),
+ os.path.join('data', 'metainfo.loc'),
],
}
diff --git a/data/metainfo.its b/data/metainfo.its
new file mode 100644
index 00000000..5bafb6cd
--- /dev/null
+++ b/data/metainfo.its
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<its:rules xmlns:its="http://www.w3.org/2005/11/its"
+ version="2.0">
+ <its:translateRule selector="/component" translate="no"/>
+ <its:translateRule selector="/component/name |
+ /component/summary |
+ /component/description |
+ /component/developer_name |
+ /component/screenshots/screenshot/caption |
+ /component/agreement/agreement_section/name |
+ /component/agreement/agreement_section/description"
+ translate="yes"/>
+ <its:translateRule selector="/component/name[@translatable = 'no']"
+ translate="no"/>
+ <its:translateRule selector="/component/developer_name[@translatable = 'no']"
+ translate="no"/>
+</its:rules>
diff --git a/data/metainfo.loc b/data/metainfo.loc
new file mode 100644
index 00000000..fd99fc88
--- /dev/null
+++ b/data/metainfo.loc
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<locatingRules>
+ <locatingRule name="MetaInfo" pattern="*.appdata.xml">
+ <documentRule localName="component" target="metainfo.its"/>
+ </locatingRule>
+ <locatingRule name="MetaInfo" pattern="*.metainfo.xml">
+ <documentRule localName="component" target="metainfo.its"/>
+ </locatingRule>
+</locatingRules>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]