[PATCH] Re: two questions regarding QML

Robert Helling helling at atdotde.de
Mon Mar 14 13:53:04 PDT 2016


Hi,

I just sent an improved patch.

> On 14.03.2016, at 19:19, Thiago Macieira <thiago at macieira.org> wrote:
> 
> This should be:
> 		qsTr("A mobile version of the free Subsurface divelog software.\n" +
> 			 "View your dive logs while on the go.")
> 
> If you split the string like you did, you'll have two strings to translate
> instead of one.
> 
> I'm not sure this will extract correctly. Please test.
> 

Now, I put both strings into a single qsTr. Let’s hope that works (I could not test the actual string extraction).



> And there needs to be a way to do this properly:
> 
>> +                               text: qsTr("Version: ") +
>> manager.getVersion() + qsTr("\n\n© Subsurface developer team\n2011-2016")
> 
> How do you interpolate fields in JS/QML?

According to that web page mentioned earlier, this could be written as

qsTr(„Version %1\n\n bla bla“).arg(manager.getVersion())

I changed this accordingly.

Best
Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160314/ab0fb41d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160314/ab0fb41d/attachment-0001.sig>


More information about the subsurface mailing list