From 70902272693f45f508370f1a867bf3922fefb694 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 14 May 2018 05:10:45 -0400 Subject: [PATCH] i18n: fix up tooling - suppress languages we've decided not to have anymore - prevent txpull from losing .desktop keys it doesn't understand, by splitting off a desktop.in file with only the (source) fields. --- calamares.desktop.in | 15 +++++++++++++++ ci/txpull.sh | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 calamares.desktop.in diff --git a/calamares.desktop.in b/calamares.desktop.in new file mode 100644 index 000000000..0c4041bcb --- /dev/null +++ b/calamares.desktop.in @@ -0,0 +1,15 @@ +[Desktop Entry] +Type=Application +Version=1.0 +Name=Install System +GenericName=System Installer +Keywords=calamares;system;installer +TryExec=calamares +Exec=pkexec /usr/bin/calamares +Comment=Calamares — System Installer +Icon=calamares +Terminal=false +StartupNotify=true +Categories=Qt;System; +X-AppStream-Ignore=true + diff --git a/ci/txpull.sh b/ci/txpull.sh index 92986fdfc..4206739dd 100755 --- a/ci/txpull.sh +++ b/ci/txpull.sh @@ -29,6 +29,25 @@ test -f "calamares.desktop" || { echo "! Not at Calamares top-level" ; exit 1 ; export QT_SELECT=5 tx pull --force --source --all +### CLEANUP TRANSLATIONS +# +# Some languages have been deprecated. They may still exist in Transifex, +# so clean them up after pulling. +# +drop_language() { + rm -rf lang/python/"$1" src/modules/dummypythonqt/lang/"$1" lang/calamares_"$1".ts + grep -v "\\[$1]" calamares.desktop > calamares.desktop.new + mv calamares.desktop.new calamares.desktop +} + +drop_language es_ES +drop_language pl_PL + +# Also fix the .desktop file, which has some fields removed by Transifex. +# +{ cat calamares.desktop.in ; grep "\\[[a-zA-Z_@]*]=" calamares.desktop ; } > calamares.desktop.new +mv calamares.desktop.new calamares.desktop + ### COMMIT TRANSLATIONS # # Produce multiple commits (for the various parts of the i18n