hi,

check_seg.sh returns 0 with my change.

acefael

On Sun, May 03, 2015 at 12:03:41PM +0100, acefael wrote:
> hi,
> 
> thanks for the quick reply.
> 
> attached is another patch. suffix number is 2, correct?
> this one now puts N_ around the strings in the Copyright[] array.
> tested my running mutt -v -v -v.
> 
> sorry for sending the original mail twice, had technical difficulty.
> 
> kind regards,
> acefael
> 
> On Sun, May 03, 2015 at 12:14:16PM +0300, Andrej N. Gritsenko wrote:
> >     Hello!
> > 
> > Eike Rathke has written on Saturday,  2 May, at 23:58:
> > >On Saturday, 2015-05-02 13:32:23 +0100, acefael wrote:
> > 
> > >> [...]
> > >> +"Many others not mentioned here contributed code, fixes," ,
> > >> +"and suggestions." };
> > >>  
> > >> -      puts (_(Copyright));
> > >> +      {
> > >> +        int csize = sizeof(Copyright)/sizeof(Copyright[0]);
> > >> +        int i;
> > >> +        for( i = 0 ; i < csize ; ++i ) {
> > >> +          puts (_(Copyright[i]));
> > >> +        }
> > >> +      }
> > 
> > >What you may not be aware of, the _() underscore function is a special
> > >function for the gettext() translation process. AFAIK it does not work
> > >with array elements this way (someone correct me if I'm wrong).
> > 
> >     You are wrong. It works exactly that way. Although strings which are
> > passed to invocation of _() should be marked for translation elsewhere by
> > enclosing them into N_() which cannot translate static string, of course,
> > but only marks the string. In the case above each element of Copyright[]
> > array should be enclosed in N_() to be translated by _().
> > 
> >     With best regards,
> >     Andriy.

> changeset:   6446:f9cd61039620
> tag:         tip
> user:        matt cords <matt.coo...@gmail.com>
> date:        Sun May 03 12:55:05 2015 +0200
> summary:     main.c:75: warning: string length '558' is greater than the 
> length '509' ISO C90 compilers are required to support (see #3638)
> 
> diff -r 755a18da99bc -r f9cd61039620 main.c
> --- a/main.c  Sat Apr 25 19:00:13 2015 -0700
> +++ b/main.c  Sun May 03 12:55:05 2015 +0200
> @@ -72,18 +72,18 @@
>  Mutt is free software, and you are welcome to redistribute it\n\
>  under certain conditions; type `mutt -vv' for details.\n");
>  
> -static const char *Copyright = N_("\
> -Copyright (C) 1996-2007 Michael R. Elkins <m...@mutt.org>\n\
> -Copyright (C) 1996-2002 Brandon Long <bl...@fiction.net>\n\
> -Copyright (C) 1997-2008 Thomas Roessler <roess...@does-not-exist.org>\n\
> -Copyright (C) 1998-2005 Werner Koch <w...@isil.d.shuttle.de>\n\
> -Copyright (C) 1999-2009 Brendan Cully <bren...@kublai.com>\n\
> -Copyright (C) 1999-2002 Tommi Komulainen <tommi.komulai...@iki.fi>\n\
> -Copyright (C) 2000-2002 Edmund Grimley Evans <edmu...@rano.org>\n\
> -Copyright (C) 2006-2009 Rocco Rutte <pd...@gmx.net>\n\
> -\n\
> -Many others not mentioned here contributed code, fixes,\n\
> -and suggestions.\n");
> +static const char *Copyright[11] = {
> +N_("Copyright (C) 1996-2007 Michael R. Elkins <m...@mutt.org>"),
> +N_("Copyright (C) 1996-2002 Brandon Long <bl...@fiction.net>"),
> +N_("Copyright (C) 1997-2008 Thomas Roessler <roess...@does-not-exist.org>"),
> +N_("Copyright (C) 1998-2005 Werner Koch <w...@isil.d.shuttle.de>"),
> +N_("Copyright (C) 1999-2009 Brendan Cully <bren...@kublai.com>"),
> +N_("Copyright (C) 1999-2002 Tommi Komulainen <tommi.komulai...@iki.fi>"),
> +N_("Copyright (C) 2000-2002 Edmund Grimley Evans <edmu...@rano.org>"),
> +N_("Copyright (C) 2006-2009 Rocco Rutte <pd...@gmx.net>"),
> +N_(""),
> +N_("Many others not mentioned here contributed code, fixes,"),
> +N_("and suggestions.\n") };
>  
>  static const char *Licence = N_("\
>      This program is free software; you can redistribute it and/or modify\n\
> @@ -749,7 +749,13 @@
>        break;
>      default:
>        puts (mutt_make_version ());
> -      puts (_(Copyright));
> +      {
> +        int csize = sizeof(Copyright)/sizeof(Copyright[0]);
> +        int i;
> +        for( i = 0 ; i < csize ; ++i ) {
> +          puts (_(Copyright[i]));
> +        }
> +      }
>        puts (_(Licence));
>        puts (_(Obtaining));
>        puts (_(ReachingUs));
> 

Reply via email to