Bug 116831 - exercises displayed in wrong order when using Hebrew locale
Summary: exercises displayed in wrong order when using Hebrew locale
Status: RESOLVED FIXED
Alias: None
Product: kbruch
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Stein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-21 21:42 UTC by Amit Ramon
Modified: 2007-12-14 11:18 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
screen shot of fraction task with an incorrect result (34.43 KB, image/png)
2005-11-21 21:52 UTC, Amit Ramon
Details
a screen shot showing a comparison that seems okay, but the app says it's incorrect (35.47 KB, image/png)
2005-11-21 21:54 UTC, Amit Ramon
Details
fix layout problems on RTL desktops (6.88 KB, patch)
2006-01-24 23:13 UTC, Diego Iastrubni
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Amit Ramon 2005-11-21 21:42:12 UTC
Version:            (using KDE KDE 3.4.91KDE 1.2)
Installed from:    Compiled From SourcesDebian stable Packages
OS:                Linux

kbruch displays exercises in a 3 "column" format: the leftmost displays the exercise to be solved, the middle one is where the user enters her result, and the rightmost is where the application displays the result after pressing the "check test" button. This order is dictated by the standards of mathematical notation. However, when running kbruch under a Hebrew locale (and I assume it would also happen under any other right-to-left locale), the order of these columns is reversed. So the exercise to be solved is on the right, and the application displayed result is on the left side. Besides being not in the standard notation, there are equality signs (=) that appears in wrong places due to the reverse ordering. These happens for the "Fraction task" and the "Conversion" exercises.

In the "Comparison" exercise, there is a similar problem. Here there are two fractions to be compared, and a button that displays either greater-than or lower-that sign. The locations of the fractions are switched, but the button displays the sign as if the fractions were in the "right" positions. So under Hebrew locale, when the user selects what she thinks is the correct sign, the application say it is an error and vice versa.
Comment 1 Amit Ramon 2005-11-21 21:52:49 UTC
Created attachment 13584 [details]
screen shot of fraction task with an incorrect result
Comment 2 Amit Ramon 2005-11-21 21:54:20 UTC
Created attachment 13585 [details]
a screen shot showing a comparison that seems okay, but the app says it's incorrect
Comment 3 Diego Iastrubni 2005-11-26 16:49:11 UTC
I can confrim this, and I will soon commit patches to trunk. When you will be satisfied with them, we can move them to stable.

Notes about Qt3/Qt4:
The problem happends because the layout of the ExerciseBase follows the direction of the desktop. This is generally a good idea, but on our case, we must always use LTR layout.

On Qt4 you can set the direction of each layout/widgets (LTR,RTL and by default "inherit"). However on Qt3, the only way I found, is to detect the direction of the desktop, and insert the widgets in reversed order.

I will comment the code, and mention that, and so when someone will port this app to Qt4 he will be able to fix this properly, or at least contact me and I will do the "correct port". 
Comment 4 Sebastian Stein 2005-11-26 17:53:28 UTC
cuco <cuco3001@yahoo.com> [051126 17:51]:
> ------- Additional Comments From cuco3001 yahoo com  2005-11-26 16:49 -------
> I can confrim this, and I will soon commit patches to trunk. When you will
> be satisfied with them, we can move them to stable.


You can also send the patches to me before, because I'm the maintainer of
KBruch and I can review them.

Sebastian
Comment 5 Diego Iastrubni 2006-01-24 23:13:21 UTC
Created attachment 14375 [details]
fix layout problems on RTL desktops

Please comment. If you will fail to comment in the next few days, I will be
forced be the dark force of the GPL (and my svn account) to commit it anyway :)
Comment 6 Sebastian Stein 2006-01-24 23:50:36 UTC
I agree on your fix partly. It is ok for the KDE 3.5 release series, but for KDE 4 something better is needed. So please feel free to commit it to the KDE 3.5 branch and close the bug report if you are satisfied with the results.

Sebastian
Comment 7 Diego Iastrubni 2007-12-14 11:18:53 UTC
Working prefectly for KDE4. Closing.