diff options
author | Adriaan de Groot <groot@kde.org> | 2020-01-25 16:31:28 +0100 |
---|---|---|
committer | Adriaan de Groot <groot@kde.org> | 2020-01-25 17:02:07 +0100 |
commit | 053fa28b19db23c1645acf0357022f4d26beeb39 (patch) | |
tree | 45bdca4dbcb49464b3227d574913faacca5b1525 /ci/txpush.sh | |
parent | 5dad5dae02980d3c7da8b33dd11aeaf8f35a6fa5 (diff) |
CI: improve TX consistency
- txpush
- don't try to push TX for the timezone list
- xmllint --format the .ts files to avoid inconsistency between
TX tool versions
- txcheck
- xmllint --format
- hard-code the list of files, it's not worth the hassle
- don't apply XML cleanups to POT files
- strip linenumbers from POT files for diffing
Diffstat (limited to 'ci/txpush.sh')
-rwxr-xr-x | ci/txpush.sh | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/ci/txpush.sh b/ci/txpush.sh index 930b7ebc2..7d2c1ffaa 100755 --- a/ci/txpush.sh +++ b/ci/txpush.sh @@ -45,11 +45,10 @@ else } fi -### CREATE TRANSLATIONS -# -# Use local tools (depending on type of source) to create translation -# sources, then push to Transifex +### FIND EXECUTABLES +# +# LUPDATE="" for _lupdate in lupdate lupdate-qt5 do @@ -58,19 +57,41 @@ do $_lupdate -version > /dev/null 2>&1 && LUPDATE=$_lupdate test -n "$LUPDATE" && break done - test -n "$LUPDATE" || { echo "! No working lupdate" ; lupdate -version ; exit 1 ; } +XMLLINT="" +for _xmllint in xmllint +do + $_xmllint --version > /dev/null 2>&1 && XMLLINT=$_xmllint + test -n "$XMLLINT" && break +done +# XMLLINT is optional + + +### CREATE TRANSLATIONS +# +# Use local tools (depending on type of source) to create translation +# sources, then push to Transifex + # Don't pull branding translations in, # those are done separately. _srcdirs="src/calamares src/libcalamares src/libcalamaresui src/modules src/qml" $LUPDATE -no-obsolete $_srcdirs -ts lang/calamares_en.ts -$LUPDATE -no-obsolete -extensions cxxtr src/libcalamares/locale -ts lang/tz_en.ts +# Updating the TZ only needs to happen when the TZ themselves are updated, +# very-very-rarely. +# $LUPDATE -no-obsolete -extensions cxxtr src/libcalamares/locale -ts lang/tz_en.ts + +if test -n "$XMLLINT" ; then + for f in lang/calamares_en.ts + do + $XMLLINT --format -o "$f".new "$f" && mv "$f".new "$f" + done +fi tx push --source --no-interactive -r calamares.calamares-master -tx push --source --no-interactive -r calamares.tz tx push --source --no-interactive -r calamares.fdo + ### PYTHON MODULES # # The Python tooling depends on the underlying distro to provide |