bug-gnu-utils
[Top][All Lists]
Advanced

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

Assorted i18n bugs with bfd


From: Christian Rose
Subject: Assorted i18n bugs with bfd
Date: 21 Dec 2001 23:14:24 +0100

While translating bfd 2.11 into Swedish, I have encountered some
messages from the source that are problematic with regard to
internationalization.


BUG 1
-----
elf32-arm.h:2138

 _bfd_error_handler (_("\
   Error: %s passes floats in %s registers, whereas %s passes them in %s
registers"
   ),
   bfd_get_filename (ibfd),
   in_flags & EF_APCS_FLOAT ? _("float") : _("integer"),
   bfd_get_filename (obfd),
   out_flags & EF_APCS_26 ? _("float") : _("integer"));

This is broken. Don't split up a sentence like this, use multiple full
messages instead. There are many problems with split-ups like this. One
of the most serious is that you assume things about other languages that
are not necessarily true. In this case you assume that the words "float"
and "integer" are independant parts of the terms "float registers" and
"integer registers", which isn't true for Germanic languages like
Swedish, that uses compund words extensively. Thus, "float" and
"integer" cannot be translated seperately and re-inserted into a
sentence like the above.

To give you the situation in Swedish:
"integer"               = "heltal"
"registers"             = "register"
"XYZ registers"         = "XYZ-register" (if XYZ is an acronym)
but:
"integer registers"     = "heltalsregister"

As you can see, it's simply not possible to translate this correctly
(other than by an ugly hack that will break when another identical
message is added to the source) with the code above.

The solution to all of this is to use multiple, full messages:

"Error: %s passes floats in float registers, whereas %s passes them in
integer registers"
"Error: %s passes floats in integer registers, whereas %s passes them in
float registers"

Please consider this change.


BUG 2
-----
elf32-arm.h:2150

  _bfd_error_handler (_ ("\
    Error: %s uses %s floating point, whereas %s uses %s floating
point"),
    bfd_get_filename (ibfd),
    in_flags & EF_SOFT_FLOAT ? _("soft") : _("hard"),
    bfd_get_filename (obfd),
    out_flags & EF_SOFT_FLOAT ? _("soft") : _("hard"));

This is broken, for the same reasons as above. You cannot mark "soft"
and "hard" for translation seperated from the rest of the sentence and
expect it to work in other languages. Use multiple, full messages
instead:

"Error: %s uses soft floating point, whereas %s uses hard floating
point"
"Error: %s uses hard floating point, whereas %s uses soft floating
point"


BUG 3
-----
elf32-arm.h:2162

  _bfd_error_handler (_("\
    Warning: %s %s interworking, whereas %s %s"),
    bfd_get_filename (ibfd),
    in_flags & EF_INTERWORK ? _("supports") : _("does not support"),
    bfd_get_filename (obfd),
    out_flags & EF_INTERWORK ? _("does not") : _("does"));

Same problems as the above. Use multiple, full messages instead.


Christian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]