diff --git a/tools/build_ui.sh b/tools/build_ui.sh index 52a8b46b0..a8f44dabd 100755 --- a/tools/build_ui.sh +++ b/tools/build_ui.sh @@ -28,9 +28,11 @@ do if [ $i -nt $py ]; then echo " * "$py pyuic5 --from-imports $i -o $py.tmp - # munge the output to use gettext - cat $py.tmp | sed "/WARNING/ a\\ -from anki.lang import _" | perl -p -e 's/(QtGui\.QApplication\.)?_?translate\(".*?", /_(/; s/, None.*/))/' > $py + (cat < $py +# -*- coding: utf-8 -*- +# pylint: disable=unsubscriptable-object +from anki.lang import _ +EOF rm $py.tmp fi done