Stephan Kulow 2015-08-29 18:03:28 +00:00 committed by Git OBS Bridge
commit 4fc4c6ca60
3 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 21 16:23:02 CEST 2015 - sbrabec@suse.com
- upstream-collect.sh supplementary script: Prevent plural form
clash in case of additions only (bsc#894913).
-------------------------------------------------------------------
Thu Sep 4 17:32:24 CEST 2014 - sbrabec@suse.cz

View File

@ -1,7 +1,7 @@
#
# spec file for package translation-update-upstream
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed

View File

@ -564,7 +564,6 @@ for TLST in *.tlst ; do
echo >>$WORK_DIR/upstream-collect.log "package=$PACKAGE domain=$DOMAIN gettext-package=$REAL_DOMAIN repository=$REPO directory=$RPMPODIR branch=${BRANCH:(default)} po=$PO: old po file, skipping fixes"
OLD_UPDATE=true
fi
# FIXME: There could be an exotic case, where obsolete update adds new strings that contain plurals, and plural number changed. In such case, exclusion of updates may cause plural clash. In such case we have to validate additions only with the new or old plural-form header, and if both fails, skip additions as well. (bnc#894913)
msgcat --force-po --use-first ${PO%.po}-uheader.po ${PO%.po}-backport.po~ $WORK_DIR/UPDATE/po/$REAL_DOMAIN/$PO -o ${PO%.po}-upstream.po
if ! validate_po_with_plural_check ${PO%.po}-upstream.po ; then
if $PLURAL_FAILURE ; then
@ -594,6 +593,13 @@ for TLST in *.tlst ; do
if $OLD_UPDATE ; then
# If the update has an old time stamp, don't include fixes. Use just additions.
msgcat ${PO%.po}-additions.po~ -o $RPMPODIR/${PO%.po}-updatesraw.po
# "updatesraw" can have inconsistent plural forms even if "upstream" has them consistent (bsc#894913).
# Other failures are not possible here (superset was already validated).
if ! validate_po_with_plural_check ${PO%.po}-updatesraw.po ; then
# => There is no chance that --old-plural-forms succeeds. Don't try it and fail.
echo >>$WORK_DIR/upstream-collect.log "package=$PACKAGE domain=$DOMAIN gettext-package=$REAL_DOMAIN repository=$REPO directory=$RPMPODIR branch=${BRANCH:(default)} po=$PO: validation error (merged translation additions), possible plural forms clash"
exit
fi
else
msgcat ${PO%.po}-fixes.po~ ${PO%.po}-additions.po~ -o $RPMPODIR/${PO%.po}-updatesraw.po
fi