Slightly off-topic, but...

On 28/06/15 22:02, Rudi Timmermans wrote:
lbWalletDetails.text = qsTr("you have") + "<b> " + wallet.currency + " "
+ wallet.budget + "</b> " + qsTr("per") + " " +
Util.budgetTypeNoun(wallet.budget_type)

Please, don't mark for translation this way. Firstly, this won't work with RTL languages. Secondly, some languages might have different order of words (e.g., position of nouns, verbs, etc.).

Use placeholders instead:

> //: %1 - currency, %2 - amount / value, %3 - budget type
lbWalletDetails.text = qsTr("you have <b>%1 %2</b> per 
%3").arg(wallet.currency).arg(wallet.budget).arg(Util.budgetTypeNoun(wallet.budget_type))

"//:" marks a comment that will be displayed to translator in Qt Linguist. If it's not obvious from the text, it's good to explain here what each placeholder means.

Also, there is a nice page on QML/JS translation in Qt documentation:
http://doc.qt.io/qt-5/qtquick-internationalization.html

But I recommend reading all "Internationalization with Qt" section:
http://doc.qt.io/qt-5/internationalization.html

--
With best regards,
Oleksii Serdiuk

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Reply via email to