Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hebrew: General question about location of shortcut indicator "&" and reading direction

0 views
Skip to first unread message

c.b...@posteo.jp

unread,
Feb 4, 2024, 7:40:05 AMFeb 4
to
Hello,

I am upstream maintainer of "backintime". I don't know nothing about
Hebrew just that it is a right-to-left language.

I try to understand something about the position of shortcut indicators
("&") used in GUIs. Copy and pasting test is hard in this topic. So let
me also point you to a Dicussion post at Weblate including some nice
screenshots.

The term "&Options" is translated into "אפשרויות". Weblate do know the
diff between RTL and LTR languages. It displays the "&" on the right
side of the string.
So the "first" (from the right) letter is used as shortcut. I can
confirm this when looking into the original GUI. That latter is
underlined.

But looking into the raw po file (using vim) The "&" is on the left
side. That confused me.
And even when I try to copy & paste the translated string from Weblate
into this email (using posteo webfrontend dovecot) the "&" moved to the
other end. "&אפשרויות"

So the final result in the GUI is fine. So there is no real problem. I
just try to understand why it happens like this.

Kind
Christian Buhtz

c.b...@posteo.jp

unread,
Feb 5, 2024, 6:10:04 AMFeb 5
to
Dear Stephen,

thanks a lot. Your explanation helped me a bit.

How is this represented as bytes on the data disc?

As an simple example lets assume "ABC" is a word in Left-to-Right.
Making it a Hebrew word (e.g. via translation) it would be written "CBA"
because its read from Right-to-left, starting with "A", then "B" and "C"
at the end.

Am I right so far?

No lets add such a shortcut indicator to the first letter (the "A").
Weblate and Qt seems to use the correct BIDI algorithm and will display
it correctly like this:

"CB&A" (or an underlined "A" in a Qt GUI)

But a terminal without using the correct BIDI algorithm shows it like
this:

"&CBA"

I am aware that a unicode character consist of multiple bytes. Usually
it starts with 2 bytes and then there can come additional characters to
it. I remember the emoticon example of an black astronaut:
human+rocket+black (or something like this).
But please lets keep it simple and don't open the unicode box to much. I
assume there is a hidden control character indicating the read
direction?
So what is in the file?

&ABC

or

&CBA

I do guess it is the first (&ABC), right? It is coded into unicode that
the A the B and the C need to be read the "other way around"?
So the IO algorithm read something like this?

& reverted-A reverted-B reverted-C

Or even in Python:

myletters = ['&', 'A', 'B', 'C']

# but myleters[1:] are somehow coded as "other way around"

OK?

Kind
Christian
0 new messages