OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/update-desktop-files?expand=0&rev=53
This commit is contained in:
parent
cfad3d4ab3
commit
8ed8f7e22d
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:50bf8de27cf2ec859493adf766727ebcd577a77cc25e462fc4b505136a4b84a9
|
||||
size 9001590
|
||||
oid sha256:3ff8e9df1107b1caf26b5d47d92cae7827c88107d99fe744d48e6fd42d678445
|
||||
size 9188104
|
||||
|
@ -1,17 +1,17 @@
|
||||
#!/bin/sh
|
||||
# vim: sw=4 et
|
||||
# Transform desktop mimetype info into RPM provides
|
||||
|
||||
OLD_IFS="$IFS"
|
||||
while read instfile ; do
|
||||
case "$instfile" in
|
||||
*.desktop)
|
||||
mime=`cat $instfile | grep MimeType | cut -d'=' -f2`
|
||||
mime=$(sed -re '/^MimeType *= *([a-zA-Z0-9. _/;-]*)/!d' $instfile | cut -d'=' -f2)
|
||||
IFS=';'
|
||||
for type in $mime ; do
|
||||
echo 'mimetype('$type')'
|
||||
done
|
||||
;;
|
||||
esac
|
||||
done
|
||||
IFS=$OLD_IFS
|
||||
|
||||
done
|
||||
IFS=$OLD_IFS
|
||||
|
@ -13,6 +13,7 @@
|
||||
#
|
||||
INSTALL=no
|
||||
I18N=yes
|
||||
TRIM=no
|
||||
CREATE=no
|
||||
RESET=no
|
||||
UNIMPORTANT=no
|
||||
@ -29,6 +30,10 @@ while [ "${1:0:1}" = "-" ]; do
|
||||
I18N=no
|
||||
shift
|
||||
continue;;
|
||||
-t|--trim-i18n)
|
||||
TRIM=yes
|
||||
shift
|
||||
continue;;
|
||||
-i|--install)
|
||||
INSTALL=yes
|
||||
shift
|
||||
@ -326,6 +331,8 @@ if [ "$I18N" = "yes" ]; then
|
||||
echo "ERROR: $FILE is not an UTF-8 file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$TRIM" = "no" ]; then
|
||||
#
|
||||
# Merge translations
|
||||
#
|
||||
@ -339,6 +346,13 @@ if [ "$I18N" = "yes" ]; then
|
||||
fi
|
||||
mv ${FILE}_ $FILE
|
||||
rm -f ${FILE}.old ${FILE}.new
|
||||
else
|
||||
#
|
||||
# Trim translations (desktops will use gettext to find them)
|
||||
#
|
||||
grep -v -E '^Name\[|^GenericName\[|^Comment\[' $FILE > ${FILE}_
|
||||
mv ${FILE}_ $FILE
|
||||
fi
|
||||
else
|
||||
#
|
||||
# this file will not get translated
|
||||
|
@ -1,3 +1,24 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 2 18:16:16 CEST 2008 - vuntz@suse.de
|
||||
|
||||
- Add a -t/--trim option to suse_update_desktop_file.sh in order
|
||||
to trim all translations from a desktop file. The goal is to
|
||||
have the desktops use gettext to translate data from those files
|
||||
and to make it easy to update translations by just shipping an
|
||||
updated mo file. This is for fate#301344.
|
||||
- This change requires a change in /usr/lib/rpm/suse_macros (rpm
|
||||
package).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 2 17:02:32 CEST 2008 - ke@suse.de
|
||||
|
||||
- update translations.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 30 10:02:59 CEST 2008 - dmueller@suse.de
|
||||
|
||||
- fix mimetype.prov to not break for most KDE packages
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 25 16:56:23 CEST 2008 - sreeves@suse.de
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
Name: update-desktop-files
|
||||
Version: 11.0
|
||||
Release: 54
|
||||
Release: 55
|
||||
Summary: A Build Tool to Update Desktop Files
|
||||
License: GPL v2 or later
|
||||
Group: Development/Tools/Building
|
||||
@ -110,6 +110,18 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%defattr(-,root,root)
|
||||
|
||||
%changelog
|
||||
* Thu Oct 02 2008 vuntz@suse.de
|
||||
- Add a -t/--trim option to suse_update_desktop_file.sh in order
|
||||
to trim all translations from a desktop file. The goal is to
|
||||
have the desktops use gettext to translate data from those files
|
||||
and to make it easy to update translations by just shipping an
|
||||
updated mo file. This is for fate#301344.
|
||||
- This change requires a change in /usr/lib/rpm/suse_macros (rpm
|
||||
package).
|
||||
* Thu Oct 02 2008 ke@suse.de
|
||||
- update translations.
|
||||
* Tue Sep 30 2008 dmueller@suse.de
|
||||
- fix mimetype.prov to not break for most KDE packages
|
||||
* Thu Sep 25 2008 sreeves@suse.de
|
||||
- add mimetype.prov to generate mime type rpm provides at build time
|
||||
* Fri Sep 19 2008 ke@suse.de
|
||||
|
Loading…
Reference in New Issue
Block a user