about the translated labels

View: New views
2 Messages — Rating Filter:   Alert me  

about the translated labels

by Ning Fu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have such a code on Solaris:

from ldtp import *
from ldtputils import *
setlocale('zh_CN')
bindtext('gedit', '/usr/share/locale')
selectmenuitem('*gedit','mnuFile;mnuNew')
selectmenuitem('*gedit','mnuFile;mnuOpen')
selectmenuitem('*gedit','mnuEdit;mnuPreferences')
selectmenuitem('*gedit','mnuHelp;mnuAbout')

My purpose is to test gedit in different locales with a same set of
LDTP scripts.
However, when I tested in zh_CN locale, I found a issue that "mnuNew"
is reported as "Unable to get the child menu item".
While others(mnuOpen, mnuPreferences, mnuAbout) work fine -- the
localized dialog windows are opened.

I checked the log file, and found out that "mnuNew" is translated to
Chinese as "mnu新建", but others are kept in English.
I guess that's why it fails.

My question is -- If English label names work fine with localized
applications, why some labels, such as "mnuNew" are translated? Isn't
it a bug?

Attached please find the log file.

Thanks!
Harry Fu


_______________________________________________
LDTP-dev mailing list
LDTP-dev@...
http://lists.freedesktop.org/mailman/listinfo/ldtp-dev

26-10-2009.log (329K) Download Attachment

Re: about the translated labels

by Nagappan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Harry,

If you want to use the locale string, in LDTPv1, you have to use the label name as it is, instead of LDTP convention :) If you are planing to use LDTP convention, then you may need to populate the label names in your script for each locale. This is not implemented in v2, will have to work on it.

Thanks
Nagappan

2009/10/26 Ning Fu <ning.fu@...>
Hi,

I have such a code on Solaris:

from ldtp import *
from ldtputils import *
setlocale('zh_CN')
bindtext('gedit', '/usr/share/locale')
selectmenuitem('*gedit','mnuFile;mnuNew')
selectmenuitem('*gedit','mnuFile;mnuOpen')
selectmenuitem('*gedit','mnuEdit;mnuPreferences')
selectmenuitem('*gedit','mnuHelp;mnuAbout')

My purpose is to test gedit in different locales with a same set of
LDTP scripts.
However, when I tested in zh_CN locale, I found a issue that "mnuNew"
is reported as "Unable to get the child menu item".
While others(mnuOpen, mnuPreferences, mnuAbout) work fine -- the
localized dialog windows are opened.

I checked the log file, and found out that "mnuNew" is translated to
Chinese as "mnu新建", but others are kept in English.
I guess that's why it fails.

My question is -- If English label names work fine with localized
applications, why some labels, such as "mnuNew" are translated? Isn't
it a bug?

Attached please find the log file.

Thanks!
Harry Fu

_______________________________________________
LDTP-dev mailing list
LDTP-dev@...
http://lists.freedesktop.org/mailman/listinfo/ldtp-dev




--
Linux Desktop (GUI Application) Testing Project - http://ldtp.freedesktop.org
http://nagappanal.blogspot.com

_______________________________________________
LDTP-dev mailing list
LDTP-dev@...
http://lists.freedesktop.org/mailman/listinfo/ldtp-dev