[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#273982: partman: Broken display during Arabic installs



On Fri, Dec 03, 2004 at 05:08:16PM +0200, Anton Zinoviev wrote:
> On Wed, Sep 29, 2004 at 07:38:19AM +0200, Christian Perrier wrote:
> > 
> > The attached screen captures show the main partman screen and the partition
> > aditiing screen during an Arabic install. As you may see, the display is
> > somewhat broken. For instance the partition size and the unit are not close
> > together and the display is not properly aligned.
> > 
> > This is probably a consequence of formatting with a "left-to-right"
> > reasoning and will probably affect all install with right-to-left languages.

> What algorithms are used to format the screen for such languages?

One problem with Arabic displays is simply that RTL text ought to be
*right*-justified, instead of left-justified, within a field; this is a
low-level issue with the way information is being passed to libslang about
how much screen real estate a given string should occupy.  Fixing this means
that libslang should know how wide the available field is, and pad the
string with spaces at the end to get the desired formatting effect.

Another issue is that some of the Arabic translations for partman seem to be
just plain screwy:

#. Type: text
#. Description
#: ../partman.templates:252
#, no-c-format
msgid "SCSI%s (%s,%s,%s) (%s)"
msgstr "SCSI%s )%s،%s،%s("

#. Type: text
#. Description
#: ../partman.templates:256
#, no-c-format
msgid "SCSI%s (%s,%s,%s), partition #%s (%s)"
msgstr "سكزي%s (%s,%s,%s), التّجزئة #%s (%s)"

While the rules regarding bidi transitions are rather complex (and setting
aside for the moment the inconsistency of whether or not to translate
"SCSI"), it's clear that these translation's can't *both* be right: the
parentheses need to go one way or the other, not just picking one at random.

Which way to go is up to the Arabic translators, I think, but if they decide
to use the parenthesis inversion (which I imagine is the more natural style
in Arabic), they will also need to use a direction marker so that the string
actually gets formatted right-to-left!  The necessary marker appears to be
Unicode character U+200f, RIGHT-TO-LEFT MARK.  Unfortunately, I can't seem
to actually make this work in testing here (outside of d-i); I'm happy to
float some patched po files to you, Christian, if you have time to look into
this further to confirm whether the results are correct under d-i itself.

Oh, and the fact that the translation of the first string above has a
different number of %s substitutions than the original can't help matters...

-- 
Steve Langasek
postmodern programmer

Attachment: signature.asc
Description: Digital signature


Reply to: