[Kde-pim] Right-To-Left (RTL) Support in KMail's Composer

Thomas McGuire mcguire at kde.org
Sun May 31 20:23:33 BST 2009


Hi,

On Wednesday 27 May 2009 22:30:30 Lior Chen wrote:
> I have a question regarding RTL support of KMail's composer in HTML mode
> (KMail v1.11.2, KDE v4.2.2).
>
> Currently, when writing an email in Hebrew, I can only right-justify the
> text using the 'Align Right' button (which is equivalent to HTML's <P
> align="right">). This does not allow true RTL mode (the equivalent to
> HTML's <p DIR="RTL">). The lack of this option causes all the punctuation
> marks to be wrongly displayed in the beginning of the sentence instead of
> its end (see attached screen-shot for example).
>
> I'm interested in adding two new buttons to the HTML toolbar, one that
> would insert '<p DIR="RTL">' and the other that would insert '<p
> DIR="LTR">' to the generated email. This will allow the user to switch
> between LTR and RTL languages.
>
> Is it the right way to solve this bug? This solution is so simple that I
> have a feeling I'm missing something here...

I don't understand much about RTL, so please correct me if I'm wrong at some 
point.

There are 2 different things to consider: The composer and the reader. If the 
composer supports RTL, that doesn't directly mean it also works in the reader.
Also, the support for HTML and plain text should be checked both in the 
composer and in the reader.

A while back, BIDI support for the reader was improved, see 
http://bugs.kde.org/show_bug.cgi?id=134036.

Does the trick mentioned by Mehrdad Momeny (Ctrl+Shift shortcuts) work for you 
or does it indeed need manual manipulation of the generated HTML? Will the 
paragraph direction work correctly for plain text mail (IIRC there are some 
special Unicode characters that control this, right?)

So can you test if the Ctrl+Shift shortcuts produce correct mails, both in 
HTML mode and in plain text mode?
If it does, adding a button to the toolbar for it is probably easy enough. If 
Ctrl+Shift doesn't work, this is going to be more problematic, as we have no 
direct control of the generated HTML or the generated plain text, that is all 
done inside QTextEdit. But in that case we can probably introduce some hacky 
regexps if necessary.

Regards,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20090531/058e3ac2/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list