GNOME Bugzilla – Bug 323149
sqrt has a √ unicode equivalent
Last modified: 2006-01-12 17:21:10 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 √!
The same goes for +/- plus minus ± - minus − (yes, those are distinct: the first one is a hyphen)
Oh, and : versus ∶ (U+2236, ratio), although this is moreof a semantical than a visual difference.
Accepting but changing to enhancement.
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.
I'll attach a patch shortly.
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.
Created attachment 57212 [details] [review] Added translator notes This is the same patch with a few comments added to help translators.
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.
btw, you could also consider removing the gettext stuff at all. These chars shouldn't be translated anyway, I think.
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.
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...
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.