bug-gettext
[Top][All Lists]
Advanced

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

Re: [bug-gettext] Bug#682580: xgettext: fails to properly replace some p


From: Francesco Poli
Subject: Re: [bug-gettext] Bug#682580: xgettext: fails to properly replace some placeholders in output .pot (PACKAGE, YEAR, C. HOLDER) (fwd)
Date: Wed, 26 Aug 2015 18:39:49 +0200

On Tue, 25 Aug 2015 11:58:31 +0900 Daiki Ueno wrote:

> Francesco Poli <address@hidden> writes:
> 
> > I'd definitely vote for 3, but, wait!, even better, I would add a new
> > option named --copyright-notices (or maybe there's a better name, I
> > don't know...), where all the copyright notices may be specified with
> > their own line breaks, as in:
> 
> I'm afraid it would break configurability through po/Makevars, since a
> make variable including a multi-line argument cannot be used in a
> portable Makefile.

That's unfortunate.

> 
> By the way, if we chose (4), the patch would be like the attached, which
> reads the file po/HEADER (if exists) and insert the content into POT
> file.  The file would look like:
> 
>   # Copyright (C) 2001-2012 Python Software Foundation.
>   # Copyright (C) 2000 BeOpen.com.
>   # Copyright (C) 1995-2000 Corporation for National Research Initiatives.
>   # Copyright (C) 1991-1995 Stichting Mathematisch Centrum.
> 
> If this is sufficient, I would revert the multiple --copyright-holder
> change, as I am reluctant to add new option to xgettext, which already
> has too many options.

I would definitely prefer to see xgettext changed, rather than having
to do sed or awk tricks to post-process its output.
So, to me, (4) is the least preferred option.

Since multi-line arguments cause problems, maybe an option named
--copyright-notice could be implemented in xgettext, to be used
multiple times as in:

  $ xgettext --copyright-notice="Copyright (C) 2001-2012 Python Software 
Foundation." \
             --copyright-notice="Copyright (C) 2000 BeOpen.com." \
             --copyright-notice="Copyright (C) 1995-2000 Corporation for 
National Research Initiatives." \
             --copyright-notice="Copyright (C) 1991-1995 Stichting Mathematisch 
Centrum." \
             --package-name=myapplication --package-version=0.1 \
             --language=python myapplication.py -o myapplication2.pot

Again, this would cause myapplication2.pot to include:

  # Copyright (C) 2001-2012 Python Software Foundation.
  # Copyright (C) 2000 BeOpen.com.
  # Copyright (C) 1995-2000 Corporation for National Research Initiatives.
  # Copyright (C) 1991-1995 Stichting Mathematisch Centrum.

in stead of:

  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER


I hope you think this is a good suggestion.
Please let me know, thanks for your time!


-- 
 http://www.inventati.org/frx/
 There's not a second to spare! To the laboratory!
..................................................... Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE

Attachment: pgpnzA1jPF8SU.pgp
Description: PGP signature


reply via email to

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