[Qt-interest] plugins and translations
Dariusz Gadomski
dgadomski at nospam.gmail.com
Thu Feb 5 20:07:54 CET 2009
Hi Everybody
I was wondering what is the recommended way of translating widget-plugins
i.e. plugin objects that will become widgets in the main application.
Can you advise me on how to implement it? I was able to think of those
options:
1. Provide one set of *.ts files for the main application and
plugins?
In this case is there a better way to collect all the texts from
application (*.pro with TEMPLATE=subdirs) than to create a dummy
translation project with 'qmake -project -o translation.pro' in project-
root directory? I was searching for a solution but found only this old
thread:
http://lists.trolltech.com/qt-interest/2003-01/thread01331-0.html
Is there a way for lupdate to search the subdirs listed in the root
project file?
In this case there is no way of adding new plugins to already built
application, because it will not contain translations for the new widgets
and the main app will contain translation even for unused plugins.
However the translation will be easier - it will involve only editing one
*.tm file per language.
2. Each plugin should have its own *.ts files and e.g. resource file with
*.qm files?
In this case should every plugin should install new translators?
It will be harder to keep the translation consistent due to numerous
translation files.
Also I was wondering whether plugin object can use resources from the
main application resource files (e.g. icons) with just using the resource
paths ":/example/path".
I will appreciate your assistance.
Kind regards,
Dariusz Gadomski
More information about the Qt-interest-old
mailing list