Bug 924 - (int-50267) Hildon widgets doesn't support RTL mode
(int-50267)
: Hildon widgets doesn't support RTL mode
Status: RESOLVED FIXED
Product: Desktop platform
hildon-widgets
: 4.1 (4.2008.23-14)
: All Maemo
: Medium normal (vote)
: 5.0-alpha
Assigned To: Sven Herzberg
: HAF QA mailing list
: http://maemo.org/maemowiki/HowToRTL
:
:
:
  Show dependency tree
 
Reported: 2007-01-03 11:52 UTC by Mohammad Anwari
Modified: 2009-03-25 02:18 UTC (History)
5 users (show)

See Also:


Attachments
Proposed patch (10.03 KB, patch)
2007-01-03 11:54 UTC, Mohammad Anwari
Details
Updated patch for hildon-1 (11.05 KB, patch)
2007-07-30 17:59 UTC, Mohammad Anwari
Details
Updated patch for hildon-1 (11.13 KB, text/x-patch)
2007-07-31 14:23 UTC, Mohammad Anwari
Details
Updated Patch (for rev15242) (11.88 KB, patch)
2008-03-03 10:10 UTC, Sven Herzberg
Details
Screenshot of hildon_bread_crumb_trail (50.28 KB, image/png)
2008-03-29 20:46 UTC, Khaled Hosny
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description Mohammad Anwari (reporter) maemo.org 2007-01-03 11:52:21 UTC
In RTL mode, some hildon widgets doesn't mirror the appearance. The patch
proposed here fixes most of those mirroring.
Comment 1 Mohammad Anwari (reporter) maemo.org 2007-01-03 11:53:18 UTC
Added alias.
Comment 2 Mohammad Anwari (reporter) maemo.org 2007-01-03 11:54:43 UTC
Created an attachment (id=167) [details]
Proposed patch
Comment 3 Mohammad Anwari (reporter) maemo.org 2007-07-30 17:59:12 UTC
Created an attachment (id=498) [details]
Updated patch for hildon-1
Comment 4 Mohammad Anwari (reporter) maemo.org 2007-07-30 18:00:23 UTC
Updated patch for hildon-1 was uploaded which also covers
hildon-bread-crumb-trail.
Comment 5 Mohammad Anwari (reporter) maemo.org 2007-07-31 14:23:07 UTC
Created an attachment (id=499) [details]
Updated patch for hildon-1

This patch also fixes the menu position in a hildon window.
Comment 6 Sven Herzberg 2008-03-03 10:10:08 UTC
Created an attachment (id=732) [details]
Updated Patch (for rev15242)
Comment 7 Sven Herzberg 2008-03-25 09:54:29 UTC
This patch has been committed to svn (revision 15317). Feel free to reopen if
you encounter more RTL issues:

2008-03-25  Sven Herzberg  <sven@imendio.com>

        Fixes: MB:#924: Hildon widgets doesn't support RTL mode
        Patch from: Mohammad Anwari  <mdamt@maemo.org>

        * src/hildon-banner.c: let the HildonBanners pop up on the left side
        instead of the right in RTL mode
        * src/hildon-bread-crumb-trail.c: mirror the appearance of the
        breadcrumb button list in RTL mode
        * src/hildon-caption.c: mirror the appearance of the caption widget in
        RTL mode
        * src/hildon-date-editor.c: mirror appearance of the date editor in
        RTL mode
        * src/hildon-time-editor.c: mirror appearance of the time editor in
        RTL mode
        * src/hildon-window.c: fix the position of the popup in RTL mode
Comment 8 Sven Herzberg 2008-03-25 10:00:21 UTC
To me, these widgets could need more work (but I'm not an expert, so maybe they
are right the way they are):

 * HildonCaption:
   The widget always appends the separator symbol (":"), shouldn't it be
   prepended in RTL mode
 * HildonDateEditor:
   The month doesn't seem to be editable anymore; the popup widget with the
   calendar doesn't seem to step into the correct directions for the left/right
   arrows.
 * HildonTimeEditor:
   While the time editor displays the time "08:49" (which is 11 minutes to 9 in
   the morning), the time editor displays "49":"08" and the edit popup displays
   "9""4":"08", I think at least both orders should match.

I might be able to review the widget behavior with my Libanese neighbor.
Comment 9 Mohammad Anwari (reporter) maemo.org 2008-03-27 16:27:49 UTC
Sven, thank you!

Mohammed, do you have comments on this?
Comment 10 Mohammed Hassan nokia 2008-03-27 16:51:26 UTC
How can I test/check them ? Sorry for the stupid question but is there a
standalone application that demos the widgets like gtk-demo ?
Comment 11 Mohammad Anwari (reporter) maemo.org 2008-03-27 16:53:31 UTC
(In reply to comment #10)
> How can I test/check them ? 

Sven, do we have the packages available somewhere?

> Sorry for the stupid question but is there a
> standalone application that demos the widgets like gtk-demo ?

Hmmm dunno about this.
Comment 12 Sven Herzberg 2008-03-27 20:06:27 UTC
I tested them like this:

1. install arabic locales on your distribution (Ubuntu: sudo apt-get install
language-pack-gnome-ar)
2. in scratchbox: check out svn from hildon-1 (svn co
https://stage.maemo.org/svn/maemo/projects/haf/trunk/hildon-1)
3. configure with examples (./autogen.sh --with-examples --with-maemo-gtk)
4. compile (make)
5. run the examples (LC_ALL=ar_AE.UTF-8 run-standalone.sh
examples/<your-example-here>)
Comment 13 Mohammed Hassan nokia 2008-03-28 12:03:57 UTC
I built a .deb and installed it inside scratchbox but no way. It didn't work.
I even modified /etc/osso-af-init/locale:
#!/bin/sh
unset LC_ALL
unset LANGUAGE
export LANG=ar_EG.UTF-8
export LC_MESSAGES=ar_EG.UTF-8

I guess I'm missing something.
Comment 14 Mohammed Hassan nokia 2008-03-28 12:21:16 UTC
I had to run localedef. Now the widgets are mirrored. Will check them and see.
Comment 15 Mohammed Hassan nokia 2008-03-28 12:59:27 UTC
HildonCaption:
Gtk will apply the BiDi algorithm to both the string and separator so it'll
appear correct if the locale is an RTL one. Problem'd be a latin string and an
RTL locale but I guess the proper solution'd be fully translating the
application ?

HildonDateEditor:
The month field is not editable because it's a label not an entry.
In apply_locale_field_order():
You are using (void) g_date_strftime (buffer, sizeof (buffer), "%x",
&locale_test_date);
%x is the preferred date representation for the locale. Bad luck, this
representation for Arabic includes the month name. That's why ;-)

Now we need to find a solution.

HildonTimeEditor:
I didn't really check it but my guess is gtk flipping the box ?
Comment 16 Khaled Hosny 2008-03-29 20:44:10 UTC
I made a RTL version of the plankton theme (both matchbox and gtk themes), get
it from http://khaledhosny.org/files/plankton-rtl.tar.gz.

But there are two issues that I spotted, in the hildon_bread_crumb_trail widget
the bar is slightly shifted to the left getting out of the window. Also the
"Home" menu, though pops up on the right side as expected, I've to click on the
left upper corner to get and not in the right corner where it should be (I'm
not sure if this is a matchbox or hildon widget issue, but I didn't figure
where in matchbox theme this is defined).
Comment 17 Khaled Hosny 2008-03-29 20:46:33 UTC
Created an attachment (id=742) [details]
Screenshot of hildon_bread_crumb_trail
Comment 18 Sven Herzberg 2008-08-06 15:21:25 UTC
Hi Khaled,

(In reply to comment #16)
> But there are two issues that I spotted, in the hildon_bread_crumb_trail widget
> the bar is slightly shifted to the left getting out of the window.

Thanks for looking into this: unfortunately I don't get this reproduced right
now. Can you provide instructions how to reproduce this?
Comment 19 Sven Herzberg 2008-08-06 17:12:30 UTC
To be more specific: how do I create one of those:
open("/usr/lib/locale/ar_AE.UTF-8/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/usr/lib/locale/ar_AE.utf8/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/usr/lib/locale/ar_AE/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such
file or directory)
open("/usr/lib/locale/ar.UTF-8/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/usr/lib/locale/ar.utf8/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/usr/lib/locale/ar/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such
file or directory)
Comment 20 Andre Klapper maemo.org 2008-08-11 12:21:23 UTC
Reopening as internal ticket is still open too.
Comment 21 Sven Herzberg 2008-08-11 15:26:46 UTC
Thanks, but please let's verify things before reopening.