[Solved] specify different context to tr?
Hi guys
I have the following situation. I have 2 dialogs which share several texts. The problem I’m facing is that lupdate generates tr’s constant in different <context> element, so I’m obligated to do translation of single texts multiple times.
here’s how it looks the generated ts file.
- <context>
- <name>GenericAlert</name>
- <message>
- <location filename="genericalert.cpp" line="81"/>
- <source>CertVerified</source>
- </message>
- </context>
- <context>
- <name>ProcessStartAlert</name>
- <message>
- <location filename="processstartalert.cpp" line="66"/>
- <location filename="processstartalert.cpp" line="86"/>
- <source>CertVerified</source>
- </message>
- </context>
Now I want to have single CertVerified for both dialogs. Is this possible at all?
Than you very much :)
2 replies
The static QCoreApplication::translate() [doc.qt.nokia.com] methods could be of use in this case. You can explicitly set a context there.
You must log in to post a reply. Not a member yet? Register here!


