* Allow to skip time consuming update by setting SKIP_TUU=true.

OBS-URL: https://build.opensuse.org/package/show/Base:System/translation-update-upstream?expand=0&rev=30
This commit is contained in:
Stanislav Brabec 2011-09-07 12:45:34 +00:00 committed by Git OBS Bridge
parent a5dd61c54b
commit 7fe97977fb
2 changed files with 16 additions and 4 deletions

View File

@ -1,10 +1,11 @@
-------------------------------------------------------------------
Tue Sep 6 16:46:07 CEST 2011 - sbrabec@suse.cz
Wed Sep 7 14:44:21 CEST 2011 - sbrabec@suse.cz
- Supplementary scripts improvements:
* Support for pot-only run (COLLECT_UPSTREAM=false).
* Implemented check for possible strings in patches.
* Support for import of strings from different gettext domain.
* Allow to skip time consuming update by setting SKIP_TUU=true.
-------------------------------------------------------------------
Thu Jul 7 20:57:26 CEST 2011 - sbrabec@suse.cz

View File

@ -82,7 +82,12 @@ for POT in *.pot ; do
PO=${PO_PATH##*/}
LNG=${PO%.po}
if test -f $PO ; then
if test "$SKIP_TUU" = true ; then
echo "SKIP_TUU is set. Skipping update of $PO."
continue
fi
echo "Updating $PO using translation-update-upstream."
echo "(You can skip update by setting environment variable SKIP_TUU=true.)"
# PO_PATH is first: Update any string, even if it was already translated.
# Swap $PO_PATH and $PO to disable this behavior.
msgcat --use-first $PO_PATH $PO -o $PO.new
@ -109,7 +114,12 @@ for POT in *.pot ; do
PO=${PO_PATH##*/}
LNG=${PO%.po}
if test -f $PO ; then
if test "$SKIP_TUU" = true ; then
echo "SKIP_TUU is set. Skipping update of $PO."
continue
fi
echo "Updating $PO using translation-update-upstream mandatory source."
echo "(You can skip update by setting environment variable SKIP_TUU=true.)"
# PO_PATH is first: Update any string, even if it was already translated.
# Swap $PO_PATH and $PO to disable this behavior.
msgcat --use-first $PO_PATH $PO -o $PO.new
@ -129,12 +139,13 @@ for POT in *.pot ; do
done
MISSING=false
fi
if $MISSING ; then
echo "WARNING: Missing $DOMAIN in translation-update-upstream configuration! No updates available."
fi
else
echo "ERROR: Package translation-update-upstream is not installed. Please update your BuildRequires!"
exit 1
fi
fi
done
if $MISSING ; then
echo "ERROR: Pot file was not created. Translation update failed!"
exit 1
fi