[Bugs] #2537 UNSP: Calculate doesn't accept ", " as a decimal separator when set to Spanish locale

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Sat Jan 1 11:14:49 EST 2011


#2537: Calculate doesn't accept "," as a decimal separator when set to Spanish
locale
------------------------------------------+---------------------------------
    Reporter:  garycmartin                |          Owner:  rwh                        
        Type:  defect                     |         Status:  new                        
    Priority:  Unspecified by Maintainer  |      Milestone:  Unspecified by Release Team
   Component:  Calculate                  |        Version:  Unspecified                
    Severity:  Unspecified                |       Keywords:                             
Status_field:  Unconfirmed                |   Distribution:  Unspecified                
   Seeta_dev:                             |  
------------------------------------------+---------------------------------

Comment(by walter):

 Upon further investigation:

 First, the statement at the top of the code is wrong: should be a
 lowercase utf

 - # -*- coding: UTF-8 -*-
 + # -*- coding: utf-8 -*-

 Once that correction is made, then calculate works as is, without my
 patch.

 But:

 You need to be careful when typing in equations when comma is the fraction
 separator:

 add(10,,5) works
 add(10,5) does not work

 plot(x^2,,x=-2..2) works


 In other words, you need to make sure you disambiguate between commas as
 equation separators and commas as fraction separators and parse does
 everything else as expected.

 As pointed out by Gary, the history buffer shows the parsed form of the
 equation, which uses a period as a separator. Not sure it is worth messing
 with at this point.

 I'd recommend the correction to the language encoding line, documenting
 the comma-use convention, and then closing this ticket.

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/2537#comment:7>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list