From waht I can tell: Qt seems to match on source string AND disambiguation
 
If you provide qsTr("back") it will match any "back"
If you provide qsTr("back", "dorsal") it will only match qsTr("back", "dorsal")
Meaning don't use the diambugation text unless it is actually needed, otherise you always have to supply it.
 
Sent: Friday, July 22, 2016 at 8:42 AM
From: "Shantanu Tushar" <shaan...@gmail.com>
To: "André Somers" <an...@familiesomers.nl>
Cc: "interest@qt-project.org" <interest@qt-project.org>
Subject: Re: [Interest] Fw: Translations in QML
Hi,
 
In our project, we'd do it like this-
 
// someFile1.qml
Text {
    text: qsTranslate("Messages", "Hello")
}
 
// someFile2.qml
Text {
    text: qsTranslate("Messages", "Hello")
}
Button {
    text: qsTranslate("Actions", "Create")
}
 
Even when there are two usages of "Hello", Linguist will show only one context "Messages", and you need to translate "Hello" only there.
 
 
On Wed, Jul 13, 2016 at 2:20 PM, André Somers <an...@familiesomers.nl> wrote:

 

 
Op 05/07/2016 om 07:34 schreef Beemaneni, Bala:

 

 

From: Beemaneni, Bala
Sent: Tuesday, July 5, 2016 11:03 AM
To: developm...@qt-project.org
Subject: Translations in QML
 

 

Hi Guyz,

I am using Translations in Qml with linguist ,lupdate and lrelease.It works fine. But my requirement is , when i have a string say "Hello" in different QML files say 100 places , i do not want to update the respective language string for that in each file.Hence the update should be done in one place so that it reflects everywhere.Currently i do not have much idea how to achieve this? Can anyone suggest the best approach ...

You don't want to do that in the general case, as the same word may need to be translated differently depending on context. Linguist will suggest a previous translation that you can accept with a single keystroke, but it is up to the translater to verify it makes sense in the current context.

André

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
 



--
Shantanu Tushar    (UTC +0530)
shantanu.io
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to