Hi Andre,<div><br></div><div>On Fedora 16, I tried like this:</div><div><br></div><div>launchapp('gedit', lang = 'de_DE')</div><div><br></div><div>it worked as expected. I haven't used setlocale. Can you please verify the above and see it works in your environment ?</div>
<div><br></div><div>I haven't implemented bindtext api in LDTPv2, I should update the doc :-)</div><div><br></div><div>Thanks</div><div>Nagappan<br><br><div class="gmail_quote">On Thu, Jan 5, 2012 at 9:09 AM, Andre Klapper <span dir="ltr"><<a href="mailto:ak-47@gmx.net">ak-47@gmx.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
using ldtp-2.2.0-4.1.i386 on Fedora 16 I am trying to launch an<br>
application in a specific locale. Obviously using "setlocale" is not<br>
enough. Trying to use "bindtext", I get the error<br>
NameError: name 'bindtext' is not defined<br>
<br>
<a href="http://lists.freedesktop.org/archives/ldtp-dev/2009-October/000923.html" target="_blank">http://lists.freedesktop.org/archives/ldtp-dev/2009-October/000923.html</a><br>
implies that there is currently no option in LDTP2 to pass a locale to<br>
an application to launch. Am I right with that assumption, and if so are<br>
there plans to implement this?<br>
My rough testcode (for GNOME's "gedit") is pasted below.<br>
<br>
Thanks,<br>
andre<br>
<br>
<br>
---snip---<br>
<br>
#!/usr/bin/python<br>
from ldtp import *<br>
LANGS = ['cs_CZ', 'de_DE', 'fr_FR'] # format must be xx_XX<br>
for item in LANGS:<br>
LOCALENAME = (item + '.utf8')<br>
print "Locale is set to: "<br>
print LOCALENAME<br>
setlocale (LOCALENAME)<br>
# bindtext('gedit', '/usr/share/locale')<br>
time.sleep (3)<br>
APPWINDOWNAME = '*gedit'<br>
launchapp('gedit')<br>
time.sleep (3)<br>
if waittillguiexist (APPWINDOWNAME) == 0:<br>
raise LdtpExecutionError ('App window does not exist')<br>
print "App window exists."<br>
time.sleep (3)<br>
selectmenuitem ('*gedit', 'mnuFile;mnuQuit') #quit<br>
print "App window closed."<br>
time.sleep (3)<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
mailto:<a href="mailto:ak-47@gmx.net">ak-47@gmx.net</a> | failed<br>
<a href="http://blogs.gnome.org/aklapper" target="_blank">http://blogs.gnome.org/aklapper</a><br>
<br>
_______________________________________________<br>
LDTP-dev mailing list<br>
<a href="mailto:LDTP-dev@lists.freedesktop.org">LDTP-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/ldtp-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/ldtp-dev</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Linux Desktop (GUI Application) Testing Project - <a href="http://ldtp.freedesktop.org">http://ldtp.freedesktop.org</a><br><a href="http://nagappanal.blogspot.com">http://nagappanal.blogspot.com</a><br>
</div>