mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22:23 -04:00
explicitly import _ in forms/
This commit is contained in:
parent
3721cc4604
commit
d802a53161
2 changed files with 5 additions and 4 deletions
|
@ -27,10 +27,11 @@ do
|
||||||
echo "from . import $base" >> $temp
|
echo "from . import $base" >> $temp
|
||||||
if [ $i -nt $py ]; then
|
if [ $i -nt $py ]; then
|
||||||
echo " * "$py
|
echo " * "$py
|
||||||
pyuic5 --from-imports $i -o $py
|
pyuic5 --from-imports $i -o $py.tmp
|
||||||
# munge the output to use gettext
|
# munge the output to use gettext
|
||||||
perl -pi.bak -e 's/(QtGui\.QApplication\.)?_?translate\(".*?", /_(/; s/, None.*/))/' $py
|
cat $py.tmp | sed "/WARNING/ a\\
|
||||||
rm $py.bak
|
from anki.lang import _" | perl -p -e 's/(QtGui\.QApplication\.)?_?translate\(".*?", /_(/; s/, None.*/))/' > $py
|
||||||
|
rm $py.tmp
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "]" >> $init
|
echo "]" >> $init
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
TOOLS="$(cd "`dirname "$0"`"; pwd)"
|
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 a new issue