Page 1 of 1
cannot use Qt -VS -Add in plugin function in VS2012
Posted: Tue Oct 27, 2015 1:30 am
by tsyxulei
Thanks for you hard work
I want to translate cloud compare to other language ,so I will plane to use Qt Linguist support. I have used CMake to create vs2012 projection , and I have installed Qt-vs add in plugin into vs2012 . but when I select one projection of cloud compare in vs2012 soft ,the Qt plugin function disable! so, I cannot use Qt-vs add in function to create translation file(.ts). Could you tell how to realize create translation file ,or enable add in function in vs2012 ?
Thank you very much!
by Xu , from China
Re: cannot use Qt -VS -Add in plugin function in VS2012
Posted: Tue Oct 27, 2015 1:41 pm
by daniel
We don't use the Qt Visual add-in (as we use CMake). To use the the translation support you must use Qt Linguist as an external tool (see 'linguist.exe' in the 'bin' directory of Qt).
And while it will work with almost all dialogs, translating the various application messages will require some code modifications (i.e. replacing most of the QString declarations by QObject::tr calls - I can help you with this if you want).
Re: cannot use Qt -VS -Add in plugin function in VS2012
Posted: Wed Oct 28, 2015 3:06 am
by tsyxulei
Thank you very much for your reply!
Firstly, I have used CMake to Create Visual Studio(vs2012) projection, so, you suggest I use Qt Linguist tools. but Linguist soft could not create new *.ts(translation file) and only support open the *.ts file. How to create many different ts format files ? could you do some example for me or give some more suggestion with step by step!
Secondly, If you could replace most QString(showing for user) with QString::tr(),that will be good job for me.
Thanks you very much again
by xu ,from China
Re: cannot use Qt -VS -Add in plugin function in VS2012
Posted: Thu Oct 29, 2015 7:19 pm
by daniel
I believe there's a command line tool that can be used on the sources to generate the 'ts' files. See the documentation for 'lupdate.exe'.
I'll be able to help you further but not before one or two weeks.
Re: cannot use Qt -VS -Add in plugin function in VS2012
Posted: Tue Nov 10, 2015 7:27 am
by tsyxulei
Hi Daniel,Do you have time to do some example about generating "*.ts" file for me ? I have tried to do many methods ,but they are not success. If you could do some example , that will be very helpful for me.
by xu ,from China
Re: cannot use Qt -VS -Add in plugin function in VS2012
Posted: Tue Nov 10, 2015 3:08 pm
by daniel
See my latest post about 'Translation / Localization' here:
http://www.danielgm.net/cc/forum/viewtopic.php?t=1444