diff --git a/translation-update-upstream.changes b/translation-update-upstream.changes index 3437748..c094f0c 100644 --- a/translation-update-upstream.changes +++ b/translation-update-upstream.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 24 13:52:12 UTC 2011 - coolo@novell.com + +- fake %find_lang as if the translations are provided by the packages + ------------------------------------------------------------------- Wed Feb 23 17:11:45 CET 2011 - sbrabec@suse.cz diff --git a/translation-update-upstream.spec b/translation-update-upstream.spec index 7774777..ae439f6 100644 --- a/translation-update-upstream.spec +++ b/translation-update-upstream.spec @@ -126,13 +126,18 @@ rm -v $RPM_BUILD_ROOT%{_datadir}/%{name}/po/glib-networking/master.po # # go through valid locales and fail in invalid ones # +set +x cd $RPM_BUILD_ROOT%{_datadir} ; echo translation*/*/*.po | sed 's:.*/::;s:\.po$::' | sort -u for LOCALE in $(set +x ; cd $RPM_BUILD_ROOT%{_datadir} ; ls -1 translation*/*/*/*.po | sed 's:.*/::;s:\.po$::' | sort -u) ; do if ! test -d /usr/share/locale/$LOCALE ; then - echo "Invalid locale $LOCALE! Please fix (delete, rename or add to filesystem package)." - exit 1 - fi + for file in $RPM_BUILD_ROOT%{_datadir}/translation*/*/*/$LOCALE.po; do + # fake it so it looks like removed from %find_lang + package=$(echo $file | sed -e 's,.*translation[^/]*/po/,,; s,/[^/]*.po,,') + echo -n "removing translation /usr/share/locale/$LOCALE/LC_MESSAGES/$package.mo: " + msgfmt -o - $file | msgunfmt -o - -| msgfmt --statistics -o /dev/null - + done + fi done %clean