GNOME Bugzilla – Bug 322571
In GtkScale negative numbers are shown 'x-'
Last modified: 2011-06-25 21:07:53 UTC
Please describe the problem: When working with 'LANG=hebrew' the GtkScale shows the minus of the negative numbers on the right side of the number. (eg. '5-' instead of '-5') Steps to reproduce: 1. create a [H|V]GtkScale with a negative minimum and DrawValue=true 2. run it with 'LANG=hebrew' 3. Actual results: when the scale is on a negative number the minus will be on the right side of the number Expected results: I expect the minus to be on the left side of the number Does this happen every time? yes Other information:
2005-11-28 Matthias Clasen <mclasen@redhat.com> * gtk/gtkscale.c (_gtk_scale_format_value): Insert an LRM, to prevent -20 to come out as 20- in RTL locales. (#322571, Tze'ela Hebron)
I think this patch is wrong, so I'm going to revert it unless there's a very good reason why numbers should be formatted differently in scales than anywhere else. I suspect the wrong formatting comes from a bug somewhere else and the fix done by Matthias was actually a workaround for such a bug. I also can't reproduce the problem without this patch using the instructions from the reporter. So I suspect the actual bug in an underlying library has been fixed by now.
could well be; have you tried -20 in Hebrew ?
Man, this stuff is complicated. So, I made sure it actually uses the correct language, and yes, when removing the patch, -20 is printed as "20-" in Hebrew, just like it is in cell renderers, spin buttons or labels. So this is still not something that should be fixed in GtkScale.