Accepting request 510908 from X11:common:Factory

- Remove translations for Name,GenericName and Comment only in the
  [Desktop Entry] section to avoid breaking desktop action translations

OBS-URL: https://build.opensuse.org/request/show/510908
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/update-desktop-files?expand=0&rev=98
This commit is contained in:
Dominique Leuenberger 2017-07-30 09:24:18 +00:00 committed by Git OBS Bridge
commit 3396568e78
3 changed files with 9 additions and 2 deletions

View File

@ -84,8 +84,8 @@ strip_desktop_lang() {
echo "trimmed output to ${BASEDIR}/${type}/${nfile}"
echo "trimmed output to $BASEDIR/$RPM_PACKAGE_NAME.desktopfiles"
sed -e '/^\(Name\[\|GenericName\[\|Comment\[\)/d' -e '/^\[Desktop Entry\]/a \
X-SuSE-translate=true' "${file}" > "${file}_" && mv "${file}_" "${file}"
# Remove translations for Name,GenericName and Comment only in the [Desktop Entry] section
awk '/^\[/ { translate=0 } /^\[Desktop Entry\]/ { translate=1; print $0; print "X-SuSE-translate=true"; next } /^(Name\[|GenericName\[|Comment\[)/ && translate==1 { next; } { print $0 }' "${file}" > "${file}_" && mv "${file}_" "${file}"
}
# Handle polkit actions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jul 14 13:15:57 UTC 2017 - fvogt@suse.com
- Remove translations for Name,GenericName and Comment only in the
[Desktop Entry] section to avoid breaking desktop action translations
-------------------------------------------------------------------
Tue Mar 14 16:13:15 UTC 2017 - fvogt@suse.com

View File

@ -42,6 +42,7 @@ Summary: Trim translations from desktop files, polkit actions, mimetype d
Group: Development/Tools/Building
Provides: brp-trim-desktop = %{version}
Obsoletes: brp-trim-desktop < %{version}
Requires: awk
Requires: libxslt-tools
%description -n brp-trim-translations