<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'>Hi Rudi,<br><br>There are plenty of doc scattered on the internet. The secret is to use QT_TR_NOOP in the ListElement because you are not allowed to script what's inside a ListElement.<br><br>See for instance this bug report https://bugreports.qt.io/browse/QTBUG-11403.<br><br>Especially this example given in the reply.<br><br>ListModel {<br> ListElement {<br> greeting: QT_TR_NOOP("hello")<br> }<br>}<br>...<br>Text { text: qsTr(greeting) }<br><br>Regards,<br>Lucien<br><br><hr id="zwchr"><blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>De: </b>"Rudi Timmermans" <rudi.timmer@gmx.us><br><b>À: </b>"Sailfish OS Developers" <devel@lists.sailfishos.org><br><b>Envoyé: </b>Vendredi 26 Juin 2015 08:54:47<br><b>Objet: </b>Re: [SailfishDevel] compile error<br><br>
Hi,<br>
<br>
I like to use into ListElement the qsTr.
<br>
<br>
This is my code:<br>
<br>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">ListElement</span><span style=" color:#c0c0c0;"> </span>{</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">page</span>:<span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"ManageWalletsPage.qml"</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">title</span>:<span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"Manage</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">wallets"</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">subtitle</span>:<span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"Create</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">a</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">new</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">wallet</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">or</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">modify</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">your</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">existing</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">ones"</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">section</span>:<span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"Management"</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span>}
When is use title: qstr(<span style=" color:#008000;">"Manage</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">wallets"</span>) this seems not to work anyone has a solution for this ?
I like to translate this text string also, that's the resion of it.
Thanks! </pre>
<style>
p, li { white-space: pre-wrap; }
</style><br>
<br>
<style>p, li { white-space: pre-wrap; }
</style>
<pre class="moz-signature">---
Best regards!
Rudi Timmermans.</pre>
<br>
<br>_______________________________________________<br>SailfishOS.org Devel mailing list<br>To unsubscribe, please send a mail to devel-unsubscribe@lists.sailfishos.org</blockquote><br></div></body></html>