bug-texinfo
[Top][All Lists]
Advanced

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

i18n problems in texinfo


From: Christian Rose
Subject: i18n problems in texinfo
Date: Sun, 18 Nov 2001 18:40:52 +0100

Hi.

Below is a list of problems I encountered when translating texinfo. They
are all related to i18n and translation. It would be great if these
could be fixed.

BUG 1
-----
info/indices.c:382

  info_error (_("No %sindex entries containing \"%s\"."),
              index_offset > 0 ? _("more ") : "", index_search);

This is broken. Please don't use this type of construct, use two
complete sentences instead and an outer if statement. The reason is that
if you do these kind of string management tricks inside strings you
assume things about other languages that are not necessarily true (and
most likely not true), like if "more" in this case can be translated
seperately and still be valid when used in the sentence. Translation
should always be done on complete sentences when possible, and parts of
sentences should not be split up.
Here is what I suggest it be replaced with:

  if(index_offset > 0)
    info_error (_("No more index entries containing \"%s\"."),
index_search);
  else
    info_error (_("No index entries containing \"%s\"."), index_search);


BUG 2
-----
info/infodoc.c:45

  N_("Basic Commands in Info Windows\n"),
  N_("******************************\n"),

These messages are highly dependant on each other and belong with each
other, since the length of the second one has to exactly match the first
one. Thus it makes no sense to mark them for separate translation. If
they are translated seperately, they will most likely not match each
other's length.
Here is my suggestion:

  N_("Basic Commands in Info Windows\n"
     "******************************\n"),


BUGS 3,4,5
----------
info/infodoc.c:52
info/infodoc.c:61
info/infodoc.c:75

The same problems as in bug 2, just on different places.


BUG 6
-----
info/infodoc.c:79

  N_("  %-10s  Search for a specified string in the index entries of
this Info\n"),
  N_("              file, and select the node referenced by the first
entry found.\n"),

Please don't split a single sentence like this in multiple messages, use
one single message instead. Sentences have to be kept together when
translating, you can't split a sentence into parts and mark them for
separate translation and expect it to work with word ordering, grammar,
and everything else in other languages. Splitting sentences just makes
it harder for translators when having not just to translate, but also
puzzle the pieces of the sentence together again so that it makes some
sense, in order to be able to translate in the first place, and then
split the translated sentence in parts in several messages so that it
matches the original sentence's split-up.
Here is my suggestion:

  N_("  %-10s  Search for a specified string in the index entries of
this Info\n"
     "              file, and select the node referenced by the first
entry found.\n"),


BUGS 7,8
--------
info/infodoc.c:83
info/infodoc.c:85

The same problems as in bug 6, just in other places.


BUG 9
-----
info/session.c:3608

  sprintf (prompt, _("%s%sfor string [%s]: "),
           direction < 0 ? _("Search backward") : _("Search"),
           case_sensitive ? _(" case-sensitively ") : _(" "),
           search_string);

Never split a sentence like this, use multiple complete messages
instead.
If you split a sentence like this, you actually mark them for seperate
translation, but they shouldn't be translated seperately, since they
belong to the same sentence! All grammar/wording/sentence rules affect
how the words interact in the sentence, and you cannot take them out of
their sentence context and expect the same grammar to be valid. If you
do, you assume things about languages that are hardly true for any
language but the original one.
Please make this several, complete messages, and move the logic out of
the messages themselves. Yes, this will result in many more messages,
but those will be translatable, while the current design isn't.
My suggestion:

  if(direction < 0) {
    if(case_sensitive)
      sprintf (prompt, _("Search backward case-sensitively for string
[%s]: "),
               search_string);
    else
      sprintf (prompt, _("Search backward for string [%s]: "),
search_string);
  } else {
    if(case_sensitive)
      sprintf (prompt, _("Search case-sensitively for string [%s]: "),
               search_string);
    else
      sprintf (prompt, _("Search for string [%s]: "), search_string);
  }


BUG 10
------
makeinfo/cmds.c:502

  static char *months[12] =
    { N_("January"), N_("February"), N_("March"), N_("April"),
N_("May"),
      N_("June"), N_("July"), N_("August"), N_("September"),
N_("October"),
      N_("November"), N_("December") };

The translator should not need to translate this -- the
internationalized names of the month names are all present in libc and
can be fetched and used with nl_langinfo(), strftime(), and friends.


Thanks!

Christian



reply via email to

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