[PyQt] Using self.tr() with python string formatting

Itay Brandes akari.il at gmail.com
Fri Aug 3 11:55:47 BST 2012


right now for using self.tr() with python string formatting, i do the
following thing:

unicode(self.tr("%d out of %d completed")) % (i, n)

is there a way to somehow combine the unicode & self.tr, or make them look
shorter?
because calling unicode(self.tr()) on every shown string makes a lot of
code noise

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20120803/cac3f509/attachment.html>


More information about the PyQt mailing list