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
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:50bf8de27cf2ec859493adf766727ebcd577a77cc25e462fc4b505136a4b84a9
|
oid sha256:3ff8e9df1107b1caf26b5d47d92cae7827c88107d99fe744d48e6fd42d678445
|
||||||
size 9001590
|
size 9188104
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# vim: sw=4 et
|
||||||
# Transform desktop mimetype info into RPM provides
|
# Transform desktop mimetype info into RPM provides
|
||||||
|
|
||||||
OLD_IFS="$IFS"
|
OLD_IFS="$IFS"
|
||||||
while read instfile ; do
|
while read instfile ; do
|
||||||
case "$instfile" in
|
case "$instfile" in
|
||||||
*.desktop)
|
*.desktop)
|
||||||
mime=`cat $instfile | grep MimeType | cut -d'=' -f2`
|
mime=$(sed -re '/^MimeType *= *([a-zA-Z0-9. _/;-]*)/!d' $instfile | cut -d'=' -f2)
|
||||||
IFS=';'
|
IFS=';'
|
||||||
for type in $mime ; do
|
for type in $mime ; do
|
||||||
echo 'mimetype('$type')'
|
echo 'mimetype('$type')'
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
IFS=$OLD_IFS
|
IFS=$OLD_IFS
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#
|
#
|
||||||
INSTALL=no
|
INSTALL=no
|
||||||
I18N=yes
|
I18N=yes
|
||||||
|
TRIM=no
|
||||||
CREATE=no
|
CREATE=no
|
||||||
RESET=no
|
RESET=no
|
||||||
UNIMPORTANT=no
|
UNIMPORTANT=no
|
||||||
@ -29,6 +30,10 @@ while [ "${1:0:1}" = "-" ]; do
|
|||||||
I18N=no
|
I18N=no
|
||||||
shift
|
shift
|
||||||
continue;;
|
continue;;
|
||||||
|
-t|--trim-i18n)
|
||||||
|
TRIM=yes
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
-i|--install)
|
-i|--install)
|
||||||
INSTALL=yes
|
INSTALL=yes
|
||||||
shift
|
shift
|
||||||
@ -326,19 +331,28 @@ if [ "$I18N" = "yes" ]; then
|
|||||||
echo "ERROR: $FILE is not an UTF-8 file"
|
echo "ERROR: $FILE is not an UTF-8 file"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
#
|
|
||||||
# Merge translations
|
if [ "$TRIM" = "no" ]; then
|
||||||
#
|
#
|
||||||
cp $FILE ${FILE}.old
|
# Merge translations
|
||||||
/usr/bin/suse-desktop-merge $FILE > ${FILE}_ || exit 1
|
#
|
||||||
perl /usr/share/update-desktop-files/untranslate.pl ${FILE}_ > ${FILE}.new
|
cp $FILE ${FILE}.old
|
||||||
if ! cmp -s ${FILE}.old ${FILE}.new; then
|
/usr/bin/suse-desktop-merge $FILE > ${FILE}_ || exit 1
|
||||||
echo "UNTRANSLATE DOES NOT WORK"
|
perl /usr/share/update-desktop-files/untranslate.pl ${FILE}_ > ${FILE}.new
|
||||||
diff -u ${FILE}.old ${FILE}.new
|
if ! cmp -s ${FILE}.old ${FILE}.new; then
|
||||||
exit 1
|
echo "UNTRANSLATE DOES NOT WORK"
|
||||||
|
diff -u ${FILE}.old ${FILE}.new
|
||||||
|
exit 1
|
||||||
|
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
|
fi
|
||||||
mv ${FILE}_ $FILE
|
|
||||||
rm -f ${FILE}.old ${FILE}.new
|
|
||||||
else
|
else
|
||||||
#
|
#
|
||||||
# this file will not get translated
|
# 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
|
Thu Sep 25 16:56:23 CEST 2008 - sreeves@suse.de
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
Name: update-desktop-files
|
Name: update-desktop-files
|
||||||
Version: 11.0
|
Version: 11.0
|
||||||
Release: 54
|
Release: 55
|
||||||
Summary: A Build Tool to Update Desktop Files
|
Summary: A Build Tool to Update Desktop Files
|
||||||
License: GPL v2 or later
|
License: GPL v2 or later
|
||||||
Group: Development/Tools/Building
|
Group: Development/Tools/Building
|
||||||
@ -110,6 +110,18 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
|
||||||
%changelog
|
%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
|
* Thu Sep 25 2008 sreeves@suse.de
|
||||||
- add mimetype.prov to generate mime type rpm provides at build time
|
- add mimetype.prov to generate mime type rpm provides at build time
|
||||||
* Fri Sep 19 2008 ke@suse.de
|
* Fri Sep 19 2008 ke@suse.de
|
||||||
|
Loading…
Reference in New Issue
Block a user