title: PyQt internationalization
body: <p>I can transalate texts that comes from QtDesigner, but I can't translate anything that is defined outside it. </p>
  
  <p>In example this code:</p>
  
  <pre><code>from PyQt4.QtCore import QCoreApplication
  tr = QCoreApplication.translate
  
  
  class Flag(object):
  
      def __init__(self, name):
  
          self._name = name
          self._setting_events = []
          self._clearing_events = []
          self._toggle_events = []
          self._true_name = tr("Flags", u'True')
          self._false_name = tr("Flags", u'False')
  </code></pre>
  
  <p>According to <a href="http://pyqt.sourceforge.net/Docs/PyQt4/qcoreapplication.html#translate" rel="nofollow">documentation</a> first parameter is <em>context</em> and second is <em>sourceText</em>. But when I open my <code>.ts</code> file in QtLinguist, it shows that <em>context</em> is my <em>sourceText</em> and <em>sourceText</em> is a comment. Whatever, after translating it in QtLinguist I release <code>.qm</code> files and I run my app, but texts does not change. I see only passed <em>sourceText</em>, so in this example it's still <code>'True'</code> and not what I translated.</p>
  
  <p>What am I doing wrong?</p>