--- 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: --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 } @@ -62,6 +63,7 @@ ALL_NAME=# NO_ALL_NAME= ONLY_C=# NO_C=# +METAINFO=# while test $# -gt 0 ; do case "${1}" in --with-gnome ) @@ -113,6 +115,11 @@ while test $# -gt 0 ; do NO_C= shift ;; + --metainfo ) + METAINFO= + METADESKID=${2} + shift 2 + ;; * ) if [ $MO_NAME != ${NAMES[$#]}.lang ]; then NAMES[${#NAMES[@]}]=$MO_NAME @@ -323,6 +330,24 @@ if ! grep -q / $MO_NAME_NEW; then exit 1 fi +if [ -z "${METAINFO}" ] ; then + # create a metainfo.xml file for METADESKID + mkdir -p ${TOP_DIR}/usr/share/appdata + cat > ${TOP_DIR}/usr/share/appdata/${METADESKID}-lang.metainfo.xml < + + + ${METADESKID}-lang + ${METADESKID}.desktop + Translations + Translate the user interface + CC0-1.0 + https://bugzilla.opensuse.org + +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