Calculator does not show thousands seperator despite being chosen in preferences

Bug #631665 reported by rusivi2
66
This bug affects 10 people
Affects Status Importance Assigned to Milestone
GCalctool
Fix Released
Low
Mago
Fix Released
Medium
Ara Pulido
gcalctool (Ubuntu)
Fix Released
Low
Unassigned
Maverick
Fix Released
Medium
Unassigned

Bug Description

Impact: Thousands separator functionality does not work, worked in 10.04
Resolution: Upstream code change
To reproduce:
1. Open Calculator
2. Enter 1234, display shows 1234
3. Open Calculator>Preferences and enable "Show thousands separator"
4. Display shows 1234, should show 1,234 in English locale
Risks: Change is non-trivial, tested with various locales and appears to work well. Needs thorough testing in -proposed.

Revision history for this message
rusivi2 (rusivi2-deactivatedaccount) wrote :
summary: - Calculator does not show thousands seperator despite being choosen in
+ Calculator does not show thousands seperator despite being chosen in
preferences
Revision history for this message
Pedro Villavicencio (pedro) wrote :

i can confirm this, choosing show thousand separator doesn't make any difference.

Changed in gcalctool (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Victor Vargas (kamus) wrote :

This is a little bit weird because for me works fine, please see attached screenshot.

Changed in gcalctool:
status: Unknown → New
Changed in gcalctool:
importance: Unknown → Low
Changed in gcalctool:
status: New → Confirmed
Revision history for this message
Kevin Soviero (ksoviero) wrote :

I think this is a little more important than "Low." I have to start college algebra next semester, and a thousands separator would be nice...

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

This was working in Lucid, marking as regression.

Changed in gcalctool (Ubuntu Maverick):
importance: Undecided → Medium
status: New → Triaged
tags: added: regression-release
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Fixed upstream

Changed in gcalctool (Ubuntu):
importance: Low → Medium
importance: Medium → Low
status: Triaged → Fix Committed
Changed in gcalctool:
status: Confirmed → Fix Released
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Patch that fixes thousands separator functionality

description: updated
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted gcalctool into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in gcalctool (Ubuntu Maverick):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Ara Pulido (ara) wrote :

Once fixed, we are going to create a regression test using Mago for this issue.

Changed in mago:
status: New → Triaged
assignee: nobody → Ara Pulido (apulido)
importance: Undecided → Medium
Revision history for this message
Ara Pulido (ara) wrote :

Tested with gcalctool (5.32.0-0ubuntu2)
In English locale, now we got the thousands separator correctly. In Spanish, though, it does not put it. I guess it because the locale for Spanish does not include separators for the numbers, but it feels a bit weird to select an option that does not have any effects.

Also, I run the mago regression tests on it, and they all passed.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Thanks Ara, I've opened a bug for that here https://bugzilla.gnome.org/show_bug.cgi?id=632182

Revision history for this message
Robert Ancell (robert-ancell) wrote :

This patch exposed a locale bug (bug #660798) that is present in (at least) ru_RU.UTF-8. I've uploaded 5.32.0-0ubuntu3 with the attached patch that fixes the problem

Ara Pulido (ara)
Changed in mago:
status: Triaged → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted gcalctool into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
chrone (chrone81) wrote :

i'll give it a try tomorrow at the office. thanks :)

Revision history for this message
Sérgio Faria (sergio91pt) wrote :

doesn't work on the pt_PT locale

Revision history for this message
chrone (chrone81) wrote :

works great in english language. thanks dude :)

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

That works only for languages which have the property "thousands_sep" defined in LC_NUMERIC and the point that Ara and Sergio are raising is fair.

The Unix locales is not the _truth_ and the user should be able to set a grouping separator if he wants to even if none is defined in the Unix locale.

What does the standardization organization says:
"Therefore the space is recommended in the SI/ISO 31-0 standard,[8] and the International Bureau of Weights and Measures states that "for numbers with many digits the digits may be divided into groups of three by a thin space, in order to facilitate reading." (summary from wikipedia http://en.wikipedia.org/wiki/Decimal_mark#Digit_grouping feel free to read the full iso documentation if you have problem sleeping)

Moreover, the Unicode consortium (http://cldr.unicode.org/) defines in its Unicode Common Locale Data Repository a grouping separator for es_ES - '.' - and pt_PT - 'space'.

So, I think that a full fix for this, without using another repository than the Unix locale, would be to use the value for the grouping separator as defined in LC_NUMERIC and if none or empty then fallback to 'space' which is internationally recognized.

What do you think ?

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Thanks Jean-Baptiste, sounds good to me, I've updated the upstream bug to do this.

Ara Pulido (ara)
Changed in mago:
status: Fix Committed → Fix Released
Revision history for this message
rusivi2 (rusivi2-deactivatedaccount) wrote :

Works as intended in Maverick. Marking Fix Released.

lsb_release -rd
Description: Ubuntu 10.10
Release: 10.10

 apt-cache policy gcalctool
gcalctool:
  Installed: 5.32.0-0ubuntu4
  Candidate: 5.32.0-0ubuntu4
  Version table:
 *** 5.32.0-0ubuntu4 0
        500 http://us.archive.ubuntu.com/ubuntu/ maverick-updates/main i386 Packages
        100 /var/lib/dpkg/status
     5.32.0-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ maverick/main i386 Packages

Changed in gcalctool (Ubuntu Maverick):
status: Fix Committed → Fix Released
Changed in gcalctool (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.