[Development] right-to-left mode on Mac

Thiago Macieira thiago.macieira at intel.com
Wed Jun 28 19:56:40 CEST 2017


On Wednesday, 28 June 2017 10:04:56 PDT René J. V. Bertin wrote:
> Thiago Macieira wrote:
> > Except I want to change that. I personally think it's wrong to require the
> > translators to supply that information. Instead, we should extract from
> > CLDR and store it in QLocale.
> 
> I don't see anything in the .ts files that carries this kind of instruction.
> Instead it would seem it's contained in the font, at least for languages
> like Hebrew and Arab. Even my terminal (Konsole) renders those strings
> right-to-left unless I disable R2L support, or when I use a hex editor.

Ah, sorry, my bad. The information is in the .qm file, but not in the .ts one. 
The information is added by lrelease from a static table. See 

https://code.woboq.org/qt5/qttools/src/linguist/shared/
numerus.cpp.html#_Z14getNumerusInfoN7QLocale8LanguageENS_7CountryEP10QByteArrayP11QStringListPPKc

The array is right above. As I said, I'd like to move that from stored in the 
.qm file to stored in QtCore.

> I don't care for the rest where the info is obtained from. As long as it
> remains (easily) possible to start individual applications using a
> different locale than the one configured on the desktop or for the shell.

Right, that wouldn't change.

> > Curiosity: what is that (t) symbol?
> 
> ? That's a symbol I get with Alt-Shift-K on a Mac keyboard (or
> Command-Alt-K, I never remember and am not at my Mac right now). It's been
> under that shortcut for ages (early 90s) and once corresponded to the
> symbol on the right Command key. No idea what its Unicode name is.

Command is ⌘. That's U+2318 "PLACE OF INTEREST SIGN" and is Unicode category 
So (Symbol, other). Its direction is ON (other, neutral)

 is U+F8FF, category Co (Other, private use) and hence has no name. That's 
probably why I see it as a bold, small "t" in parentheses and you see 
something else. Its direction is L.

There's a huge difference in the text flow which one you choose. See 
https://en.wikipedia.org/wiki/Bi-directional_text

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list