cannot use Qt -VS -Add in plugin function in VS2012

All about Windows versions
Post Reply
tsyxulei
Posts: 17
Joined: Wed Sep 25, 2013 6:13 am

cannot use Qt -VS -Add in plugin function in VS2012

Post 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
daniel
Site Admin
Posts: 7709
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: cannot use Qt -VS -Add in plugin function in VS2012

Post 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).
Daniel, CloudCompare admin
tsyxulei
Posts: 17
Joined: Wed Sep 25, 2013 6:13 am

Re: cannot use Qt -VS -Add in plugin function in VS2012

Post 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
daniel
Site Admin
Posts: 7709
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: cannot use Qt -VS -Add in plugin function in VS2012

Post 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.
Daniel, CloudCompare admin
tsyxulei
Posts: 17
Joined: Wed Sep 25, 2013 6:13 am

Re: cannot use Qt -VS -Add in plugin function in VS2012

Post 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
daniel
Site Admin
Posts: 7709
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: cannot use Qt -VS -Add in plugin function in VS2012

Post by daniel »

See my latest post about 'Translation / Localization' here: http://www.danielgm.net/cc/forum/viewtopic.php?t=1444
Daniel, CloudCompare admin
Post Reply