OBS User unknown 2008-10-06 14:13:53 +00:00 committed by Git OBS Bridge
parent cfad3d4ab3
commit 8ed8f7e22d
5 changed files with 74 additions and 27 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:50bf8de27cf2ec859493adf766727ebcd577a77cc25e462fc4b505136a4b84a9
size 9001590
oid sha256:3ff8e9df1107b1caf26b5d47d92cae7827c88107d99fe744d48e6fd42d678445
size 9188104

View File

@ -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`
IFS=';'
for type in $mime ; do
echo 'mimetype('$type')'
done
;;
esac
done
IFS=$OLD_IFS
case "$instfile" in
*.desktop)
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

View File

@ -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,19 +331,28 @@ if [ "$I18N" = "yes" ]; then
echo "ERROR: $FILE is not an UTF-8 file"
exit 1
fi
#
# Merge translations
#
cp $FILE ${FILE}.old
/usr/bin/suse-desktop-merge $FILE > ${FILE}_ || exit 1
perl /usr/share/update-desktop-files/untranslate.pl ${FILE}_ > ${FILE}.new
if ! cmp -s ${FILE}.old ${FILE}.new; then
echo "UNTRANSLATE DOES NOT WORK"
diff -u ${FILE}.old ${FILE}.new
exit 1
if [ "$TRIM" = "no" ]; then
#
# Merge translations
#
cp $FILE ${FILE}.old
/usr/bin/suse-desktop-merge $FILE > ${FILE}_ || exit 1
perl /usr/share/update-desktop-files/untranslate.pl ${FILE}_ > ${FILE}.new
if ! cmp -s ${FILE}.old ${FILE}.new; then
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
mv ${FILE}_ $FILE
rm -f ${FILE}.old ${FILE}.new
else
#
# this file will not get translated

View File

@ -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

View File

@ -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