bug-findutils
[Top][All Lists]
Advanced

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

Re: please cut up help text of xargs into manageable translatable chunks


From: Benno Schulenberg
Subject: Re: please cut up help text of xargs into manageable translatable chunks
Date: Thu, 07 Feb 2013 20:20:40 +0100

Hello Bernhard,

Thanks for addressing this.

On Thu, Feb 7, 2013, at 0:12, Bernhard Voelker wrote:
> I played a bit with separating the option descriptions, and
> the most readable solution in the code seems the be to define
> an array of strings - one per option, and to define them like
> this:
> 
> ...
>   "), _("\
>     -X, --xyz     some text\n\
>   "), _("\
>     -Y            another option with a longer\n\
>                   description message\n\
>   "), _("\

Hmmm...  To me these intervening lines with '"), _("\' look
distracting.  Would it not be possible to define a macro that
does the whole 'fputs (_("..."), stream)' thing?  Lines can
then become upto 91 columns long, but is that a nono?

  HTL ("  -X, --xyz     some text\n\");
  HTL ("  -Y            another option with a longer\n\
                  description message\n\");

> WDYT?

You are the coder, whatever pleases your eye is fine.  :)
All the options have become separate strings, that is
the main thing.

By the way, between usage synopsis and doc string I
would use a blank line.  And the coding style seems to
be: a space before opening parenthesis -- for 'for' and
some 'fputs' it is missing.  Also, help texts can use the
full 80 columns (of the most common terminal width),
so some lines do not need to be wrapped, for example:

 -n, --max-args=MAX-ARGS      use at most MAX-ARGS arguments per command\n\
                              line\n\

and

     --process-slot-var=VAR   set environment variable VAR in child\n\
                              processes\n\

Regards,

Benno

-- 
http://www.fastmail.fm - Send your email first class




reply via email to

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