CI: Canonicalize XML first
- Do XML processing / canonicalisation in txpush only - Run the *HEAD* version of txpush in both worktrees
This commit is contained in:
parent
64b56664de
commit
fa466b447c
@ -71,19 +71,15 @@ done
|
|||||||
# The state of translations
|
# The state of translations
|
||||||
tx_sum()
|
tx_sum()
|
||||||
{
|
{
|
||||||
|
CURDIR=`pwd`
|
||||||
WORKTREE_NAME="$1"
|
WORKTREE_NAME="$1"
|
||||||
WORKTREE_TAG="$2"
|
WORKTREE_TAG="$2"
|
||||||
|
|
||||||
git worktree add $WORKTREE_NAME $WORKTREE_TAG > /dev/null 2>&1 || { echo "! Could not create worktree." ; exit 1 ; }
|
git worktree add $WORKTREE_NAME $WORKTREE_TAG > /dev/null 2>&1 || { echo "! Could not create worktree." ; exit 1 ; }
|
||||||
( cd $WORKTREE_NAME && sh ci/txpush.sh --no-tx ) > /dev/null 2>&1 || { echo "! Could not re-create translations." ; exit 1 ; }
|
( cd $WORKTREE_NAME && sh "$CURDIR"/ci/txpush.sh --no-tx ) > /dev/null 2>&1 || { echo "! Could not re-create translations." ; exit 1 ; }
|
||||||
# Clean up the TS (XML) files (like txpush would)
|
|
||||||
TS_FILE="$WORKTREE_NAME/lang/calamares_en.ts"
|
|
||||||
if test -n "$XMLLINT" ; then
|
|
||||||
$XMLLINT --format --encode utf-8 -o "$TS_FILE".new "$TS_FILE" && mv "$TS_FILE".new "$TS_FILE"
|
|
||||||
fi
|
|
||||||
sed -i'' -e '/<location filename/d' $TS_FILE
|
|
||||||
|
|
||||||
# Remove linenumbers from .pot
|
# Remove linenumbers from .ts (XML) and .pot
|
||||||
|
sed -i'' -e '/<location filename/d' "$WORKTREE_NAME/lang/calamares_en.ts"
|
||||||
sed -i'' -e '/^#: src..*[0-9]$/d' $WORKTREE_NAME/lang/python.pot $WORKTREE_NAME/src/modules/dummypythonqt/lang/dummypythonqt.pot
|
sed -i'' -e '/^#: src..*[0-9]$/d' $WORKTREE_NAME/lang/python.pot $WORKTREE_NAME/src/modules/dummypythonqt/lang/dummypythonqt.pot
|
||||||
|
|
||||||
_SUM=$( cd $WORKTREE_NAME && cat $TX_FILE_LIST | sha256sum )
|
_SUM=$( cd $WORKTREE_NAME && cat $TX_FILE_LIST | sha256sum )
|
||||||
|
@ -83,7 +83,7 @@ $LUPDATE -no-obsolete $_srcdirs -ts lang/calamares_en.ts
|
|||||||
|
|
||||||
if test -n "$XMLLINT" ; then
|
if test -n "$XMLLINT" ; then
|
||||||
TS_FILE="lang/calamares_en.ts"
|
TS_FILE="lang/calamares_en.ts"
|
||||||
$XMLLINT --format --encode utf-8 -o "$TS_FILE".new "$TS_FILE" && mv "$TS_FILE".new "$TS_FILE"
|
$XMLLINT --c14n11 "$TS_FILE" | $XMLLINT --format --encode utf-8 -o "$TS_FILE".new - && mv "$TS_FILE".new "$TS_FILE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tx push --source --no-interactive -r calamares.calamares-master
|
tx push --source --no-interactive -r calamares.calamares-master
|
||||||
|
Loading…
Reference in New Issue
Block a user