[PyQt] Strings with variables in TS-File can not be loaded
Detlev Offenbach
detlev at die-offenbachs.de
Tue Sep 16 18:32:27 BST 2008
You should do it like this
DurationMsg=self.tr("Duration: %1 min").arg(duration)
Regards,
Detlev
On Dienstag, 16. September 2008, Sergio Jovani wrote:
> Hello all!
>
> I have a project and his respective translations in TS files. All work fine
> except strings that contain %s, they aren't loaded, source-code strings are
> loaded.
>
> For example,
>
> Source code:
> DurationMsg=self.tr("Duration: %s min" % duration)
>
> Translation:
> Duració: %s min
>
>
> App loads for example "Duration: 4 min"
>
> I need your help.
>
> Thanks!!!
>
>
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
--
Detlev Offenbach
detlev at die-offenbachs.de
More information about the PyQt
mailing list