Support forum of the software localization tool Sisulizer


.NET, Delphi, ... - Sisulizer Localization Tool Support Home

Get in contact with the makers of Sisulizer.
Our forum is open for all questions around Sisulizer from customers and prospects.
Don't hesitate to register and ask. The Sisulizer team will answer ASAP.

Search     Help Home Sisulizer Website Download
Search by username
Not logged in - Login | Register 

 Moderated by: Renate.Reinartz, Markus.Kreisel, Jaakko.Salmenius, Ilkka.Salmenius
New Topic Reply Printer Friendly
Qt Dialog Preview - Wish list for software localization tool - Technical Support (You need to be registered at the forum to write) - .NET, Delphi, ... - Sisulizer Localization Tool Support
AuthorPost
 Posted: Tue Nov 25th, 2008 09:18 am
PM Private Upload Quote Reply
efteein
Member
 

Joined: Thu Jun 12th, 2008
Location:  
Posts: 12
Status: 
Offline
Hello,

We are using Sisulizer for VCC++ MFC projects and for Qt 4 projects. When translating for Qt, there is currently no dialog preview available in Sisulizer. But there should be enough data available for Sisulizer to be able to do the preview, at least Qt Linguist has the preview. Are there plans to do this? It would be helpful for the translators.

Best regards,
Urs

Back To Top PM Private Upload Quote Reply

 Posted: Tue Nov 25th, 2008 09:25 am
PM Private Upload Quote Reply
Jaakko.Salmenius
Administrator


Joined: Sat Apr 8th, 2006
Location: Espoo, Finland
Posts: 2275
Status: 
Offline
You are right. There is enought information and feature is already in our roadmap. However .ui file folrmat is not documented. We contacted Trolltech last year to get documentation but they did not reply. Either we try again or try to figure out the format ourself. If you know any source of .ui file documentation please tell me.

Jaakko



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Tue Nov 25th, 2008 10:58 am
PM Private Upload Quote Reply
efteein
Member
 

Joined: Thu Jun 12th, 2008
Location:  
Posts: 12
Status: 
Offline
Thanks. Good to hear that it's planned. The only source for the .ui file documentation I know of is this one: http://doc.trolltech.com/4.4/designer-ui-file-format.html

Best regards,
Urs

Back To Top PM Private Upload Quote Reply

 Posted: Mon Dec 1st, 2008 02:52 am
PM Private Upload Quote Reply
Jaakko.Salmenius
Administrator


Joined: Sat Apr 8th, 2006
Location: Espoo, Finland
Posts: 2275
Status: 
Offline
Thank you for the link.

We have currently .ui format support in beta build.

Jaakko

Attachment: Untitled.png (Downloaded 76 times)



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Mon Dec 1st, 2008 04:13 am
PM Private Upload Quote Reply
Jaakko.Salmenius
Administrator


Joined: Sat Apr 8th, 2006
Location: Espoo, Finland
Posts: 2275
Status: 
Offline
I have some bad news. In Qt .ui is not really a resource format. It seems to be an indermediate format that is used to generate .h file (e.g. ui_dialog.h). All the data from .ui is used to geneate hard coded C++ code unside .H file. For example:

class Ui_DialogClass
{
public:
    QPushButton *pushButton;
    QLabel *label;
    QTextEdit *textEdit;
    QRadioButton *radioButton;
    QCheckBox *checkBox;
    QProgressBar *progressBar;
    QListWidget *listWidget;
    QComboBox *comboBox;


    void setupUi(QDialog *DialogClass)
    {
    if (DialogClass->objectName().isEmpty())
        DialogClass->setObjectName(QString::fromUtf8("DialogClass"));
    DialogClass->setWindowModality(Qt::NonModal);
    DialogClass->resize(600, 400);
    pushButton = new QPushButton(DialogClass);
    pushButton->setObjectName(QString::fromUtf8("pushButton"));
    pushButton->setGeometry(QRect(500, 30, 71, 24));
    label = new QLabel(DialogClass);
    label->setObjectName(QString::fromUtf8("label"));
    label->setGeometry(QRect(10, 10, 81, 16));
    label->setLocale(QLocale(QLocale::English, QLocale::UnitedStates));
    textEdit = new QTextEdit(DialogClass);
    textEdit->setObjectName(QString::fromUtf8("textEdit"));
    textEdit->setGeometry(QRect(10, 30, 481, 31));
    radioButton = new QRadioButton(DialogClass);
    radioButton->setObjectName(QString::fromUtf8("radioButton"));
    radioButton->setGeometry(QRect(10, 70, 81, 18));
    checkBox = new QCheckBox(DialogClass);
    checkBox->setObjectName(QString::fromUtf8("checkBox"));
    checkBox->setGeometry(QRect(10, 90, 70, 18));
    progressBar = new QProgressBar(DialogClass);
    progressBar->setObjectName(QString::fromUtf8("progressBar"));
    progressBar->setGeometry(QRect(10, 350, 118, 23));
    progressBar->setValue(24);
    listWidget = new QListWidget(DialogClass);
    listWidget->setObjectName(QString::fromUtf8("listWidget"));
    listWidget->setGeometry(QRect(10, 110, 256, 192));
    listWidget->setAutoScrollMargin(15);
    comboBox = new QComboBox(DialogClass);
    comboBox->setObjectName(QString::fromUtf8("comboBox"));
    comboBox->setGeometry(QRect(280, 110, 75, 22));


    retranslateUi(DialogClass);

    QMetaObject::connectSlotsByName(DialogClass);
    } // setupUi


    void retranslateUi(QDialog *DialogClass)
    {
    DialogClass->setWindowTitle(QApplication::translate("DialogClass", "Dialog", 0, QApplication::UnicodeUTF8));
    pushButton->setText(QApplication::translate("DialogClass", "Browse", 0, QApplication::UnicodeUTF8));
    label->setText(QApplication::translate("DialogClass", "This is text2", 0, QApplication::UnicodeUTF8));
    radioButton->setText(QApplication::translate("DialogClass", "One", 0, QApplication::UnicodeUTF8));
    checkBox->setText(QApplication::translate("DialogClass", "Two", 0, QApplication::UnicodeUTF8));
    Q_UNUSED(DialogClass);
    } // retranslateUi


};

Now the problem is that all the data is hard coded and compiled to code segments. I have marked hard code position and sizes with bold typeface.

What retranslateUi function does it that it isolated string from .ui and wraps them around translate("xxx"...) function. So you can localize the string but nothing else.

This is bad news. This is equally bad to Symbian's loc file. In both cases you use resource editor or text editor to create UI resource. Then you resource the resource! This is called double resourcing and as unfortunately it is it is common in some environments such as Symbian, some WPF applications and now even in Qt.

The bad point of double resourcing are:

1) You loose context! .ts file items has no context data. .ui would have perfect context but for some reason that I don't know Trolltech does not use it.

2) You can only translate strings.

3) It brings huge amount of extra job. You are already edited strings and layouts in resource file (.ui) but then they are not used at all but instead the strings are placed on .ts file.

Of cource .ts file is a bit easier to localize that .ui if you do it manually or by a elementary tool that can only work without visual context. However if you use sophisticated localization tool with visual features as Sisulizer there is really no difference how compilicated the original file format it. You just don't have to care about it.

As a result you can not localize any other data but strings and even they are without context. All layout data and other properties gets hard coded to the .h file and can not be localized. If cource you can write some code after setupUi that will check the locale and make button wider if needed. However this is difficult.

We could easily implement visual localization support for UI (as the above screenshot shows) but because Qt can not use them there is not point for it.

I am sorry but we need to drop out visual support for .UI files or at least postpone until Trolltech implements dynamic loading of UI file on runtime.

Best regards,
Jaakko



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Mon Dec 1st, 2008 05:06 am
PM Private Upload Quote Reply
Jaakko.Salmenius
Administrator


Joined: Sat Apr 8th, 2006
Location: Espoo, Finland
Posts: 2275
Status: 
Offline
There is one solution:

1) You use Sisulizer to create localization .ui file

2) Then you create a make file that rebuild the whole project. You run the make file for each language that you want to support. Before running the build project you replace the original .ui file by the file created by Sisulizer. This will make a new .h file creates and all the localized properties from .ui to copied to .h.

As a result you will have localized application. One application for each language.

Jaakko



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Mon Dec 1st, 2008 06:34 am
PM Private Upload Quote Reply
Jaakko.Salmenius
Administrator


Joined: Sat Apr 8th, 2006
Location: Espoo, Finland
Posts: 2275
Status: 
Offline
This works very well.

Created a Qt application using English .ui file. When I compiled it the application run in English. Then I used Sisulizer to localize the .ui file to Finnish. I replaced the original .ui file with the Finnish file and remove the auto generated ui_<uifilename>.h and run make again. Now Qt created a new .h file using the Finnish .ui and the hard coded values (strings, integers, rect, etc)  in .h were now in Finnish. As a resource I got Finnish application.

This solution has the following advantages over .ts files:
- Visual location
- Positions ans sizes of compotrols can be changes

Cons:
- The created application is monolingual. There is no possibility on application initialization to choose the language that application uses like in the case of .ts/.qm files. You will has as many application files (e.g. .exe) as languages.

Is this something you can live with?

Jaakko



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Mon Jul 6th, 2009 10:23 am
PM Private Upload Quote Reply
efteein
Member
 

Joined: Thu Jun 12th, 2008
Location:  
Posts: 12
Status: 
Offline
Hi Jaako,

Sorry, I was away from the forum for a few months. Unfortunately we need to work with .ts files. Our apps need to be able to switch language during runtime. And we definitely need the preview. But we don't need to be able to change the layout during translation in Sisulizer. So all we need to see is, if the texts translated fit into the layout. Would this be possible at all with the information provided by the .ts files? Do they refer to the corresponding .ui file, so that the corresponding .ui file could be used to show the preview?

Kind Regards
Urs

Back To Top PM Private Upload Quote Reply

 Posted: Tue Aug 18th, 2009 11:16 am
PM Private Upload Quote Reply
efteein
Member
 

Joined: Thu Jun 12th, 2008
Location:  
Posts: 12
Status: 
Offline
Hi Jaako,

My boss is pressuring me to find out, if we can count on a preview with Sisulizer like I described in my last post. Will it be possible or is this something we can forget?

Best Regards
Urs

Back To Top PM Private Upload Quote Reply

 Posted: Tue Aug 18th, 2009 11:23 am
PM Private Upload Quote Reply
Jaakko.Salmenius
Administrator


Joined: Sat Apr 8th, 2006
Location: Espoo, Finland
Posts: 2275
Status: 
Offline
Sorry about this delay.

This can be done. There is no technical reason why it can not be done. However currently we have not implemented such code. I have added it TODO list and most likely it will be implemented sometimes in the future. Unfortunately currently we are quite buzy with new .NET/WPF/Silverlight issues that I can not give any exact date.

Jaakko



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Tue Aug 18th, 2009 12:17 pm
PM Private Upload Quote Reply
efteein
Member
 

Joined: Thu Jun 12th, 2008
Location:  
Posts: 12
Status: 
Offline
Hi Jaakko,

Thanks, we will therefore wait patiently and plan to go with Sisulizer.

Urs

Back To Top PM Private Upload Quote Reply

 Posted: Wed Mar 9th, 2011 07:03 am
PM Private Upload Quote Reply
efteein
Member
 

Joined: Thu Jun 12th, 2008
Location:  
Posts: 12
Status: 
Offline
Hi Jaakko,

How ist the status on this topic? Can we hope to have it done anytime soon?

Regards,
Urs

Back To Top PM Private Upload Quote Reply

 Posted: Fri Jul 22nd, 2011 02:04 pm
PM Private Upload Quote Reply
Christine
Member
 

Joined: Tue Nov 20th, 2007
Location:  
Posts: 184
Status: 
Offline
Hi all,

this would be interesting for me as well. We are starting to work with QT right now and we also need a multilanguage version of the software.

Any news on the topic?

Best regards, Christine

Last edited on Fri Jul 22nd, 2011 03:56 pm by Christine

Back To Top PM Private Upload Quote Reply

 Posted: Mon Jul 25th, 2011 02:56 am
PM Private Upload Quote Reply
Jaakko.Nieminen
Administrator
 

Joined: Sat Mar 20th, 2010
Location:  
Posts: 657
Status: 
Offline
We had a great expectation about Qt and our plan was to implement visual editor for Qt. However when Nokia abandoned Qt early this year the platfrom lost its status as a major platform. Currently this feature is on hold.

Jaakko

Back To Top PM Private Upload Quote Reply

 Posted: Tue Nov 29th, 2011 07:46 am
PM Private Upload Quote Reply
efteein
Member
 

Joined: Thu Jun 12th, 2008
Location:  
Posts: 12
Status: 
Offline
Hi Jaakko,

Please don't discard your great expectations about Qt. It's not dead. At Qt developers days 2012 Nokia confirmed it's full support and the Qt community and the usage of Qt keeps growing, even more since it's now an OSS project. There is no reason to not rate it as a major platform.
We still need the Qt Dialog preview. I am sure, this would help Sisulizer to be more used for Qt Applications.

Best regards,
Urs

Back To Top PM Private Upload Quote Reply

 Posted: Tue Nov 29th, 2011 08:31 am
PM Private Upload Quote Reply
Christine
Member
 

Joined: Tue Nov 20th, 2007
Location:  
Posts: 184
Status: 
Offline
Hi,

I second that. QT is the only working cross-platform solution currently on the market.

In the moment I am planning to use QT Linguist for the localization of our new QT projects, but I would prefer to use Sisulizer for all our projects.

Best regards, Christine

Back To Top PM Private Upload Quote Reply

Current time is 08:14 am  
.NET, Delphi, ... - Sisulizer Localization Tool Support > Technical Support (You need to be registered at the forum to write) > Wish list for software localization tool > Qt Dialog Preview



WowUltra modified by Sisulizer Copyright © 2007-09 by Jim Hale - Based on WowBB Copyright © 2003-2006 Aycan Gulez

Sisulizer software localization tool - Three simple steps to localize