explicitly import _ in forms/
This commit is contained in:
parent
3721cc4604
commit
d802a53161
@ -27,10 +27,11 @@ do
|
||||
echo "from . import $base" >> $temp
|
||||
if [ $i -nt $py ]; then
|
||||
echo " * "$py
|
||||
pyuic5 --from-imports $i -o $py
|
||||
pyuic5 --from-imports $i -o $py.tmp
|
||||
# munge the output to use gettext
|
||||
perl -pi.bak -e 's/(QtGui\.QApplication\.)?_?translate\(".*?", /_(/; s/, None.*/))/' $py
|
||||
rm $py.bak
|
||||
cat $py.tmp | sed "/WARNING/ a\\
|
||||
from anki.lang import _" | perl -p -e 's/(QtGui\.QApplication\.)?_?translate\(".*?", /_(/; s/, None.*/))/' > $py
|
||||
rm $py.tmp
|
||||
fi
|
||||
done
|
||||
echo "]" >> $init
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
TOOLS="$(cd "`dirname "$0"`"; pwd)"
|
||||
pylint -E -j 0 -f colorized --disable=E0602 $TOOLS/../anki $TOOLS/../aqt
|
||||
pylint -E -j 0 -f colorized $TOOLS/../anki $TOOLS/../aqt
|
||||
|
Loading…
Reference in New Issue
Block a user