2018-01-31 15:06:28 +01:00
|
|
|
--- ./scripts/find-lang.sh.orig 2018-01-31 13:37:22.810352621 +0000
|
|
|
|
+++ ./scripts/find-lang.sh 2018-01-31 13:39:38.117990971 +0000
|
|
|
|
@@ -32,6 +32,7 @@ Additional options:
|
2016-05-19 14:15:30 +02:00
|
|
|
--with-man find localized man pages
|
|
|
|
--all-name match all package/domain names
|
|
|
|
--without-mo do not find locale files
|
|
|
|
+ --metainfo create a metainfo.xml file for AppStream
|
|
|
|
EOF
|
|
|
|
exit 1
|
|
|
|
}
|
2018-01-31 15:06:28 +01:00
|
|
|
@@ -62,6 +63,7 @@ ALL_NAME=#
|
2016-05-19 14:15:30 +02:00
|
|
|
NO_ALL_NAME=
|
|
|
|
ONLY_C=#
|
|
|
|
NO_C=#
|
2017-01-19 16:41:55 +01:00
|
|
|
+METAINFO=#
|
2016-05-19 14:15:30 +02:00
|
|
|
while test $# -gt 0 ; do
|
|
|
|
case "${1}" in
|
2018-01-31 15:06:28 +01:00
|
|
|
--with-gnome )
|
|
|
|
@@ -113,6 +115,11 @@ while test $# -gt 0 ; do
|
2016-05-19 14:15:30 +02:00
|
|
|
NO_C=
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
+ --metainfo )
|
2017-01-19 16:41:55 +01:00
|
|
|
+ METAINFO=
|
2016-05-19 14:15:30 +02:00
|
|
|
+ METADESKID=${2}
|
|
|
|
+ shift 2
|
|
|
|
+ ;;
|
|
|
|
* )
|
2018-01-31 15:06:28 +01:00
|
|
|
if [ $MO_NAME != ${NAMES[$#]}.lang ]; then
|
|
|
|
NAMES[${#NAMES[@]}]=$MO_NAME
|
|
|
|
@@ -323,6 +330,24 @@ if ! grep -q / $MO_NAME_NEW; then
|
2016-05-19 14:15:30 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2017-01-19 16:41:55 +01:00
|
|
|
+if [ -z "${METAINFO}" ] ; then
|
2016-05-19 14:15:30 +02:00
|
|
|
+ # create a metainfo.xml file for METADESKID
|
|
|
|
+ mkdir -p ${TOP_DIR}/usr/share/appdata
|
|
|
|
+ cat > ${TOP_DIR}/usr/share/appdata/${METADESKID}-lang.metainfo.xml <<EOF
|
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
+<!-- Copyright 2016 openSUSE - file is auto-generated -->
|
|
|
|
+<component type="addon">
|
|
|
|
+ <id>${METADESKID}-lang</id>
|
|
|
|
+ <extends>${METADESKID}.desktop</extends>
|
|
|
|
+ <name>Translations</name>
|
|
|
|
+ <summary>Translate the user interface</summary>
|
|
|
|
+ <metadata_license>CC0-1.0</metadata_license>
|
|
|
|
+ <updatecontact>https://bugzilla.opensuse.org</updatecontact>
|
|
|
|
+</component>
|
|
|
|
+EOF
|
|
|
|
+ echo /usr/share/appdata/${METADESKID}-lang.metainfo.xml >> $MO_NAME_NEW
|
|
|
|
+fi
|
|
|
|
+
|
|
|
|
sort -u $MO_NAME_NEW >> $MO_NAME
|
|
|
|
rm -f $MO_NAME_NEW
|
|
|
|
|