[Development] Introducing discussion about QStringFormatter

Mårten Nordheim marten.nordheim at qt.io
Thu Aug 17 10:20:09 CEST 2017


On 14.08.2017 18:20, Thiago Macieira wrote:
> I had the same problem, but I guess we can safely assume that anyone writing
> RTL text in their source code knows what they're doing and are used to the
> text direction changing (or they'll report bugs if the behaviour is wrong).
> 
> My question is whether people reading the code would be confused. There's two
> kind of people here:
>   1) the people who wrote RTL
>   2) a reviewer who doesn't read RTL (and isn't aware that < flips)
> 
> A - or + sign is clearly the same in RTL. So even if I don't know RTL, I know
> that "א {-10} ב" is left-justified (though I'll most likely ask the reviewer
> why the - is on the right of 10).
> 
> But like I said, maybe the < and > are beneficial, since in "א {<10} ב", the
> alignment is towards the Aleph, regardless of whether that's left or right.
> The sign that is visibly ">" is right alignment regardless of text direction,
> whereas the U+003C "less than" sign indicates alignment towards the beginning
> of the text.
> 

It might be easier to reason about the alignment being towards a 
character rather than '-' being left/right depending on LTR or RTL. And 
reviewers would get used to it over time (at most there would be a 
little wasted time during reviews where reviewers ask why/how the 
options are valid, which you mentioned you would do anyway with the '-').

Thanks,
Mårten Nordheim



More information about the Development mailing list