Ticket #130 (defect)

Opened 2 years ago

Last modified 10 months ago

Arabic text is misplaced in libnotify tray icon tooltips (RTL)

Status: new

Reported by: djihed Assigned to: chipx86
Priority: normal Milestone:
Component: libnotify Version:
Severity: major Keywords:
Cc: djihed@gmail.com D-BUS Version:
Patch Included: 0 OS/Distro Version: Debian/Ubuntu

I use libnotify for an application to deliver those yellow information balloons. When using Arabic locale for the application, the text is misplaced, it is sent outside the balloon, so only some of it appears if the text is long enough. If it is not, it does not appear at all, and all I see is an empty balloon.

Start applications with Arabic locale with: LANG=ar <program>

(the application is Minbar, sources here: http://cvs.arabeyes.org/viewcvs/projects/itl/programs/minbar/)

Screenshot: http://files.djihed.com/misc/notify-ar-error.png

The text starts from the right, it is cut and only the last few characters appear.

Arabic is a right-to-left language.

Attachments

libnotify-arabic-testcase.diff (2.7 kB) - added by djihed on 04/20/07 19:38:03.
Must save as UTF-8, Arabic characters in source code.

Change History

04/18/07 09:11:05: Modified by djihed

libnotify-dev version 0.4.2

04/18/07 13:40:39: Modified by chipx86

Thanks for the bug report. We'll get this fixed, though there's a few things that would help.

First, can you try changing the theme in gconf (/apps/notification-daemon/theme) to "standard" and see if this still happens?

Second, if you could actually write a very small test case for libnotify (libnotify/tests/ has existing test cases to base it off of) that includes Arabic text and fails with it, that would help, because I could then ensure that this doesn't happen in the future.

04/20/07 19:37:15: Modified by djihed

  • cc set to djihed@gmail.com.

Same bug with standard theme.

Wrote a test case for Arabic. The result is that the first word from the right (first word in arabic, since it is rtl) is always chopped off on each line.

Attaching test case in a minute

04/20/07 19:38:03: Modified by djihed

  • attachment libnotify-arabic-testcase.diff added.

Must save as UTF-8, Arabic characters in source code.

04/20/07 20:13:23: Modified by djihed

Where does it render the widgets in source code?

04/20/07 22:22:47: Modified by djihed

I had a look at notification-damon/src/themes/standard/theme.c The body is displayed in body_label, and I could not see why it is chopping text.

For the record, I reproduce this with: (kill running notification-daemon) LANG=ar notification-daemon libnotify/tests/test-arabic libnotify/tests/test-basic

See where the text is being placed, arabic's right is being chopped, and basic's body is getting pushed to the left.

08/25/07 19:18:04: Modified by chipx86

Is this still a problem in libnotify and notification-daemon SVN? I can't reproduce it now.

01/12/08 05:51:02: Modified by djihed

  • severity changed from normal to major.

This is sadly, still a problem with the current libnotify.

With the default theme.

This is pretty bad and serious for RTL languages, imagine sometimes having a notification popup with no text because the text has been sent for off the balloon.