trans-coord-devel
[Top][All Lists]
Advanced

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

trans-coord/gnun/server/gnun ChangeLog GNUmakef...


From: Pavel Kharitonov
Subject: trans-coord/gnun/server/gnun ChangeLog GNUmakef...
Date: Fri, 04 Jan 2013 09:08:47 +0000

CVSROOT:        /sources/trans-coord
Module name:    trans-coord
Changes by:     Pavel Kharitonov <ineiev>       13/01/04 09:08:47

Modified files:
        gnun/server/gnun: ChangeLog GNUmakefile.team NEWS 
        gnun/server/gnun/doc: gnun.texi 

Log message:
        * GNUmakefile.team (pubwmsg): Minor reformatting.
        (cmp-POs): Take into account the case when the only
        different lines are those containing `fuzzy' flag.
        (pots): Add $(template-pots).
        (sync-file, html-only, report-pos, publish-file):
        Take into account optional templates.
        (publish-file): Fix the function.  Reported by Denis
        Barbier.
        (sync-file): New email-aliases flag, `force'.
        * doc/gnun.texi (GNUmakefile.team Targets):
        * NEWS: Update.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/ChangeLog?cvsroot=trans-coord&r1=1.340&r2=1.341
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/GNUmakefile.team?cvsroot=trans-coord&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/NEWS?cvsroot=trans-coord&r1=1.80&r2=1.81
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/doc/gnun.texi?cvsroot=trans-coord&r1=1.80&r2=1.81

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/ChangeLog,v
retrieving revision 1.340
retrieving revision 1.341
diff -u -b -r1.340 -r1.341
--- ChangeLog   3 Jan 2013 14:59:28 -0000       1.340
+++ ChangeLog   4 Jan 2013 09:08:47 -0000       1.341
@@ -1,3 +1,17 @@
+2013-01-04  Pavel Kharitonov  <address@hidden>
+
+       * GNUmakefile.team (pubwmsg): Minor reformatting.
+       (cmp-POs): Take into account the case when the only
+       different lines are those containing `fuzzy' flag.
+       (pots): Add $(template-pots).
+       (sync-file, html-only, report-pos, publish-file):
+       Take into account optional templates.
+       (publish-file): Fix the function.  Reported by Denis
+       Barbier.
+       (sync-file): New email-aliases flag, `force'.
+       * doc/gnun.texi (GNUmakefile.team Targets):
+       * NEWS: Update.
+
 2013-01-03  Pavel Kharitonov  <address@hidden>
 
        * gnun-diff.po.in: Fix the previous commit (reported

Index: GNUmakefile.team
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/GNUmakefile.team,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- GNUmakefile.team    17 Dec 2012 08:46:19 -0000      1.25
+++ GNUmakefile.team    4 Jan 2013 09:08:47 -0000       1.26
@@ -112,8 +112,8 @@
 translations := $(shell find . -name '*.$(TEAM).po' | sort)
 log := "Automatic merge from the master repository."
 # Warning message for the `publish' rule.
-pubwmsg := "Warning (%s): %s\n  does not exist; (either obsolete or \`cvs\
-update\' in $(wwwdir) needed).\n"
+pubwmsg := "Warning (%s): \`%s\' does not exist\
+\n    (either obsolete or \`cvsupdate\' in $(wwwdir) needed).\n"
 
 # Determine the VCS.
 REPO := $(shell (test -d CVS && echo CVS) || (test -d .svn && echo SVN) \
@@ -211,21 +211,29 @@
 endif
 endif
 
+# The command to compare PO files; comments and dates are generally
+# considered insignificant.  The msgfmt output is compared
+# in order to take into account the case when they only differ
+# by the `fuzzy' flags (present in one file, cleared in the other).
 define cmp-POs
 diff -q -I "^$$" -I "^#" -I '^"POT-Creation-Date:' \
-  -I '^"PO-Revision-Date:' -I '^"Outdated-Since:' &>/dev/null
+  -I '^"PO-Revision-Date:' -I '^"Outdated-Since:' &>/dev/null $1 $2 \
+  && test "x`$(MSGFMT) -o /dev/null --statistics $1 2>&1`" \
+     = "x`$(MSGFMT) -o /dev/null --statistics $2 2>&1`"
 endef
 
 define sync-file
 .PNONY: sync-$(1)
 sync-$(1):
-       @file=$(1); if [ ! -f $(wwwdir)`dirname $1`/po/`basename \
-           $$$${file/.$(TEAM).po/.pot}` ]; then \
+       @file=$(1); \
+         pot=$(wwwdir)`dirname $1`/po/`basename $$$${file%.$(TEAM).po}.pot`; \
+         test -f $$$$pot || pot=$$$$pot.opt; \
+         if test ! -f $$$$pot; then \
            echo "Warning: $$$${file#./} has no equivalent .pot in www."; \
          else \
            www_po=$(wwwdir)`dirname $1`/po/`basename $1`; \
            if test -f $$$${www_po}; then \
-             $$(cmp-POs) $1 $$$${www_po} \
+             $$(call cmp-POs,$1,$$$${www_po}) \
                && echo "$$$${file#./}: Already in sync." \
                || { \
                     echo -n "$$$${file#./}: Merging"; \
@@ -236,13 +244,13 @@
                        $(1)-tmp.www.po $(1)-tmp.po 2>&1 \
                     | $(MSGCAT) --use-first --less-than=2 -o $(1) - $(1); \
                     $(MSGMERGE) $(MSGMERGEFLAGS) $(MSGMERGEVERBOSE) -C 
$$$${www_po} \
-                      --update $1 $$$${www_po%.$(TEAM).po}.pot 2>&1; \
+                      --update $1 $$$$pot 2>&1; \
                     $(RM) $(1)-tmp.www.po $(1)-tmp.po; \
                   } \
            else \
              echo -n "$$$${file#./}: Merging new translation"; \
              $(MSGMERGE) $(MSGMERGEFLAGS) $(MSGMERGEVERBOSE) \
-                --update $1 $$$${www_po%.$(TEAM).po}.pot 2>&1; \
+                --update $1 $$$$pot 2>&1; \
            fi; \
            $(if $(ADD_FUZZY_DIFF), $(ADD_FUZZY_DIFF) $1 > $1.tmp \
                 && cmp -s $1 $1.tmp || cp $1.tmp $1; $(RM) $1.tmp;) \
@@ -294,15 +302,15 @@
 root-articles := $(foreach root-article,$(ROOT), \
                   $(addprefix $(wwwdir)po/,$(root-article)))
 root-articles-pot := $(root-articles:%=%.pot)
-pots := $(articles-pot) $(root-articles-pot)
+pots := $(articles-pot) $(root-articles-pot) $(template-pots)
 endif # ! eq (,$(ALL_DIRS))
 
 # Team's translations that lack PO file.
 html-only := $(shell echo $(pots) | sed 's/ /\n/g' \
   | while read pot; do \
-      po=$${pot%pot}$(TEAM).po; \
+      po=$${pot%.opt}; po=$${po%pot}$(TEAM).po; \
       team_po=`echo $$po | sed 's,/po/,/,; s,^$(wwwdir),./,'`; \
-      html=$${pot%pot}$(TEAM).html; html=$${html/\/po\//\/}; \
+      html=$${po%po}html; html=$${html/\/po\//\/}; \
       if ! test -f $$po && ! test -f $$team_po && test -f $$html; then \
         echo $${team_po}; \
       fi; \
@@ -312,9 +320,9 @@
 # Team's translations that lack PO file.
 www-only := $(shell echo $(pots) | sed 's/ /\n/g' \
   | while read pot; do \
-      po=$${pot%pot}$(TEAM).po; \
+      po=$${pot%.opt}; po=$${po%pot}$(TEAM).po; \
       team_po=`echo $$po | sed 's,/po/,/,; s,^$(wwwdir),./,'`; \
-      html=$${pot%pot}$(TEAM).html; html=$${html/\/po\//\/}; \
+      html=$${po%po}html; html=$${html/\/po\//\/}; \
       if test -f $$po && ! test -f $$team_po; then \
         echo $${team_po}; \
       fi; \
@@ -333,12 +341,13 @@
         echo "$${file#./}:" $$statistics; \
       fi; \
       www_po=$(wwwdir)`dirname $$file`/po/`basename $$file`; \
-      if ! test -f $${www_po%.$(TEAM).po}.pot; then \
+      pot=$${www_po%.$(TEAM).po}.pot; test -f $$pot || pot=$$pot.opt; \
+      if ! test -f $$pot; then \
         echo "$${file#./}: no POT in \`www'."; \
        continue; \
       fi; \
       if test -f $$www_po; then \
-       if $(cmp-POs) $$www_po $$file; then \
+       if $(call cmp-POs,$$www_po,$$file); then \
          $(RM) $$file-diff.html; \
        else \
           www_statistics=`LC_ALL=C $(MSGFMT) --statistics -o /dev/null \
@@ -347,11 +356,11 @@
           case "@address@hidden@" in \
            @?*@@ $(paren) \
               echo \
-       "$${file#./}: the team version seems ready to post."; \
+"$${file#./}: the team version seems ready to post."; \
               ;; \
            * $(paren) \
               echo \
-       "$${file#./}: www and team revisions are not consistent."; \
+"$${file#./}: \`www' and \`www-$(TEAM)' revisions are not consistent."; \
               ;; \
           esac; \
          $(if $(DIFF_PO), $(DIFF_PO) \
@@ -421,17 +430,16 @@
 .PNONY: publish-$(1)
 publish-$(1):
        @file=$(1); wwwfdir=$(wwwdir)`dirname $$$$file`/po; \
-         wwwfpot=$$$${wwwfdir}/`basename $$$${file/.$(TEAM).po/.pot}`; \
+         pot=$$$${wwwfdir}/`basename $$$${file/.$(TEAM).po/.pot}.opt`; \
+         test -f $$$$pot || pot=$$$${pot%.opt}; \
          wwwfile=$$$${wwwfdir}/`basename $$$$file`; \
          if [ ! -d $$$$wwwfdir ]; then \
-           printf $(pubwmsg) "$$$${file#./}" \
-"skipped (no $$$$wwwfdir directory)"; \
-           continue; \
+           printf $(pubwmsg) "$$$${file#./}" "$$$$wwwfdir/"; \
+           exit 0; \
          fi; \
-         if [ ! -f $$$$wwwfpot ]; then \
-           printf $(pubwmsg) "$$$${file#./}" \
-"template $$$$wwwfpot skipped (no such file)"; \
-           continue; \
+         if [ ! -f $$$$pot ]; then \
+           printf $(pubwmsg) "$$$${file#./}" "$$$$pot"; \
+           exit 0; \
          fi; \
          if [ $$$$file -nt $$$$wwwfile ]; then \
            cp $$$$file $$$$wwwfile && echo "  $$$${file#./} published."; \
@@ -542,8 +550,9 @@
 # when $(1).note is updated (that is, the timestamp is absent)
 # or when the period has passed.  When sending, update
 # the timestamp in $(1).note.
-# URLs of the PO files to the report are added for convenience because
-# the notification is emailed.
+# The URLs of are added to the report for convenience because
+# the notification is emailed (they would be pointless if it were
+# displayed locally, therefore the files were readily available).
 inform-$(1): $(1).note
 ifneq (,$(HAVE-EMAIL-ALIASES))
        @$(parse-email-aliases); \
@@ -553,13 +562,22 @@
   test "x$$$$email" != x \
     || { echo "Note: no email for \`$1' found in email-aliases."; exit 0; }; \
   period=$$$$(($$$$period*24*3600)); notify=yes; \
+  case ",$$$$flags," in \
+    *,force,* ) ;; \
+    * ) \
+      grep -q : $(1).note &>/dev/null || notify=no; \
+      ;; \
+  esac; \
+  case $$$$notify in \
+    yes ) \
   timestamp=`head -n1 $(1).note | grep '^#'`; \
   if test "x$$$$timestamp" != x; then \
     if test $$$$((`date +%s` - $$$${timestamp#?})) -lt $$$$period; then \
       notify=no; \
     fi; \
   fi; \
-  grep -q : $(1).note &>/dev/null || notify=no; \
+      ;; \
+  esac; \
   if test $$$$notify = yes; then \
     echo "Sending notification for \`$1' ($$$$email)..."; \
     case ",$$$$flags," in \

Index: NEWS
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/NEWS,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -b -r1.80 -r1.81
--- NEWS        30 Dec 2012 08:26:58 -0000      1.80
+++ NEWS        4 Jan 2013 09:08:47 -0000       1.81
@@ -7,6 +7,11 @@
 *** `gnun-diff-po' didn't highlight the differences in the messages
     whose whole translations were removed or added.
 
+*** The `publish' target in GNUmakefile.team was broken.
+
+*** The optional templates were not taken into account
+    in GNUmakefile.team.
+
 * Changes in GNUnited Nations 0.7 (2012-12-27)
 
 ** GNUmakefile.team enhancements:

Index: doc/gnun.texi
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/doc/gnun.texi,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -b -r1.80 -r1.81
--- doc/gnun.texi       26 Dec 2012 14:57:09 -0000      1.80
+++ doc/gnun.texi       4 Jan 2013 09:08:47 -0000       1.81
@@ -15,8 +15,8 @@
 @value{VERSION}), a suite for maintaining translations of www.gnu.org
 essays and other address@hidden
 @sp 1
-Copyright @copyright{} 2008, 2009, 2010, 2011, 2012 Free Software
-Foundation, Inc.
+Copyright @copyright{} 2008, 2009, 2010, 2011, 2012, 2013 Free
+Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -1744,7 +1744,8 @@
 period the message is sent again even though its contents don't
 change.  Otherwise, the @code{notify} target only sends messages when
 something changes.  Naturally, no message is sent when no action
-is needed in the requested set of translations.
+is needed in the requested set of translations (unless the
address@hidden option is used).
 
 The team-wide default period is defined in its GNUmakefile.team using
 the @code{NOTIFICATION_PERIOD} variable.
@@ -1753,6 +1754,9 @@
 Currently recognized options are:
 
 @table @code
address@hidden force
+Forces sending messages even when there are no files to work on.
+
 @item no-diffs
 Disables sending @dfn{www} vs. @address@hidden differences
 as attachments.



reply via email to

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