You can use QT_TRANSLATE_NOOP macro:
Pushbutton
tooltips :QT_TRANSLATE_NOOP("ButtonTooltips","THIS IS TO CREATE THE NAME")
texts :QT_TRANSLATE_NOOP("ButtonNames","NAME")
width:100
height:200
Pushbutton
tooltips :QT_TRANSLATE_NOOP("ButtonTooltips","THIS IS TO CREATE THE NAME")
texts :QT_TRANSLATE_NOOP("ButtonNames","NAME")
width:100
height:200
To copy to clipboard, switch view to plain text mode
Then add this script to list of headers in .pro file, it will be parsed when you call lupdate <project file>.
You can alter your parser to extract the tooltip text and button name from this script as well as translation context, and then translate the string, for example, like this (context and text are strings extracted from QT_TRANSLATE_NOOP macro from script):
qApp->translate(context.toAscii().constData(),text.toAscii().constData());
qApp->translate(context.toAscii().constData(),text.toAscii().constData());
To copy to clipboard, switch view to plain text mode
It will work, I've done something like this some time ago.
If you have better solution, I'll be happy to know it.
Bookmarks