<div dir="ltr"><div><div><div><div><div><div>The pylupdate5 docs [1] do not make clear what inputs are essential in order to get .ts files out.<br><br>Does it require calls to translate() to be grouped in a retranslateUi() method as created by Designer output?<br>
<br>And/or does it look for calls to translate() by a particular name?<br><br>I am writing an app that I expect to have translated, not using Designer for most widgets, and began writing code like this:<br><br></div>> _TR = QCoreApplication.translate<br>
> ...<br>> (chosen_path, _) = QFileDialog.getOpenFileName(self,<br></div>> _TR("EditViewWidget",<br>> "Choose a file of OCR error words to mark",<br>
> "File dialog caption"), ... )<br>
<br></div>In other words, giving translate() a different name, and casually embedding calls to it at the point where a literal string is used. Then I thought, hold on, will pylupdate be able to see that?<br><br></div>What is the expected or best practice for coding strings for translation?<br>
<br></div>Thanks,<br></div>Dave Cortesi<br><br><div><br><div><div><br><div><br><div><br><div><div><br><br></div></div></div></div></div></div></div></div>