[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: |
Daiki Ueno |
Subject: |
Re: [bug-gettext] Bug#682580: xgettext: fails to properly replace some placeholders in output .pot (PACKAGE, YEAR, C. HOLDER) (fwd) |
Date: |
Tue, 25 Aug 2015 11:58:31 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
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.
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.
Regards,
--
Daiki Ueno
>From c8f8099dca7976fa26d7ac671446144f1fe044c9 Mon Sep 17 00:00:00 2001
From: Daiki Ueno <address@hidden>
Date: Tue, 25 Aug 2015 11:47:20 +0900
Subject: [PATCH] po: Insert HEADER file into POT file
* gettext-tools/po/Makefile.in.in ($(DOMAIN).pot-update): Add
insert-header.sed to prerequisites. Insert the contents of the file
"HEADER".
(mostlyclean): Remove insert-header.sed.
---
gettext-runtime/po/ChangeLog | 6 ++++++
gettext-runtime/po/Makefile.in.in | 8 +++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/gettext-runtime/po/ChangeLog b/gettext-runtime/po/ChangeLog
index e5d8f0d..73ccaa2 100644
--- a/gettext-runtime/po/ChangeLog
+++ b/gettext-runtime/po/ChangeLog
@@ -1,3 +1,9 @@
+2015-08-25 Daiki Ueno <address@hidden>
+
+ * Makefile.in.in ($(DOMAIN).pot-update): Add insert-header.sed to
+ prerequisites. Insert the contents of the file "HEADER".
+ (mostlyclean): Remove insert-header.sed.
+
2015-07-10 Daiki Ueno <address@hidden>
* gettext 0.19.5 released.
diff --git a/gettext-runtime/po/Makefile.in.in
b/gettext-runtime/po/Makefile.in.in
index c36f1ad..f4267ab 100644
--- a/gettext-runtime/po/Makefile.in.in
+++ b/gettext-runtime/po/Makefile.in.in
@@ -150,7 +150,7 @@ stamp-po: $(srcdir)/$(DOMAIN).pot
# The determination of whether the package xyz is a GNU one is based on the
# heuristic whether some file in the top level directory mentions "GNU xyz".
# If GNU 'find' is available, we avoid grepping through monster files.
-$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
+$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
insert-header.sed
package_gnu="$(PACKAGE_GNU)"; \
test -n "$$package_gnu" || { \
if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null;
then \
@@ -195,6 +195,11 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in
remove-potcdate.sed
;; \
esac
test ! -f $(DOMAIN).po || { \
+ if test -f $(srcdir)/HEADER; then \
+ sed -f insert-header.sed < $(DOMAIN).po > $(DOMAIN).1po && \
+ rm -f $(DOMAIN).po && \
+ mv $(DOMAIN).1po $(DOMAIN).po; \
+ fi; \
if test -f $(srcdir)/$(DOMAIN).pot; then \
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot >
$(DOMAIN).1po && \
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
@@ -365,6 +370,7 @@ info dvi ps pdf html tags TAGS ctags CTAGS ID:
mostlyclean:
rm -f remove-potcdate.sed
+ rm -f insert-header.sed
rm -f stamp-poT
rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
rm -fr *.o
--
2.4.3
- Re: [bug-gettext] Bug#682580: xgettext: fails to properly replace some placeholders in output .pot (PACKAGE, YEAR, C. HOLDER) (fwd), Daiki Ueno, 2015/08/21
- Re: [bug-gettext] Bug#682580: xgettext: fails to properly replace some placeholders in output .pot (PACKAGE, YEAR, C. HOLDER) (fwd), Santiago Vila, 2015/08/21
- Re: [bug-gettext] Bug#682580: xgettext: fails to properly replace some placeholders in output .pot (PACKAGE, YEAR, C. HOLDER) (fwd), Francesco Poli, 2015/08/21
- Re: [bug-gettext] Bug#682580: xgettext: fails to properly replace some placeholders in output .pot (PACKAGE, YEAR, C. HOLDER) (fwd), Daiki Ueno, 2015/08/24
- Re: [bug-gettext] Bug#682580: xgettext: fails to properly replace some placeholders in output .pot (PACKAGE, YEAR, C. HOLDER) (fwd), Francesco Poli, 2015/08/24
- Re: [bug-gettext] Bug#682580: xgettext: fails to properly replace some placeholders in output .pot (PACKAGE, YEAR, C. HOLDER) (fwd),
Daiki Ueno <=
- Re: [bug-gettext] Bug#682580: xgettext: fails to properly replace some placeholders in output .pot (PACKAGE, YEAR, C. HOLDER) (fwd), Francesco Poli, 2015/08/26
- Re: [bug-gettext] Bug#682580: xgettext: fails to properly replace some placeholders in output .pot (PACKAGE, YEAR, C. HOLDER) (fwd), Daiki Ueno, 2015/08/26
- Re: [bug-gettext] Bug#682580: xgettext: fails to properly replace some placeholders in output .pot (PACKAGE, YEAR, C. HOLDER) (fwd), Francesco Poli, 2015/08/30
- Re: [bug-gettext] Bug#682580: xgettext: fails to properly replace some placeholders in output .pot (PACKAGE, YEAR, C. HOLDER) (fwd), Daiki Ueno, 2015/08/30