[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
trans-coord/gnun/server/gnun GNUmakefile.team C...
From: |
Pavel Kharitonov |
Subject: |
trans-coord/gnun/server/gnun GNUmakefile.team C... |
Date: |
Thu, 10 Jan 2013 10:53:38 +0000 |
CVSROOT: /sources/trans-coord
Module name: trans-coord
Changes by: Pavel Kharitonov <ineiev> 13/01/10 10:53:38
Modified files:
gnun/server/gnun: GNUmakefile.team ChangeLog
Log message:
(merge-file, sync-file): Propagate new translations from `www'
to `www-$(TEAM)'. Broken since 2013-01-06.
(inform-$(1)): Join subsequent lines reporting against the same file
to avoid writing unnecessarily duplicated URLs.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/GNUmakefile.team?cvsroot=trans-coord&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/ChangeLog?cvsroot=trans-coord&r1=1.343&r2=1.344
Patches:
Index: GNUmakefile.team
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/GNUmakefile.team,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- GNUmakefile.team 8 Jan 2013 07:39:51 -0000 1.28
+++ GNUmakefile.team 10 Jan 2013 10:53:38 -0000 1.29
@@ -248,7 +248,22 @@
# Merge a file.
# When the master compendium is present, its translations override
# the translations from the PO file.
-# $(1) is the PO file to merge; $$$$pot is its POT.
+#
+# Input files
+#
+# $1: the PO file to merge.
+# $$$$pot: Its POT.
+# $$$$comp (when non-empty): an additional argument with PO file
+# from `www' used as compendium, in order to copy new translations
+# from `www' to `www-$(TEAM)'.
+#
+# Intermediate files
+#
+# $1-tmp0.po: the set of msgids common to master.$(TEAM).po and $1.
+# $1-tmp1.po: $1 without the set defined in $1-tmp0.po (when the latter
+# is not empty).
+# $$$$po0: the PO file to acutally merge ($1-tmp1.po when it exists,
+# otherwise $1).
define merge-file
$(if $(master), \
po0=$1; \
@@ -257,11 +272,11 @@
$(MSGCAT) --less-than=2 --use-first $1 $1-tmp0.po > $1-tmp1.po; \
fi; \
if test -s $1-tmp1.po; then po0=$1-tmp1.po; fi; \
- $(MSGMERGE) --previous $(MSGMERGEVERBOSE) -C $(master) \
+ $(MSGMERGE) --previous $(MSGMERGEVERBOSE) -C $(master) $$$$comp \
-o $1 $$$$po0 $$$$pot 2>&1; \
$(RM) $1-tmp0.po $1-tmp1.po \
, \
- $(MSGMERGE) $(MSGMERGEFLAGS) $(MSGMERGEVERBOSE) \
+ $(MSGMERGE) $(MSGMERGEFLAGS) $(MSGMERGEVERBOSE) $$$$comp \
--update $1 $$$$pot 2>&1 \
)
endef
@@ -271,6 +286,11 @@
echo " " `$(MSGFMT) -o /dev/null --statistics $1 2>&1`
endef
+# Synchronize (merge) a file.
+# The translations from $(master) override the translations from PO files
+# ($(master) update triggers remerging all files);
+# new translations from `www' propagate to `www-$(TEAM)'; current translations
+# from `www' replace fuzzy translations in `www-$(TEAM)'.
define sync-file
.PNONY: sync-$(1)
sync-$(1): $(sync-master)
@@ -280,8 +300,9 @@
if test ! -f $$$$pot; then \
echo "Warning: $$$${file#./} has no equivalent .pot in www."; \
else \
- www_po=$(wwwdir)`dirname $1`/po/`basename $1`; \
+ www_po=$(wwwdir)`dirname $1`/po/`basename $1`; comp=; \
if test -f $$$${www_po}; then \
+ comp="-C $$$$www_po"; \
$$(if $(master), test $$$$file -nt $(master) && ) \
$$(call cmp-POs,$1,$$$${www_po}) \
&& echo "$$$${file#./}: Already in sync." \
@@ -645,7 +666,12 @@
if test "x$$$$attachments" != x; then \
attachments="-a $$$$attachments --"; \
fi; \
- grep -v '^#' $(1).note | sed "s/^/@/" \
+ grep -v '^#' $(1).note \
+ $(if, Join subsequent lines reporting against the same file) \
+ $(if, to avoid writing unnecessarily duplicated URLs.) \
+ | sed " /:/ { :c; N; s/^\([^:]*:\)\(.*\)\n\1/\1\2@/; t c; h; \
+ s/\n[^\n]*$$$$//; p; g; s/[^\n]*\n//; /:/ b c }" \
+ | sed "s/^/@/" \
| while read line; do \
line="address@hidden"; \
echo -n "$$$$line"; \
@@ -680,6 +706,8 @@
fi; \
echo; \
done \
+ $(if, "Unjoin" the lines reporting against the same file.) \
+ | sed "/:.*@/{:cycle; s/^\([^:]*:\)\(.*\)@/\1\2\n\1/; t cycle;}" \
| $(GNUN_MAIL) -s "Automatic Notification for \`"$1"'" \
$$$$attachments $$$$email; $(MAIL_TAIL) \
sed --in-place '1{/^#/d;}' $(1).note; \
Index: ChangeLog
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/ChangeLog,v
retrieving revision 1.343
retrieving revision 1.344
diff -u -b -r1.343 -r1.344
--- ChangeLog 8 Jan 2013 07:39:52 -0000 1.343
+++ ChangeLog 10 Jan 2013 10:53:38 -0000 1.344
@@ -1,3 +1,11 @@
+2013-01-10 Pavel Kharitonov <address@hidden>
+
+ * GNUmakefile.team (merge-file, sync-file): Propagate new
+ translations from `www' to `www-$(TEAM)'.
+ Broken since 2013-01-06.
+ (inform-$(1)): Join subsequent lines reporting against
+ the same file to avoid writing unnecessarily duplicated URLs.
+
2013-01-08 Pavel Kharitonov <address@hidden>
* GNUmakefile.team (sync-master): New variable.