RTL support for Gnome Terminal

Since ever we (the Right To Left users) had problems with Gnome Terminal, IMHO translations to the terminal shouldn’t have ever done, but this is another story. the main problem that we discuss lately is the the support of RTL languages in the terminal. this is an issue that we always had, and I never felt any improvement in the last 4 years I use linux.

Try to think how would it be if anything in your language was opposite in the terminal…
just to illustrate the situation, here is the way RTL user sees apt-get help output: (please do try reading it, it’s not only flipped, it’s an exact simulation of RTL text in Gnome Terminal!)

dor@dor-laptop:~$ apt-get help
15 2009 19:23:21 tcO no delipmoc i386 rof apt 0.7.23.1ubuntu2
dnammoc [snoitpo] apt-get :egasU
[… 2gkp] 1gkp evomer|llatsni [snoitpo] apt-get
[… 2gkp] 1gkp ecruos [snoitpo] teg-tpa

dna gnidaolnwod rof ecafretni enil dnammoc elpmis a si apt-get
etadpu era sdnammoc desu yltneuqerf tsom ehT .segakcap gnillatsni
.llatsni dna

:sdnammoC
segakcap fo stsil wen eveirteR – update
edargpu na mrofreP – upgrade
(bed.6cbil ton 6cbil si gkp) segakcap wen llatsnI – install
segakcap evomeR – remove
segakcap desunu lla yllacitamotua evomeR – autoremove
selif gifnoc dna segakcap evomeR – purge
sevihcra ecruos daolnwoD – source
segakcap ecruos rof seicnedneped-dliub erugifnoC – build-dep
(8)teg-tpa ees ,edargpu noitubirtsiD – dist-upgrade
snoitceles tcelesd wolloF – dselect-upgrade
selif evihcra dedaolnwod esarE – clean
selif evihcra dedaolnwod dlo esarE – autoclean
seicnedneped nekorb on era ereht taht yfireV – check

:snoitpO
.txet pleh sihT h-
rotacidni ssergorp on – tuptuo elbaggoL q-
srorre rof tpecxe tuptuo oN qq-
sevihcra kcapnu ro llatsni TON od – ylno daolnwoD d-
noitalumis gniredro mrofreP .tca-oN s-
tpmorp ton od dna seireuq lla ot seY emussA y-
ecalp ni seicnedneped nekorb htiw metsys a tcerroc ot tpmettA f-
elbatacolnu era sevihcra fi eunitnoc ot tpmettA m-
llew sa segakcap dedargpu fo tsil a wohS u-
ti gnihctef retfa egakcap ecruos eht dliuB b-
srebmun noisrev esobrev wohS V-
elif noitarugifnoc siht daeR ?=c-
o dir::cache=/tmp- ge ,noitpo noitarugifnoc yrartibra na teS ?=o-
launam (5)apt.conf dna (5)sources.list ,(8)apt-get eht eeS
.snoitpo dna noitamrofni erom rof segap
.srewoP woC repuS sah APT sih
T

THAT IS ANNOYING! yes – it does!
following a bug report opened about it in gnome says one thing: NO. nothing is going to happen, this bug won’t EVER be fixed.

I believe that if there will be any better patch, it will be added to the next version. our problem is that we just don’t know from where to attack that bug.

any suggestions? any ideas? any good hackers around?

Thanks in advance,
Dor (and all affected users).

9 thoughts on “RTL support for Gnome Terminal

  1. I am fucking sick of reading this bug report. The correct solution is to remove the translations of apt/aptitude/whatever from the application. What happens when you fix gnome-terminal? now xterm is broken. and xfce-terminal, and the e1{7,8}. OK, lets will all those applications.

    Now what? The console is broken. I mean the real TTYs. How are you going to fix this? I am not even going deeper and explaining what is really wrong in fixing terminals to handle BIDI. But you need to understand – you are fixing the wrong problem.

  2. as I said in the post, IMHO any console text shouldn’t be translated.
    however – it is quite impossible to filter only what goes in the CLI, and I guess it would be easier to fix the RTL problem than making all project stop labeling for translation any CLI text.

  3. Dor – you can’t “fix the problem in console”. Not only you have 10 different applications to fix – but even if you do, you will brake something else. For example, vim editing Hebrew text will get broken – as the cursor will not point to the char it’s pointing at (since a layer above the editor, the terminal) is changing the display.

    Terminals application are dumb – they assume full control over the display terminal. If the terminal will change what the applications ask them to show, shit will hit the fan. If you don’t believe me, here is a proof: http://www.youtube.com/watch?v=SYxvVe9y5NQ

  4. so you believe we should try the other “solution” – just removing the translations from all the console programs?
    what with programs that has both GUI and CLI? they might use the same strings for both.

  5. I agree with elcuco.
    We are trying to fix the wrong problem.
    The problem is that CLI strings are int the POT files, with no comment or other indication that those strings goes to the CLI and not the GUI.

    We should report this bug in GNOME, KDE, and developer mailing lists.

    If the developers won’t tell us which string goes where, we will never be able to fix this problem.

    what with programs that has both GUI and CLI? they might use the same strings for both.

    Developers shouldn’t use the same string in GUI and CLI. if we will explain the problem, they will fix it.

  6. Save the following code to: /usr/bin/flip

    #!/usr/bin/php
    -1; $i--) {
    $c = $line{$i};
    if($c != "\r" && $c != "\n")
    echo $line{$i};
    }
    echo "\n";
    }

    fclose($handle);

    usage:

    yourhebrewcommand | flip

    and you have your fix

  7. Very nice. but:
    1) it will not work if you don’t have php installed
    2) it will not work on cli programs like vim etc.

    Dor.

Leave a Reply

Your email address will not be published. Required fields are marked *