<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">Hi devs,</div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">For do the plugin translations I use</div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">1) Linguist from QT5</div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">2) The command line: <span><br></span></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><span>    Pylupdate4 -noobsolete PluginName.pro (Is there a new version 5??)</span><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">3) and the classical code:</div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><br></div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><span>        # initialize locale<br>        locale = QSettings().value('locale/userLocale')[0:2]<br>        locale_path = os.path.join(<br>            self.plugin_dir,<br>            'i18n',<br>            'PluginName_{}.qm'.format(locale))<br><br>        if os.path.exists(locale_path):<br>            self.translator = QTranslator()<br>            self.translator.load(locale_path)<br><br>            if qVersion() > '4.3.3':<br></span><div><span>                QCoreApplication.installTranslator(self.translator)</span></div><div><span><br></span></div><div><span><span>        def tr(self, message):<br></span></span><div><span><span>            return QCoreApplication.translate(QWaterPlugin.SETTINGS, message)</span></span></div><div><span></span><br></div><div><br></div><div>The problem is that the option to use self.tr('message string') is not working. It only works when I use QCoreApplication.translate('Escope', <span>'message string') even if a tr function defined.<br></span></div><div><span><br></span></div><div><span>It used to work if linguist from QT4.<br></span></div><div><span><br></span></div><div><span>What  Am I doing wrong? BTW Is there a new better way to translate plugins?</span></div><div><span><br></span></div><div><span>Thanks,</span></div><div><span><br></span></div><div><span>Jorge Almerio</span><br></div><div><br></div></div></div></div></body></html>