[Nvda-dev] commit r1962 - in trunk/source: . gui

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Nvda-dev] commit r1962 - in trunk/source: . gui

NVDA Subversion
Author: pvagner
Date: Thu Apr 24 19:12:16 2008
New Revision: 1962

Log:
* after creating wx application also initialize wxpython localization support. Finally We have ok and cancel buttons translated and we can use other wxpython features which are locale dependant.
* also reverting commit 1960

Modified:
   trunk/source/core.py
   trunk/source/gui/logViewer.py

Modified: trunk/source/core.py
==============================================================================
--- trunk/source/core.py (original)
+++ trunk/source/core.py Thu Apr 24 19:12:16 2008
@@ -95,6 +95,9 @@
  import gui
  globalVars.log.debug("Initializing GUI")
  gui.initialize(app)
+ # initialize wxpython localization support
+ locale = wx.Locale()
+ locale.Init2()
  import speechDictHandler
  globalVars.log.debug("Speech Dictionary processing")
  speechDictHandler.initialize()

Modified: trunk/source/gui/logViewer.py
==============================================================================
--- trunk/source/gui/logViewer.py (original)
+++ trunk/source/gui/logViewer.py Thu Apr 24 19:12:16 2008
@@ -25,7 +25,7 @@
  menu = wx.Menu()
  item = menu.Append(wx.ID_ANY, _("Refresh F5"))
  self.Bind(wx.EVT_MENU, self.refresh, item)
- item = menu.Append(wx.ID_ANY, _("Save as..."))
+ item = menu.Append(wx.ID_SAVEAS)
  self.Bind(wx.EVT_MENU, self.onSaveAsCommand, item)
  menu.AppendSeparator()
  item = menu.Append(wx.ID_EXIT, _("E&xit"))


Reply | Threaded
Open this post in threaded view
|

Re: [Nvda-dev] commit r1962 - in trunk/source: . gui

James Teh-2
NVDA Subversion wrote:
> Modified: trunk/source/core.py
> ==============================================================================
> @@ -95,6 +95,9 @@
>   gui.initialize(app)
> + # initialize wxpython localization support
> + locale = wx.Locale()
> + locale.Init2()
Thanks for this fix, Peter; nice work.
A really small point: should this wx locale stuff perhaps be moved into
gui.initialize(), since it is specific to the wx GUI? This makes no real
difference; just a cosmetic thing.


Jamie

--
James Teh
Email: [hidden email]
WWW: http://www.jantrid.net/
MSN Messenger: [hidden email]
Jabber: [hidden email]
Yahoo: jcs_teh


Reply | Threaded
Open this post in threaded view
|

Re: [Nvda-dev] commit r1962 - in trunk/source: . gui

Peter Vágner
Hello,

James Teh  wrote:
> Thanks for this fix, Peter; nice work.
> A really small point: should this wx locale stuff perhaps be moved into
> gui.initialize(), since it is specific to the wx GUI? This makes no real
> difference; just a cosmetic thing.
Originally I have placed that into initialize(app): in the gui\_init.py
but It was not working there for me.
Also currently wxpython follows windows locale not NVDA's language
settings so I'll try to fix this if possible and I'll also try more
suitable place for this initialization.

Thanks

Peter


Reply | Threaded
Open this post in threaded view
|

Re: [Nvda-dev] commit r1962 - in trunk/source: . gui

Michel Such
Hi all,

Here, this fix works fine when running from source, but not with a compiled
nvda.
When compiled, the 'ok' and 'cancel' buttons, for example are not
translated.

----- Original Message -----
From: "Peter Vágner" <[hidden email]>
To: "News and discussion for NVDA (NonVisual Desktop Access),a free and open
source screen reader for Microsoft Windows" <[hidden email]>
Sent: Friday, April 25, 2008 6:31 AM
Subject: Re: [Nvda-dev] commit r1962 - in trunk/source: . gui


> Hello,
>
> James Teh  wrote:
>> Thanks for this fix, Peter; nice work.
>> A really small point: should this wx locale stuff perhaps be moved into
>> gui.initialize(), since it is specific to the wx GUI? This makes no real
>> difference; just a cosmetic thing.
> Originally I have placed that into initialize(app): in the gui\_init.py
> but It was not working there for me.
> Also currently wxpython follows windows locale not NVDA's language
> settings so I'll try to fix this if possible and I'll also try more
> suitable place for this initialization.
>
> Thanks
>
> Peter
>
> _______________________________________________
> Nvda-dev mailing list
> [hidden email]
> http://lists.nvaccess.org/listinfo/nvda-dev
>
>




Reply | Threaded
Open this post in threaded view
|

Re: [Nvda-dev] commit r1962 - in trunk/source: . gui

Michael Curran
Hi,

The reason for this is that WX seems to store its locale files  in a
locale directory rather like NVDA's but  when NVDA is compiled, this
directroy is not included.

The directory is in the site-packages/wx<version>/wx/ directory, I am
not too sure how we can include it, and exactly where we should put it.
It would be great if we could just copy all the files out of their
locale dir and wack them in ours (their mo files of course have a
different name). But, To do this, we need to find out a way to tell wx
that its locale files are in deed in this directory.

Its something pretty important, if anyone has any knowledge on how we
can tell wx this, please let me or Peter know.

Mick



Michel Such wrote:

> Hi all,
>
> Here, this fix works fine when running from source, but not with a compiled
> nvda.
> When compiled, the 'ok' and 'cancel' buttons, for example are not
> translated.
>
> ----- Original Message -----
> From: "Peter Vágner"<[hidden email]>
> To: "News and discussion for NVDA (NonVisual Desktop Access),a free and open
> source screen reader for Microsoft Windows"<[hidden email]>
> Sent: Friday, April 25, 2008 6:31 AM
> Subject: Re: [Nvda-dev] commit r1962 - in trunk/source: . gui
>
>
>> Hello,
>>
>> James Teh  wrote:
>>> Thanks for this fix, Peter; nice work.
>>> A really small point: should this wx locale stuff perhaps be moved into
>>> gui.initialize(), since it is specific to the wx GUI? This makes no real
>>> difference; just a cosmetic thing.
>> Originally I have placed that into initialize(app): in the gui\_init.py
>> but It was not working there for me.
>> Also currently wxpython follows windows locale not NVDA's language
>> settings so I'll try to fix this if possible and I'll also try more
>> suitable place for this initialization.
>>
>> Thanks
>>
>> Peter
>>
>> _______________________________________________
>> Nvda-dev mailing list
>> [hidden email]
>> http://lists.nvaccess.org/listinfo/nvda-dev
>>
>>
>
>
>
> _______________________________________________
> Nvda-dev mailing list
> [hidden email]
> http://lists.nvaccess.org/listinfo/nvda-dev