[GRASS-dev] Re: [GRASS-SVN] r40421 - grass/branches/develbranch_6/gui/wxpython

Markus Neteler neteler at osgeo.org
Thu Jan 14 21:17:41 EST 2010


On Fri, Jan 15, 2010 at 2:27 AM, Glynn Clements
<glynn at gclements.plus.com> wrote:
>
> Martin Landa wrote:
>
>> >>> Are you sure that the buttons are translated on your machine
>> >>> without these changes?
>> >>
>> >> yes. Martin
>> >
>> > As mentioned: not on Mandriva, not on XP.
>> > Confirmed also on Windows7 from another colleague.. Due you have
>> > unsubmitted changes?
>>
>> tested on Debian GNU/Linux and MS Windows XP with Czech locale.
>> Buttons are localized without need to define label manually (tomorrow
>> I will test on MS Windows Server 2008). I would incline to find out
>> why it's not working on your system and to revert your changes.
>
> The built-in translations should be in e.g.:
>
> C:\Program Files\Python26\Lib\site-packages\wx-2.8-msw-unicode\wx\locale\ja\LC_MESSAGES\wxstd.mo

Linux:
- I found /usr/lib/wxPython/share/locale/ja/LC_MESSAGES/wxstd.mo to be
absent, after
  reinstallation of the RPM package the file is now available.
  Reverting locally to the previous version, recompilation: button
translation lost.
  I am speaking about "Quit" and "Help" in the entrance page and the
module dialog buttons.

  I have used strace and it does not open any wxpython locale file
(other JA files yes).
  This are the accesses to wx:

  strace grass70 -wx 2 > log
   grep wx log
execve("/usr/local/bin/grass70", ["grass70", "-wx"], [/* 86 vars */]) = 0
execve("/usr/bin/python", ["python", "/usr/local/bin/grass70", "-wx"],
[/* 86 vars */]) = 0
open("/usr/lib64/python2.6/site-packages/wx.pth", O_RDONLY) = 4
read(4, "wx-2.8-gtk2-unicode\n", 8192)  = 20
stat("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode",
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode",
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode",
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/sitecustomize",
0x7fffcc543bd0) = -1 ENOENT (No such file or directory)
open("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/sitecustomize.so",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/sitecustomizemodule.so",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/sitecustomize.py",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/sitecustomize.pyc",
O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/usercustomize",
0x7fffcc543bd0) = -1 ENOENT (No such file or directory)
open("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/usercustomize.so",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/usercustomizemodule.so",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/usercustomize.py",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/usercustomize.pyc",
O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/org",
0x7fffcc5406e0) = -1 ENOENT (No such file or directory)
open("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/org.so",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/orgmodule.so",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/org.py",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/org.pyc",
O_RDONLY) = -1 ENOENT (No such file or directory)


 Relevant excerpts:
...
mprotect(0x7f640cd31000, 16384, PROT_READ) = 0
mprotect(0x604000, 4096, PROT_READ)     = 0
mprotect(0x7f640cf56000, 4096, PROT_READ) = 0
munmap(0x7f640cf32000, 138951)          = 0
open("/usr/share/locale/locale-archive", O_RDONLY) = -1 ENOENT (No
such file or directory)
brk(0)                                  = 0x638000
brk(0x659000)                           = 0x659000
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7f640cf53000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2570
read(3, "", 4096)                       = 0
close(3)                                = 0
...
open("/usr/share/locale/ja/LC_MESSAGES/SYS_LC_MESSAGES", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=95, ...}) = 0
mmap(NULL, 95, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f640cf4d000
close(3)                                = 0
...

munmap(0x7f21ba110000, 4096)            = 0
open("/usr/lib64/python2.6/site-packages/wx.pth", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=20, ...}) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=20, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7f21ba110000
read(4, "wx-2.8-gtk2-unicode\n", 8192)  = 20
read(4, "", 4096)                       = 0
stat("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode",
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
read(4, "", 8192)                       = 0
...
stat("/usr/lib64/python2.6/site-packages/gtk-2.0",
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib64/python2.6/site-packages/gtk-2.0",
{st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib64/python2.6/site-packages/gtk-2.0/sitecustomize",
0x7fffcc543bd0) = -1 ENOENT (No such file or directory)
open("/usr/lib64/python2.6/site-packages/gtk-2.0/sitecustomize.so",
O_RDONLY) = -1 ENOENT (No such file or directory)
...
stat("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/usercustomize",
0x7fffcc543bd0) = -1 ENOENT (No such file or directory)
open("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/usercustomize.so",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/usercustomizemodule.so",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/usercustomize.py",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode/usercustomize.pyc",
O_RDONLY) = -1 ENOENT (No such file or directory)
...
open("/usr/lib64/python2.6/encodings/euc_jp.py", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1027, ...}) = 0
open("/usr/lib64/python2.6/encodings/euc_jp.pyc", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=1786, ...}) = 0
...
open("/usr/lib64/gconv/EUC-JP.so", O_RDONLY) = 5
...

Not sure what's going on: I don't see
/usr/lib/wxPython/share/locale/ja/LC_MESSAGES/wxstd.mo being
called. Only messages from the GRASS po files appear.


Windows XP:
- since we use winGRASS, it is here:
  C:\Program Files\GRASS-6.4-SVN\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\locale\ja\LC_MESSAGES\wxstd.mo

 Apparently the same problem applies - wxstd.mo not considered?

Markus


More information about the grass-dev mailing list