PySide.QtCore.QCoreApplication.translate has changed its function
signature because QtGui.QApplication.UnicodeUTF8 is deprecated.
See: https://srinikom.github.io/pyside-docs/PySide/QtCore/QCoreApplication.html#PySide.QtCore.PySide.QtCore.QCoreApplication.translate
Resulted in the following error when running the macro:
<class 'TypeError'>: 'PySide.QtCore.QCoreApplication.translate' called with wrong argument types:
PySide.QtCore.QCoreApplication.translate(str, str, NoneType, int)
Supported signatures:
PySide.QtCore.QCoreApplication.translate(unicode, unicode, unicode = None, PySide.QtCore.QCoreApplication.Encoding = CodecForTr)
PySide.QtCore.QCoreApplication.translate(unicode, unicode, unicode, PySide.QtCore.QCoreApplication.Encoding, int)
Fix by setting the default translation codec to UTF-8, and letting
translate() pick that up itself by using the second supported method signature.
Also tidied up 4 cases where the helper function wasn't being used.
Reported in issue #251.
Signed-off-by: Laurence Rochfort <laurence.rochfort@gmail.com>