After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 323149 - sqrt has a √ unicode equivalent
sqrt has a √ unicode equivalent
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Rich Burridge
Rich Burridge
Depends on:
Blocks:
 
 
Reported: 2005-12-03 21:49 UTC by Wouter Bolsterlee (uws)
Modified: 2006-01-12 17:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use octal escapes for operators that have unicode equivalents (921 bytes, patch)
2006-01-12 10:32 UTC, Wouter Bolsterlee (uws)
none Details | Review
Added translator notes (1.18 KB, patch)
2006-01-12 10:38 UTC, Wouter Bolsterlee (uws)
none Details | Review
Use spaces instead of tabs in source code (1.21 KB, patch)
2006-01-12 10:41 UTC, Wouter Bolsterlee (uws)
none Details | Review

Description Wouter Bolsterlee (uws) 2005-12-03 21:49:36 UTC
The sqrt button should use the √ unicode character, imho.

This would also fix the problem with translations. Right now "sqrt" is
translated to "wrtl" ("wortel" with some seemingly random characters taken out)
in nl_NL. It took me a while to understand that, since it's a totally
non-standard term in Dutch, and even "sqrt" is incomprehensible for any
non-programmer.

Heck, even my old Casio pocket calculator uses √!
Comment 1 Wouter Bolsterlee (uws) 2005-12-03 21:52:12 UTC
The same goes for

+/-   plus minus    ±
-     minus         −   (yes, those are distinct: the first one is a hyphen)
Comment 2 Wouter Bolsterlee (uws) 2005-12-03 21:54:24 UTC
Oh, and  :  versus  ∶  (U+2236, ratio), although this is moreof a semantical
than a visual difference.
Comment 3 Rich Burridge 2006-01-10 18:03:07 UTC
Accepting but changing to enhancement.
Comment 4 Rich Burridge 2006-01-10 18:29:37 UTC
Wouter, I'll take some help on this if you can advice me.
In the gcalctool code, the labels for each of the calculator 
buttons are strings that are defined by the first entry (str)
in a button struct (defined in calctool.h).

For example, the currently labels for the three buttons in
question are defined in calctool.c:

change sign (line 292):   N_("+/-"),
minus       (line 366):   N_("-"),
square root (line 390):   N_("Sqrt"),

Could you show me how to convert them to Unicode equivalents?

If you don't have the time, or know how to do it, no biggie.
I'll try to research it further later in the week.

Thanks.
Comment 5 Wouter Bolsterlee (uws) 2006-01-12 10:21:30 UTC
I'll attach a patch shortly.
Comment 6 Wouter Bolsterlee (uws) 2006-01-12 10:32:38 UTC
Created attachment 57210 [details] [review]
Use octal escapes for operators that have unicode equivalents

I've used octal escapes to encode the characters. Directly using UTF-8 encoding in the source file may work too, but it may impose problems on people hacking/saving that file using a non UTF-8 locale. Additionally, the guys in #gtk+ told me that using octal encoding will prevent compiler issues.
Comment 7 Wouter Bolsterlee (uws) 2006-01-12 10:38:09 UTC
Created attachment 57212 [details] [review]
Added translator notes

This is the same patch with a few comments added to help translators.
Comment 8 Wouter Bolsterlee (uws) 2006-01-12 10:41:12 UTC
Created attachment 57213 [details] [review]
Use spaces instead of tabs in source code

*sigh* This is the final version, using spaces instead of tab characters in the source code (I didn't notice before), so that coding style remains consistent.
Comment 9 Wouter Bolsterlee (uws) 2006-01-12 11:00:21 UTC
btw, you could also consider removing the gettext stuff at all. These chars shouldn't be translated anyway, I think.
Comment 10 Rich Burridge 2006-01-12 14:38:06 UTC
Thanks Wouter!  When I get to work later today, I'll check the fix in.
I'm going to leave the gettext wrappers in for this round (2.13/2.14).
I'll take it under advisement for the next GNOME release.
Comment 11 Reinout van Schouwen 2006-01-12 14:40:52 UTC
If the possibility to translate the symbols is taken away, then we must be certain that the symbols we use are really truly universal in all locales...
Comment 12 Rich Burridge 2006-01-12 17:21:10 UTC
Changes checked into CVS (retaining the gettext wrappers for now).
I've added an entry to bug #309210 for this bug (if we ever get a
doc. writer working on gcalctool again).

I'll also inform the translators of these changes via their email
aliases.

Thanks again Wouter.