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.
This commit is contained in:
Adriaan de Groot 2018-05-14 05:10:45 -04:00
parent d354027114
commit 7090227269
2 changed files with 34 additions and 0 deletions

15
calamares.desktop.in Normal file
View File

@ -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

View File

@ -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