It is currently Sun Feb 12, 2012 7:25 pm

All times are UTC + 2 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: dot separator in French
PostPosted: Mon Nov 16, 2009 2:59 pm 
Offline

Joined: Fri Oct 16, 2009 3:53 pm
Posts: 179
Location: Strasbourg, France
Hello everybody,

In French, the number separator for precision is the dot (.). But in the GTK Client, when I push on the dot key on the numpad, nothing append. I want to know how configure the client or my OS to use the dot key to display a comma.

Best Regards,

Quentin

_________________
Quentin THEURET
http://www.quentin-theuret.net


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 17, 2010 8:02 pm 
Offline

Joined: Wed Feb 17, 2010 7:33 pm
Posts: 2
Hi,

Same problem here.
I try to change the decimal point character from "float" fields from "," (comma in the french locale default) to "." (point in "C" locale)
I have made the change below, and tested on GNU/Linux successfully, but on MS Windows (Win32) it doesn't work.
I want to know if it is possible on MS Windows.

Any hint appreciated.

Thanks.

Sylvain CALADOR
Logical Soft

Code:
=== modified file 'bin/translate.py'
--- bin/translate.py 2009-01-06 21:56:18 +0000
+++ bin/translate.py 2010-02-17 17:45:18 +0000
@@ -179,6 +179,7 @@
         lang_enc = lang2 + '.' + encoding
         try:
             locale.setlocale(locale.LC_ALL, lang_enc)
+            locale.setlocale(locale.LC_NUMERIC, 'C')
         except:
             logging.getLogger('translate').warning(
                     _('Unable to set locale %s') % lang_enc)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 17, 2010 10:54 pm 
Offline

Joined: Sat Sep 17, 2005 7:51 pm
Posts: 648
IMHO GTK should do it the Koo-way
Koo accepts . and , as decimal separator and converts it automatically.
all other options are bound to fail because of the vast number of possible hardware and software configurations.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 24, 2010 10:12 pm 
Offline

Joined: Mon Mar 16, 2009 11:11 pm
Posts: 213
Location: FRANCE - Nantes / Grand Ouest (Bretagne - Pays de la Loire)
Hello,

I think you should take this way :
https://bugs.launchpad.net/openobject-c ... bug/519227

Thanks

Bruno

_________________
http://www.Zeekom.com
intégrateur PGI-ERP gestion, comptabilité depuis 13 ans (Nantes-Grand Ouest)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 04, 2010 11:35 am 
Offline

Joined: Wed Feb 17, 2010 7:33 pm
Posts: 2
Thanks ferdinand and zeekom for answers.

I found another "dirty" solution, which should works on all OS,
and allow to enter dot or comma as decimal separator.

Thanks

Code:
=== modified file 'bin/widget/view/form_gtk/spinbutton.py'
--- bin/widget/view/form_gtk/spinbutton.py   2009-01-04 22:13:17 +0000
+++ bin/widget/view/form_gtk/spinbutton.py   2010-03-04 08:38:14 +0000
@@ -31,7 +31,7 @@

         adj = gtk.Adjustment(0.0, -sys.maxint, sys.maxint, 1.0, 5.0)
         self.widget = gtk.SpinButton(adj, 1.0, digits=int( attrs.get('digits',(14,2))[1] ) )
-        self.widget.set_numeric(True)
+        self.widget.set_numeric(False)
         self.widget.set_activates_default(True)
         self.widget.connect('button_press_event', self._menu_open)
         if self.attrs['readonly']:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP