Chet Ramey wrote:
> Benno Schulenberg wrote:
> > On the other hand, it looks like all of the message strings in
> > lib/malloc/watch.c are debugging messages, [...]
>
> Yes.  The affected code is not compiled in by default unless
> DEBUG is defined, and that has to be turned on manually when the
> shell's release status is `release'.  Presumably anyone who does
> this (primarily me :-) ) is able to deal with the untranslated
> messages.

So you will ungettextize them, to lighten the burden on the 
translators just a little?

> > In many short doc strings the case of the parameters in the
> > first line does not match the case in the rest of the
> > explanation.  [...]
>
> This is intentional.  The completely-capitalized words in the
> body of the documentation string are intended to be a sort of
> meta- notation.

But then, to be consistent, some other parameters will have to be 
lowercased too.  For example:

  caller [EXPR]
  for NAME [in WORDS ... ;] do COMMANDS; done
  for (( exp1; exp2; exp3 )); do COMMANDS; done
  select NAME [in WORDS ... ;] do COMMANDS; done
  time [-p] PIPELINE
  case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac
  while COMMANDS; do COMMANDS; done

In my opinion, however, it's much clearer to have the fixed parts in 
lower case and the replaceables in uppercase -- at least for these 
help messages that cannot use anything like bold, underline, italics 
or colours.

> texinfo does the same thing when rendering 
> @var{name} for ttys, though it uses quotes.

But it renders @var{dir} as `DIR' also in the short description, not 
only in its explanation.  See for example 'info bash bash the dir'.

In all synopses in the info pages uppercasing is used in the way I'd 
like to see it used in the help messages too.  In the man page this 
isn't done, and it results in some quite confusing synopses:

       popd [-n] [+n] [-n]

       pushd [-n] [dir]
       pushd [-n] [+n] [-n]
 
On the console there's no difference to be seen between the first 
'-n' and the second.  And to make matters worse, the second '-n' is 
described first, and the first second.  In an xterm or Konsole this 
is slightly less of a problem as options are bold and parameters 
underlined.  But still, to alleviate the confusion a little, at 
least the arguments should be described in the order that they 
appear in the synopsis.  See the first patch for the man page.  The 
second patch does the same for the info page, and also puts options 
before other arguments, adds two blank lines, removes a short 
superfluous sentence, and fixes an incorrect 'cd DIR'.

> > Much better than just that would be: if also the first line of
> > the short doc string were gettextized (like they used to be in
> > older versions of bash), [...]
>
> This is a good idea; I will make the change.

Thanks.  Just to make sure there isn't any misunderstanding: you 
will gettextize the synopsis of each builtin command as a separate 
string, and not as a part of its explanation?  Because the latter 
would make the Spanish and Turkish translators (and me too) pretty 
unhappy, rendering most of their work useless for the next release.

> > with the superfluous
> > "N_(...)" lines removed from caller.def and pushd.def.  [...]
>
> These builtins can be compiled
> as part of the shell or as loadable builtins.  When compiled as
> loadables, they are not processed by mkbuiltins, and the long
> documentation strings don't end up in builtins.c,

But when bash is compiled with --disable-directory-stack, the 
strings that belong to dirs/pushd/popd still end up in the bash.mo 
files, both the long strings _and the chopped up ones -- simply 
because bash.pot is made at release time, not compile time.

I don't understand how to compile pushd and friends as separately 
loadable things (./configure --help doesn't say anything about it), 
otherwise I would have tested it to see if they get translated 
anyway.

> so they have to 
> be marked as translatable somehow.

If this duplication of strings is nevertheless necessary, then 
please mark each message in its entirety, not line by line.  If 
that somehow is not possible, then please add comments to warn 
translators that these strings are superfluous.  See third patch.  
Gettext will copy these comments automagically to bash.pot and the 
po files.

Benno
diff -ur bash-3.2.orig/doc/bash.1 bash-3.2.new/doc/bash.1
--- bash-3.2.orig/doc/bash.1	2006-10-03 14:54:26.000000000 +0200
+++ bash-3.2.new/doc/bash.1	2006-11-25 16:56:15.000000000 +0100
@@ -6527,18 +6527,6 @@
 .RS
 .PD 0
 .TP
-\fB+\fP\fIn\fP
-Displays the \fIn\fPth entry counting from the left of the list
-shown by
-.B dirs
-when invoked without options, starting with zero.
-.TP
-\fB\-\fP\fIn\fP
-Displays the \fIn\fPth entry counting from the right of the list
-shown by
-.B dirs
-when invoked without options, starting with zero.
-.TP
 .B \-c
 Clears the directory stack by deleting all of the entries.
 .TP
@@ -6552,6 +6540,18 @@
 .B \-v
 Print the directory stack with one entry per line,
 prefixing each entry with its index in the stack.
+.TP
+\fB+\fP\fIn\fP
+Displays the \fIn\fPth entry counting from the left of the list
+shown by
+.B dirs
+when invoked without options, starting with zero.
+.TP
+\fB\-\fP\fIn\fP
+Displays the \fIn\fPth entry counting from the right of the list
+shown by
+.B dirs
+when invoked without options, starting with zero.
 .PD
 .PP
 The return value is 0 unless an
@@ -7268,6 +7268,10 @@
 .RS
 .PD 0
 .TP
+.B \-n
+Suppresses the normal change of directory when removing directories
+from the stack, so that only the stack is manipulated.
+.TP
 \fB+\fP\fIn\fP
 Removes the \fIn\fPth entry counting from the left of the list
 shown by
@@ -7291,10 +7295,6 @@
 .if n ``popd -1''
 .if t \f(CWpopd -1\fP
 the next to last.
-.TP
-.B \-n
-Suppresses the normal change of directory when removing directories
-from the stack, so that only the stack is manipulated.
 .PD
 .PP
 If the
@@ -7346,6 +7346,16 @@
 .RS
 .PD 0
 .TP
+.B \-n
+Suppresses the normal change of directory when adding directories
+to the stack, so that only the stack is manipulated.
+.TP
+.I dir
+Adds
+.I dir
+to the directory stack at the top, making it the
+new current working directory.
+.TP
 \fB+\fP\fIn\fP
 Rotates the stack so that the \fIn\fPth directory
 (counting from the left of the list shown by
@@ -7358,16 +7368,6 @@
 (counting from the right of the list shown by
 .BR dirs ,
 starting with zero) is at the top.
-.TP
-.B \-n
-Suppresses the normal change of directory when adding directories
-to the stack, so that only the stack is manipulated.
-.TP
-.I dir
-Adds
-.I dir
-to the directory stack at the top, making it the
-new current working directory.
 .PD
 .PP
 If the
diff -ur bash-3.2.orig/doc/bashref.texi bash-3.2.new/doc/bashref.texi
--- bash-3.2.orig/doc/bashref.texi	2006-09-28 16:25:28.000000000 +0200
+++ bash-3.2.new/doc/bashref.texi	2006-11-25 19:44:35.000000000 +0100
@@ -5679,20 +5679,13 @@
 @item dirs
 @btindex dirs
 @example
-dirs [EMAIL PROTECTED] | [EMAIL PROTECTED] [-clpv]
+dirs [-clpv] [EMAIL PROTECTED] | [EMAIL PROTECTED]
 @end example
 Display the list of currently remembered directories.  Directories
 are added to the list with the @code{pushd} command; the
 @code{popd} command removes directories from the list.
+
 @table @code
[EMAIL PROTECTED] [EMAIL PROTECTED]
-Displays the @var{N}th directory (counting from the left of the
-list printed by @code{dirs} when invoked without options), starting
-with zero.
[EMAIL PROTECTED] [EMAIL PROTECTED]
-Displays the @var{N}th directory (counting from the right of the
-list printed by @code{dirs} when invoked without options), starting
-with zero.
 @item -c
 Clears the directory stack by deleting all of the elements.
 @item -l
@@ -5704,12 +5697,20 @@
 @item -v
 Causes @code{dirs} to print the directory stack with one entry per
 line, prefixing each entry with its index in the stack.
[EMAIL PROTECTED] [EMAIL PROTECTED]
+Displays the @var{N}th directory (counting from the left of the
+list printed by @code{dirs} when invoked without options), starting
+with zero.
[EMAIL PROTECTED] [EMAIL PROTECTED]
+Displays the @var{N}th directory (counting from the right of the
+list printed by @code{dirs} when invoked without options), starting
+with zero.
 @end table
 
 @item popd
 @btindex popd
 @example
-popd [EMAIL PROTECTED] | [EMAIL PROTECTED] [-n]
+popd [-n] [EMAIL PROTECTED] | [EMAIL PROTECTED]
 @end example
 
 Remove the top entry from the directory stack, and @code{cd}
@@ -5719,22 +5720,23 @@
 performs a @code{cd} to the new top directory.  The
 elements are numbered from 0 starting at the first directory listed with
 @code{dirs}; i.e., @code{popd} is equivalent to @code{popd +0}.
+
 @table @code
[EMAIL PROTECTED] -n
+Suppresses the normal change of directory when removing directories
+from the stack, so that only the stack is manipulated.
 @item [EMAIL PROTECTED]
 Removes the @var{N}th directory (counting from the left of the
 list printed by @code{dirs}), starting with zero.
 @item [EMAIL PROTECTED]
 Removes the @var{N}th directory (counting from the right of the
 list printed by @code{dirs}), starting with zero.
[EMAIL PROTECTED] -n
-Suppresses the normal change of directory when removing directories
-from the stack, so that only the stack is manipulated.
 @end table
 
 @btindex pushd
 @item pushd
 @example
-pushd [EMAIL PROTECTED] | @var{+N} | @var{-N}] [-n]
+pushd [-n] [EMAIL PROTECTED] | @var{+N} | @var{-N}]
 @end example
 
 Save the current directory on the top of the directory stack
@@ -5742,6 +5744,12 @@
 With no arguments, @code{pushd} exchanges the top two directories.
 
 @table @code
[EMAIL PROTECTED] -n
+Suppresses the normal change of directory when adding directories
+to the stack, so that only the stack is manipulated.
[EMAIL PROTECTED] @var{dir}
+Makes the current working directory be the top of the stack, and then
+executes the equivalent of @code{cd @var{dir}}.
 @item [EMAIL PROTECTED]
 Brings the @var{N}th directory (counting from the left of the
 list printed by @code{dirs}, starting with zero) to the top of
@@ -5750,13 +5758,6 @@
 Brings the @var{N}th directory (counting from the right of the
 list printed by @code{dirs}, starting with zero) to the top of
 the list by rotating the stack.
[EMAIL PROTECTED] -n
-Suppresses the normal change of directory when adding directories
-to the stack, so that only the stack is manipulated.
[EMAIL PROTECTED] @var{dir}
-Makes the current working directory be the top of the stack, and then
-executes the equivalent of [EMAIL PROTECTED] @var{dir}'.
[EMAIL PROTECTED] to @var{dir}.
 @end table
 
 @end table
diff -ur bash-3.2.orig/builtins/caller.def bash-3.2.new/builtins/caller.def
--- bash-3.2.orig/builtins/caller.def	2006-08-24 17:30:39.000000000 +0200
+++ bash-3.2.new/builtins/caller.def	2006-11-25 18:49:49.000000000 +0100
@@ -128,6 +128,8 @@
 
 #ifdef LOADABLE_BUILTIN
 static char *caller_doc[] = {
+  /* TRANSLATORS: This and the next few messages are unused;
+     they can be ignored and skipped. */
   N_("Returns the context of the current subroutine call."),
   N_(" "),
   N_("Without EXPR, returns returns \"$line $filename\".  With EXPR,"),
@@ -135,6 +137,7 @@
   N_("can be used used to provide a stack trace."),
   N_(" "),
   N_("The value of EXPR indicates how many call frames to go back before the"),
+  /* TRANSLATORS: This is the last of this group of ignorable messages. */
   N_("current one; the top frame is frame 0."),
   (char *)NULL
 };
diff -ur bash-3.2.orig/builtins/pushd.def bash-3.2.new/builtins/pushd.def
--- bash-3.2.orig/builtins/pushd.def	2006-03-06 15:41:33.000000000 +0100
+++ bash-3.2.new/builtins/pushd.def	2006-11-25 18:49:43.000000000 +0100
@@ -660,6 +660,8 @@
 
 #ifdef LOADABLE_BUILTIN
 char * const dirs_doc[] = {
+  /* TRANSLATORS: This and the next series of messages are unused;
+     they can be ignored and skipped. */
   N_("Display the list of currently remembered directories.  Directories"),
   N_("find their way onto the list with the `pushd' command; you can get"),
   N_("back up through the list with the `popd' command."),
@@ -719,6 +721,7 @@
   N_("-n   suppress the normal change of directory when removing directories"),
   N_("     from the stack, so only the stack is manipulated."),
   N_(" "),
+  /* TRANSLATORS: This is the last of this group of ignorable messages. */
   N_("You can see the directory stack with the `dirs' command."),
   (char *)NULL
 };
_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to