Re: Message Boxes / 5:3 Ratio



Ole Laursen <olau hardworking dk> writes:

> I think this is a bad way of doing it - what if you by accident indent
> the lines?

Avoid accidents.  Use proper tools: Emacs or indent.  I'm pretty sure vi
can do the dirty work for you, too.

BTW, you'll quickly see if you indented a string wrongly ("by
accident") if you're doing it right.

> Try this instead
> 
>   (_(""
>   "Some text here (...)\n"
>   "More text here (...)\n"
>   "\n"
>   "Event more text here (...)\n"))

Normal tools will indent it this way automatically:

(_(""
   "Some text here (...)\n"
   "More text here (...)\n"
   "\n"
   "Event more text here (...)\n"))

Do you see the problem?  To make it more clear (gettext() calls don't
use to start in column 0):

            (_(""
               "Some text here; normally longer than just 10 characters (...)\n"
               "More text here sometimes even longer than just 72 characters, maybe 79 (...)\n"
               "whoops\n"))

And to obey line length rule people will start to write it this way:

            (_(""
               "Some text here; normally longer than just 10 characters (...)\n"
               "More text here sometimes even longer than just 72 characters,"
               "maybe 79 (...)\n"
               "whoops -- it's getting worse.\n"))

And some brave soul will have to "fix" it:

            (_(""
               "Some text here; normally longer than just 10 characters (...)\n"
               "More text here sometimes even longer than just 72 characters, "
               "maybe 79 (...)\n"
               "whoops -- it's getting worse.\n"))

Yes, this happens ALL the time.  And it's so easy to avoid such a mess.
E.g., check out the fileutils package and you'll see how to do it
properly.  Jim Meyering has done a great job the last years!

> The compiler will automatically concatenate the strings.

This is well know to me.  Aditionally I'm told some compilers have
limitations (IRIX).  If you'll encounter such a limitation (2048 chars?)
just concate the strings.  Even better for the translators.

-- 
work : ke suse de                          |                   ,__o
     : http://www.suse.de/~ke/             |                 _-\_<,
home : keichwa gmx net                     |                (*)/'(*)




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