From: Tim E. R. <ter...@ro...> - 2011-10-10 19:06:27
|
> Am 10.10.2011 01:56, schrieb Tim E. Real: > > Hey Flo and Orcan, can't seem to find that email. > > > > What did you ask us to do about translations again? > > > > For example in midiport.cpp:midiPortsPopup() I have > > > > popup->setTitle(popup->tr("Empty")); > > > > Wrong, right? > > > dunno if it's wrong, but strange. That's because this particular statement is inside a stand-alone function, not in a QOBJECT class method. So the only way to grab 'tr' is with an existing object (popup) or with QObject itself. Simply using 'tr' alone will not compile. Tim. > > popup->setTitle(tr("Empty")); > > would have done as well. > > robert already found the other rules. they were concerning stuff like tr("the error ") + QString(errorstring) + tr(" occurred") (which should be replaced by tr("the error %1 occurred").arg(errorstring), and plural stuff > > > > Thanks. Tim. > > > > > |