[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
trans-coord/gnun/server/gnun GNUmakefile.team N...
From: |
Pavel Kharitonov |
Subject: |
trans-coord/gnun/server/gnun GNUmakefile.team N... |
Date: |
Sun, 09 Dec 2012 12:21:18 +0000 |
CVSROOT: /sources/trans-coord
Module name: trans-coord
Changes by: Pavel Kharitonov <ineiev> 12/12/09 12:21:18
Modified files:
gnun/server/gnun: GNUmakefile.team NEWS ChangeLog
gnun/server/gnun/doc: gnun.texi
Log message:
* GNUmakefile.team (ADD_FUZZY_DIFF): New variable.
(cmp-POs): New function.
(sync-file) <sync-$(1)>: Use `cmp-POs'; process the merged
file with `ADD_FUZZY_DIFF' when available.
* doc/gnun.texi (GNUmakefile.team Variables):
* NEWS: Update.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/GNUmakefile.team?cvsroot=trans-coord&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/NEWS?cvsroot=trans-coord&r1=1.73&r2=1.74
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/ChangeLog?cvsroot=trans-coord&r1=1.314&r2=1.315
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/doc/gnun.texi?cvsroot=trans-coord&r1=1.69&r2=1.70
Patches:
Index: GNUmakefile.team
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/GNUmakefile.team,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- GNUmakefile.team 7 Dec 2012 07:58:31 -0000 1.20
+++ GNUmakefile.team 9 Dec 2012 12:21:18 -0000 1.21
@@ -56,6 +56,12 @@
HG := hg
# Baz can be used alternatively; its commands are compatible.
TLA := tla
+# The program to add differences against previous msgids
+# to fuzzy translations (and remove those differences from up-to-date
+# translations).
+ifndef ADD_FUZZY_DIFF
+ADD_FUZZY_DIFF := $(shell which gnun-add-fuzzy-diff)
+endif
translations := $(shell find . -name '*.$(TEAM).po' | sort)
log := "Automatic merge from the master repository."
@@ -159,6 +165,11 @@
endif
endif
+define cmp-POs
+diff -q -I "^$$" -I "^#" -I '^"POT-Creation-Date:' \
+ -I '^"PO-Revision-Date:' -I '^"Outdated-Since:' &>/dev/null
+endef
+
define sync-file
.PNONY: sync-$(1)
sync-$(1):
@@ -168,8 +179,7 @@
else \
www_po=$(wwwdir)`dirname $1`/po/`basename $1`; \
if test -f $$$${www_po}; then \
- diff -q -I "^$$$$" -I "^#" -I '^"POT-Creation-Date:' \
- -I '^"PO-Revision-Date:' $1 $$$${www_po} &>/dev/null \
+ $$(cmp-POs) $1 $$$${www_po} \
&& echo "$$$${file#./}: Already in sync." \
|| { \
echo -n "$$$${file#./}: Merging"; \
@@ -181,6 +191,7 @@
| $(MSGCAT) --use-first --less-than=2 -o $(1) - $(1); \
$(MSGMERGE) $(MSGMERGEFLAGS) $(MSGMERGEVERBOSE) -C
$$$${www_po} \
--update $1 $$$${www_po%.$(TEAM).po}.pot 2>&1; \
+ $(if $(ADD_FUZZY_DIFF), $(ADD_FUZZY_DIFF) -i $1;) \
echo " " `$(MSGFMT) -o /dev/null --statistics $1 2>&1`; \
$(RM) $(1)-tmp.www.po $(1)-tmp.po; \
} \
@@ -188,6 +199,7 @@
echo -n "$$$${file#./}: Merging new translation"; \
$(MSGMERGE) $(MSGMERGEFLAGS) $(MSGMERGEVERBOSE) \
--update $1 $$$${www_po%.$(TEAM).po}.pot 2>&1; \
+ $(if $(ADD_FUZZY_DIFF), $(ADD_FUZZY_DIFF) -i $1;) \
echo " " `$(MSGFMT) -o /dev/null --statistics $1 2>&1`; \
fi; \
fi
Index: NEWS
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/NEWS,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -b -r1.73 -r1.74
--- NEWS 7 Dec 2012 13:25:57 -0000 1.73
+++ NEWS 9 Dec 2012 12:21:18 -0000 1.74
@@ -2,6 +2,9 @@
* Changes in GNUnited Nations 0.7 (????-??-??)
+** `gnun-add-fuzzy-diff' is used in GNUmakefile.team when available
+ unless it is disabled.
+
** VALIDATE=yes is assumed by default in GNUmakefile. See
http://gnu.org/s/trans-coord/manual/gnun/html_node/Runtime-Variables.html
Index: ChangeLog
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/ChangeLog,v
retrieving revision 1.314
retrieving revision 1.315
diff -u -b -r1.314 -r1.315
--- ChangeLog 7 Dec 2012 13:26:01 -0000 1.314
+++ ChangeLog 9 Dec 2012 12:21:18 -0000 1.315
@@ -1,3 +1,12 @@
+2012-12-09 Pavel Kharitonov <address@hidden>
+
+ * GNUmakefile.team (ADD_FUZZY_DIFF): New variable.
+ (cmp-POs): New function.
+ (sync-file) <sync-$(1)>: Use `cmp-POs'; process the merged
+ file with `ADD_FUZZY_DIFF' when available.
+ * doc/gnun.texi (GNUmakefile.team Variables):
+ * NEWS: Update.
+
2012-12-07 Pavel Kharitonov <address@hidden>
* GNUmakefile (VALIDATE):
Index: doc/gnun.texi
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/doc/gnun.texi,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -b -r1.69 -r1.70
--- doc/gnun.texi 7 Dec 2012 16:39:28 -0000 1.69
+++ doc/gnun.texi 9 Dec 2012 12:21:18 -0000 1.70
@@ -1658,6 +1658,7 @@
@table @samp
@item TEAM
Set this to the language code, like @code{bg} or @code{pt-br}.
+It is autodetected if not defined.
@item wwwdir
The relative or absolute path to the working copy of the master `www'
@@ -1677,6 +1678,14 @@
of the build process.
@table @samp
address@hidden ADD_FUZZY_DIFF
+The program to manage differences to previous @code{msgid}s added to
+``fuzzy'' translations when merging PO files. When undefined,
+the makefile tries to find @command{gnun-add-fuzzy-diff} and assigns
+the result to this variable. @xref{gnun-add-fuzzy-diff}.
+
+Define to empty string to disable the feature.
+
@item VERBOSE=yes
Print more information from @command{cvs}, @command{svn} and
@command{msgmerge}; off by default. Note that @code{VERBOSE} can be
- trans-coord/gnun/server/gnun GNUmakefile.team N...,
Pavel Kharitonov <=