[PyQt] Strings with variables in TS-File can not be loaded
Ingmar Steen
iksteen at gmail.com
Tue Sep 16 09:52:17 BST 2008
On Tue, Sep 16, 2008 at 2:20 AM, Sergio Jovani <lesergi at gmail.com> 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!!!
>
I think this is fairly simple, try:
DurationMsg=self.tr("Duration: %s min") % duration
Ingmar
More information about the PyQt
mailing list