Open wardi opened 10 years ago
Now that Urwid is used in Subiquity (The Ubuntu Server Installer) it's becoming increasingly more important, how can I help?
This is an example of a patch to support BiDi in Ubuntu's gfxboot-theme: https://code.launchpad.net/~shlomister/gfxboot-theme-ubuntu/hebrew-fix
It's a perl script that replaces each and every string with the reversed (RTLed) version of it.
FriBiDi is highly sensitive to Unicode directional guidance thus not reversing LTR (English) strings, which allows enabling it by default without consequences (when configured correctly).
It will still require reversing the menus and the widgets on screen but at least the text is covered.
BTW. How can I help testing your proposed RTL implementation? https://gist.github.com/wardi/4113436
You may want to look at libfribidi for reversing the text, you don't have to implement it yourself.
trac ticket https://excess.org/urwid/ticket/14
When someone tries using Urwid with Arabic or Hebrew text it is displayed in the wrong order.
Automatic switching of text order and handling or UTF-8 order-declaring codes would be a very nice thing to have. The structures used by StandardTextLayout should support the addition of this feature, but some changes will likely be necessary for efficient BiDi handling.