diff options
author | Daiki Ueno <dueno@src.gnome.org> | 2016-01-05 18:21:57 +0900 |
---|---|---|
committer | Daiki Ueno <dueno@src.gnome.org> | 2016-01-05 22:13:03 +0900 |
commit | 2f98b73d42fc65e9c1c3feaefe0ba1fe0fd1b66e (patch) | |
tree | 9deb6b62282156b8e55d5a11f90154e37961a1b4 /data | |
parent | 08b8df77360d88aa3d12013a0b4bccd4295c10b5 (diff) | |
download | appstream-glib-2f98b73d42fc65e9c1c3feaefe0ba1fe0fd1b66e.tar.gz |
Install gettext ITS rules
Recent gettext release has a feature to allow consumer projects to
supply their own string extraction rules for XML files, in ITS format.
Gettext itself ships the rules for AppData, but it would be better
maintained in the upstream project.
Diffstat (limited to 'data')
-rw-r--r-- | data/Makefile.am | 3 | ||||
-rw-r--r-- | data/appdata.its | 10 | ||||
-rw-r--r-- | data/appdata.loc | 9 |
3 files changed, 22 insertions, 0 deletions
diff --git a/data/Makefile.am b/data/Makefile.am index 032c33c..b902cba 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -20,6 +20,9 @@ man_MANS += \ endif endif +itsdatadir = $(datadir)/gettext/its +dist_itsdata_DATA = appdata.its appdata.loc + XSLTPROC_FLAGS = \ --nonet \ --stringparam man.output.quietly 1 \ diff --git a/data/appdata.its b/data/appdata.its new file mode 100644 index 0000000..734a8e5 --- /dev/null +++ b/data/appdata.its @@ -0,0 +1,10 @@ +<?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/screenshots/screenshot/caption" + translate="yes"/> +</its:rules> diff --git a/data/appdata.loc b/data/appdata.loc new file mode 100644 index 0000000..97dd7eb --- /dev/null +++ b/data/appdata.loc @@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<locatingRules> + <locatingRule name="AppData" pattern="*.appdata.xml"> + <documentRule localName="component" target="appdata.its"/> + </locatingRule> + <locatingRule name="AppData" pattern="*.metainfo.xml"> + <documentRule localName="component" target="appdata.its"/> + </locatingRule> +</locatingRules> |