Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, June 2007
Qt Linguist


Message 1 in thread

Hi,
I use Qt4.2.3.
I have create a program with Qt. Now I want to translate it to Chinese. So
firstly I use lupdate to produce a .ts file, then open it in Qt Linguist.
But when I try to translate, Qt Linguist seems not to support Chinese well.
Some Chinese words could display correctly, some other couldn't, instead
with a small rectangle. Then when I hit done&next, warning occures. What's
the problem?

-- 
 [ signature omitted ] 

Message 2 in thread

ååä schrieb:
> Hi,
> I use Qt4.2.3.
> I have create a program with Qt. Now I want to translate it to Chinese. 
> So firstly I use lupdate to produce a .ts file, then open it in Qt 
> Linguist. But when I try to translate, Qt Linguist seems not to support 
> Chinese well. 

At least that worked for us with Qt 3.3.6 Linguist. And I don't seem to 
remember that we've had problems with the Qt 4.x chinese translation, 
but I admit we did not put much focus on that yet (we're still porting 
everything else to Qt 4.x).

I assume you already have the proper unicode fonts installed (which are 
able to display all chinese characters, at least those you require), but 
could you check and confirm this?

> Some Chinese words could display correctly, some other 
> couldn't, instead with a small rectangle. Then when I hit done&next, 
> warning occures. What's the problem?

Well, what's the warning (saying)? ;)

Cheers, Oliver

--
 [ signature omitted ] 

Message 3 in thread

Hi
I make another test.
Just ignor the warning I have said, which is because I end the translation
incorrectly.
eg. translating "Spindle:" to Chinese, if I missing the " :", waring will
occures.

But still, Some Chinese words could display correctly, some other couldn't,
instead with a small rectangle. But when I "cat"  the .ts files after
translating, all Chinese words could display correctly. So I think it's
still the problem of linguist, right??

2007/6/7, 张凤丽 <zhangfenglisdu@xxxxxxxxx>:
>
> Hi,
> I use Qt4.2.3.
> I have create a program with Qt. Now I want to translate it to Chinese. So
> firstly I use lupdate to produce a .ts file, then open it in Qt Linguist.
> But when I try to translate, Qt Linguist seems not to support Chinese well.
> Some Chinese words could display correctly, some other couldn't, instead
> with a small rectangle. Then when I hit done&next, warning occures. What's
> the problem?
>
> --
> Best Regards
> Fengli Zhang




-- 
 [ signature omitted ] 

Message 4 in thread

See attached, I capture a screenshot of linguist.
You will see many rectangles which are chinese words couldn't display
correctly.

2007/6/7, 张凤丽 <zhangfenglisdu@xxxxxxxxx>:
>
> Hi
> I make another test.
> Just ignor the warning I have said, which is because I end the translation
> incorrectly.
> eg. translating "Spindle:" to Chinese, if I missing the " :", waring will
> occures.
>
> But still, Some Chinese words could display correctly, some other
> couldn't, instead with a small rectangle. But when I "cat"  the .ts files
> after translating, all Chinese words could display correctly. So I think
> it's still the problem of linguist, right??
>
> 2007/6/7, 张凤丽 <zhangfenglisdu@xxxxxxxxx>:
> >
> > Hi,
> > I use Qt4.2.3.
> > I have create a program with Qt. Now I want to translate it to Chinese.
> > So firstly I use lupdate to produce a .ts file, then open it in Qt Linguist.
> > But when I try to translate, Qt Linguist seems not to support Chinese well.
> > Some Chinese words could display correctly, some other couldn't, instead
> > with a small rectangle. Then when I hit done&next, warning occures. What's
> > the problem?
> >
> > --
> > Best Regards
> > Fengli Zhang
>
>
>
>
> --
> Best Regards
> Fengli Zhang




-- 
 [ signature omitted ] 

Attachment: Screenshot.png
Description: PNG image


Message 5 in thread

zhangfenglisdu wrote:

> See attached, I capture a screenshot of linguist.
> You will see many rectangles which are chinese words couldn't display
> correctly.

It looks like the font you are using doesn't represent the full range of
characters you need. Can you say which operating system and font you are
using?

-- 
 [ signature omitted ] 

Message 6 in thread

Hi,
I am using ubuntu-6.06 dapper, and the font is ..., hmm, to be honest, I
don't know how to get what fonts I am using. And I try "locale" cmd in a
xterm ,and the outputs are following:
LANG=zh_CN.UTF-8
LANGUAGE=zh_CN:zh:en_US:en
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=

Hope that helps!

2007/6/7, David Boddie <dboddie@xxxxxxxxxxxxx>:
>
> zhangfenglisdu wrote:
>
> > See attached, I capture a screenshot of linguist.
> > You will see many rectangles which are chinese words couldn't display
> > correctly.
>
> It looks like the font you are using doesn't represent the full range of
> characters you need. Can you say which operating system and font you are
> using?
>
> --
> David Boddie
> Lead Technical Writer, Trolltech ASA
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>


-- 
 [ signature omitted ] 

Message 7 in thread

Hi,
I did have "cat" the .ts file after translating, and I am sure it has
displayed correctly.
So, is there any way that could change linguist font, just the same font as
xterm?

2007/6/7, 张凤丽 <zhangfenglisdu@xxxxxxxxx>:
>
> Hi,
> I am using ubuntu-6.06 dapper, and the font is ..., hmm, to be honest, I
> don't know how to get what fonts I am using. And I try "locale" cmd in a
> xterm ,and the outputs are following:
> LANG=zh_CN.UTF-8
> LANGUAGE=zh_CN:zh:en_US:en
> LC_CTYPE="zh_CN.UTF-8"
> LC_NUMERIC="zh_CN.UTF-8"
> LC_TIME="zh_CN.UTF-8"
> LC_COLLATE="zh_CN.UTF-8"
> LC_MONETARY="zh_CN.UTF-8"
> LC_MESSAGES="zh_CN.UTF-8"
> LC_PAPER="zh_CN.UTF-8"
> LC_NAME="zh_CN.UTF-8"
> LC_ADDRESS="zh_CN.UTF-8"
> LC_TELEPHONE="zh_CN.UTF-8"
> LC_MEASUREMENT="zh_CN.UTF-8"
> LC_IDENTIFICATION="zh_CN.UTF-8"
> LC_ALL=
>
> Hope that helps!
>
> 2007/6/7, David Boddie <dboddie@xxxxxxxxxxxxx>:
> >
> > zhangfenglisdu wrote:
> >
> > > See attached, I capture a screenshot of linguist.
> > > You will see many rectangles which are chinese words couldn't display
> > > correctly.
> >
> > It looks like the font you are using doesn't represent the full range of
> >
> > characters you need. Can you say which operating system and font you are
> > using?
> >
> > --
> > David Boddie
> > Lead Technical Writer, Trolltech ASA
> >
> > --
> > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> > "unsubscribe" in the subject or the body.
> > List archive and information: http://lists.trolltech.com/qt-interest/
> >
> >
>
>
> --
> Best Regards
> Fengli Zhang




-- 
 [ signature omitted ] 

Message 8 in thread

Fengli Zhang wrote:

> I did have "cat" the .ts file after translating, and I am sure it has
> displayed correctly.
> So, is there any way that could change linguist font, just the same font
> as xterm?

As a temporary measure, you could try running qtconfig to change the font
used by Qt.

-- 
 [ signature omitted ] 

Message 9 in thread

张凤丽 schrieb:
> Hi
> ...
> But still, Some Chinese words could display correctly, some other 
> couldn't, instead with a small rectangle. But when I "cat"  the .ts 
> files after translating, all Chinese words could display correctly. So I 
> think it's still the problem of linguist, right??

A rectangle usually means that the current font is not able to display
the corresponding unicode.

Seems like Linguist is catching another font than your console (I assume
you have displayed the *.ts file on your console with 'cat').

Did you try on another machine, e.g. Windows, or another Linux
distribution? (Seems like you're using some Ubuntu version - updating
the Ubuntu packages might also be worthy to see if they update some
fonts and/or X11 packages - but this is a complete shot into the blue
off course). And while you're at it, you might also want to try the
latest Qt 4.3.0 first.

Cheers, Oliver

--
 [ signature omitted ] 

Message 10 in thread

Hello
Where is qtconfig? I couldn't found it. I build qt4 from source and install
it in /usr/local/Trollotech/Qt-4.2.3 directory.

2007/6/7, 张凤丽 <zhangfenglisdu@xxxxxxxxx>:
>
> Hi,
> I use Qt4.2.3.
> I have create a program with Qt. Now I want to translate it to Chinese. So
> firstly I use lupdate to produce a .ts file, then open it in Qt Linguist.
> But when I try to translate, Qt Linguist seems not to support Chinese well.
> Some Chinese words could display correctly, some other couldn't, instead
> with a small rectangle. Then when I hit done&next, warning occures. What's
> the problem?
>
> --
> Best Regards
> Fengli Zhang




-- 
 [ signature omitted ] 

Message 11 in thread

On Friday 08 June 2007 03:32, ååä wrote:
> Hello
> Where is qtconfig? I couldn't found it. I build qt4 from source and install
> it in /usr/local/Trollotech/Qt-4.2.3 directory.
It should be in the bin subdirectory, /usr/local/Trolltech/Qt-4.2.3/bin in 
your case.

This is how it looks on my installation:

[rene@thunder ~]$ echo $QTDIR
/usr/local/lib/qt-4.2.3
[rene@thunder ~]$ ls -l /usr/local/lib/qt-4.2.3/bin/qtconfig
-rwxr-xr-x 1 root root 224592 Mar 11 
19:04 /usr/local/lib/qt-4.2.3/bin/qtconfig

Hope this helps,

Rene
-- 
 [ signature omitted ] 

Message 12 in thread

Hi, again
But there is no qtconfig in my $QTDIR/bin. Then I try "whereis qtconfig" in
a xterm, the  output is "qtconfig:command not found".

2007/6/8, R. Reucher <rene.reucher@xxxxxxxxxxxxx>:
>
> On Friday 08 June 2007 03:32, 张凤丽 wrote:
> > Hello
> > Where is qtconfig? I couldn't found it. I build qt4 from source and
> install
> > it in /usr/local/Trollotech/Qt-4.2.3 directory.
> It should be in the bin subdirectory, /usr/local/Trolltech/Qt-4.2.3/bin in
> your case.
>
> This is how it looks on my installation:
>
> [rene@thunder ~]$ echo $QTDIR
> /usr/local/lib/qt-4.2.3
> [rene@thunder ~]$ ls -l /usr/local/lib/qt-4.2.3/bin/qtconfig
> -rwxr-xr-x 1 root root 224592 Mar 11
> 19:04 /usr/local/lib/qt-4.2.3/bin/qtconfig
>
> Hope this helps,
>
> Rene
> --
> Many people resent being treated like the person they really are.
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>


-- 
 [ signature omitted ] 

Message 13 in thread

On Friday 08 June 2007 12:26, ååä wrote:
> Hi, again
> But there is no qtconfig in my $QTDIR/bin. Then I try "whereis qtconfig" in
> a xterm, the  output is "qtconfig:command not found".
How did you actually build the library? If it isn't in $QTDIR/bin than 
something might have gone wrong...

Here's how I do it:

1) Download the latest open source archive, for 
example /tmp/qt-x11-opensource-src-4.2.3.tar.gz.

2) Extract this tar-ball to a directory where you are going to build it, then 
configure and build it completely:

# mkdir -p src && cd src
# gzcat /tmp/qt-x11-opensource-src-4.2.3.tar.gz | tar xfv -
# cd qt-x11-opensource-src-4.2.3
# ./configure -platform linux-g++ -prefix /usr/local/lib/qt4
# make

Exchange the values for -platform and -prefix with things that fit your needs 
(the example is for a 32-bit Linux distribution, for 64-bit Linux 
it's "linux-g++-64")!

3) Install the library (it will be installed to the prefix-directory specified 
on the configure command line!):

# make install

If done this way, /usr/local/lib/qt4/bin/qtconfig MUST exist!

I hope this helps,
-- 
 [ signature omitted ] 

Message 14 in thread

Hi,
I compile it this way:
./configure -no-largefile -no-stl -no-qt3support -qt-gif -no-cups
make
sudo make install

But all the other qt tools could be used, like designer, assistant,
linguist, qmake, uic, rcc, moc ,ect.
I can't understand why there is no qtconfig only. It's so strange.

2007/6/8, R. Reucher <rene.reucher@xxxxxxxxxxxxx>:
>
> On Friday 08 June 2007 12:26, 张凤丽 wrote:
> > Hi, again
> > But there is no qtconfig in my $QTDIR/bin. Then I try "whereis qtconfig"
> in
> > a xterm, the  output is "qtconfig:command not found".
> How did you actually build the library? If it isn't in $QTDIR/bin than
> something might have gone wrong...
>
> Here's how I do it:
>
> 1) Download the latest open source archive, for
> example /tmp/qt-x11-opensource-src-4.2.3.tar.gz.
>
> 2) Extract this tar-ball to a directory where you are going to build it,
> then
> configure and build it completely:
>
> # mkdir -p src && cd src
> # gzcat /tmp/qt-x11-opensource-src-4.2.3.tar.gz | tar xfv -
> # cd qt-x11-opensource-src-4.2.3
> # ./configure -platform linux-g++ -prefix /usr/local/lib/qt4
> # make
>
> Exchange the values for -platform and -prefix with things that fit your
> needs
> (the example is for a 32-bit Linux distribution, for 64-bit Linux
> it's "linux-g++-64")!
>
> 3) Install the library (it will be installed to the prefix-directory
> specified
> on the configure command line!):
>
> # make install
>
> If done this way, /usr/local/lib/qt4/bin/qtconfig MUST exist!
>
> I hope this helps,
> --
> René Reucher
> Tel: +49 160 7115802
> FAX: +49 6359 205423
> rene.reucher@xxxxxxxxxxxxx
>
> An American's a person who isn't afraid to criticize the president but is
> always polite to traffic cops.
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>


-- 
 [ signature omitted ] 

Message 15 in thread

Hi,

> I compile it this way:
> ./configure -no-largefile -no-stl -no-qt3support -qt-gif -no-cups

Ah, qtconfig needs qt3support, that's why it wasn't built.

--
 [ signature omitted ]