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" <[email protected]>
To: "André Somers" <[email protected]>
Cc: "[email protected]" <[email protected]>
Subject: Re: [Interest] Fw: Translations in QML
From: "Shantanu Tushar" <[email protected]>
To: "André Somers" <[email protected]>
Cc: "[email protected]" <[email protected]>
Subject: Re: [Interest] Fw: Translations in QML
Hi,
In our project, we'd do it like this-// someFile1.qml
Text {}
// 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 <[email protected]> wrote:
Op 05/07/2016 om 07:34 schreef Beemaneni, Bala: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.
From: Beemaneni, Bala
Sent: Tuesday, July 5, 2016 11:03 AM
To: [email protected]
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 ...
André
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest
--
Shantanu Tushar (UTC +0530)
shantanu.io
shantanu.io
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
