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: Yavor Doganov
Subject: trans-coord/gnun/server/gnun ChangeLog GNUmakef...
Date: Fri, 19 Feb 2010 15:23:56 +0000

CVSROOT:        /sources/trans-coord
Module name:    trans-coord
Changes by:     Yavor Doganov <yavor>   10/02/19 15:23:56

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

Log message:
        Implement format/publish/clean targets in GNUmakefile.team.
        * GNUmakefile.team (MSGCAT, pubwmsg): New variables.
        (format, publish, clean): New phony targets.
        * doc/gnun.texi (New Translation): Recommend rewrapping of
        comments.
        (GNUmakefile.team Variables) <Targets in GNUmakefile.team>:
        Document the new rules.
        * NEWS:
        * THANKS: Update.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/ChangeLog?cvsroot=trans-coord&r1=1.173&r2=1.174
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/GNUmakefile.team?cvsroot=trans-coord&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/NEWS?cvsroot=trans-coord&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/THANKS?cvsroot=trans-coord&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/doc/gnun.texi?cvsroot=trans-coord&r1=1.17&r2=1.18

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/ChangeLog,v
retrieving revision 1.173
retrieving revision 1.174
diff -u -b -r1.173 -r1.174
--- ChangeLog   15 Feb 2010 10:12:10 -0000      1.173
+++ ChangeLog   19 Feb 2010 15:23:55 -0000      1.174
@@ -1,3 +1,16 @@
+2010-02-18  George Zarkadas  <address@hidden>  (tiny change)
+            Yavor Doganov  <address@hidden>
+
+       Implement format/publish/clean targets in GNUmakefile.team.
+       * GNUmakefile.team (MSGCAT, pubwmsg): New variables.
+       (format, publish, clean): New phony targets.
+       * doc/gnun.texi (New Translation): Recommend rewrapping of
+       comments.
+       (GNUmakefile.team Variables) <Targets in GNUmakefile.team>:
+       Document the new rules.
+       * NEWS:
+       * THANKS: Update.
+
 2010-02-15  Yavor Doganov  <address@hidden>
 
        * doc/gnun.texi (GNUmakefile.team Variables): Fix typo introduced

Index: GNUmakefile.team
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/GNUmakefile.team,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- GNUmakefile.team    7 Jan 2010 14:43:04 -0000       1.9
+++ GNUmakefile.team    19 Feb 2010 15:23:56 -0000      1.10
@@ -43,6 +43,7 @@
 # Adjust these variables if you don't have the programs in your PATH.
 MSGMERGE := msgmerge
 MSGFMT := msgfmt
+MSGCAT := msgcat
 CVS := cvs
 SVN := svn
 BZR := bzr
@@ -52,6 +53,9 @@
 
 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"
 
 # Determine the VCS.
 REPO := $(shell (test -d CVS && echo CVS) || (test -d .svn && echo SVN) \
@@ -155,3 +159,50 @@
            | egrep '(fuzzy|untranslated)' \
              && echo "$${file#./} needs updating." || true ; \
        done
+
+# Helper target to rewrap all PO files; avoids spurious diffs when
+# they get remerged by the official build.
+.PHONY: format
+format:
+       @echo Formatting .po files with msgcat:
+       @for file in $(translations); do \
+         if [ `LC_ALL=C <$$file wc --max-line-length` -gt 80 ]; then \
+           $(MSGCAT) -o $$file $$file && echo "  $${file#./}"; \
+         fi; \
+       done
+
+# Helper target to copy all (supposedly) modified files to the `www'
+# master repository.  A warning is printed if the corresponding
+# directory in `www' cannot be found, or if the template is missing
+# (which in almost all cases means that the original article has been
+# renamed or deleted).
+.PHONY: publish
+publish: format
+       @echo Copying edited .po files back to $(wwwdir):
+       @for file in $(translations); do \
+         wwwfdir=$(wwwdir)`dirname $$file`/po; \
+         wwwfpot=$${wwwfdir}/`basename $${file/.$(TEAM).po/.pot}`; \
+         wwwfile=$${wwwfdir}/`basename $$file`; \
+         if [ ! -d $$wwwfdir ]; then \
+           printf $(pubwmsg) "$${file#./}" "directory $$wwwfdir"; \
+           continue; \
+         fi; \
+         if [ ! -f $$wwwfpot ]; then \
+           printf $(pubwmsg) "$${file#./}" "template $$wwwfpot"; \
+           continue; \
+         fi; \
+         if [ $$file -nt $$wwwfile ]; then \
+           cp $$file $$wwwfile && echo "  $${file#./}"; \
+         fi; \
+       done
+
+# Helper target to delete common auto-generated files.
+.PHONY: clean
+clean:
+       @echo -n Deleting unnecessary auto-generated files...
+       @for file in $(translations); do \
+         $(RM) $$file~; \
+         $(RM) $${file/.po/.mo}; \
+         $(RM) $$file.bak; \
+       done
+       @echo " done."

Index: NEWS
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/NEWS,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- NEWS        7 Jan 2010 14:43:04 -0000       1.24
+++ NEWS        19 Feb 2010 15:23:56 -0000      1.25
@@ -1,5 +1,10 @@
 GNUnited Nations NEWS - User visible changes.
 
+* Changes in GNUnited Nations 0.5 (2010-??-??)
+
+** New GNUmakefile.team targets: format, publish, clean.
+   Please refer to the manual for details.
+
 * Changes in GNUnited Nations 0.4 (2009-11-11)
 
 ** New script `gnun-clear-previous'.

Index: THANKS
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/THANKS,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- THANKS      17 Dec 2009 12:26:44 -0000      1.3
+++ THANKS      19 Feb 2010 15:23:56 -0000      1.4
@@ -1,15 +1,17 @@
 Several people have reported bugs and/or provided useful suggestions
 and ideas.  Many thanks for their contributions:
 
-+------------------+-----------------+
++------------------+---------------------------+
 |Ali Servet Dönmez |   address@hidden|
-+------------------+-----------------+
++------------------+---------------------------+
 |Andrea Pescetti   | address@hidden|
-+------------------+-----------------+
++------------------+---------------------------+
 |Dominik Smatana   |   address@hidden|
-+------------------+-----------------+
++------------------+---------------------------+
+|George Zarkadas   |address@hidden|
++------------------+---------------------------+
 |Hossam Hossny     |   address@hidden|
-+------------------+-----------------+
++------------------+---------------------------+
 
 Local Variables:
 mode: text

Index: doc/gnun.texi
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/doc/gnun.texi,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- doc/gnun.texi       15 Feb 2010 10:12:10 -0000      1.17
+++ doc/gnun.texi       19 Feb 2010 15:23:56 -0000      1.18
@@ -973,6 +973,11 @@
 header after entering the necessary information (this is done by
 simply pressing @key{TAB} in PO mode).
 
+It is recommended that you wrap all lines in the comments to be less
+than 80 lines; that looks better from a purely aesthetic point of view
+and improves the performance of @file{GNUmakefile.team}'s @code{publish}
+rule (@pxref{GNUmakefile.team Variables}).
+
 There are some special messages that appear in the POT and PO:
 
 @table @samp
@@ -1488,6 +1493,65 @@
 @item report
 Verifies which translations are complete, and prints a list (with
 statistics) of those that need to be updated.
+
address@hidden format
+A convenience rule to rewrap all files upto the standard length.  Most
+PO editors leave the @code{msgstr} as a single long line after it has
+been edited, but @acronym{GNUN} will automatically rewrap the file to
+the standard line length when it is processed.  Wrapping long lines in
+PO files is a good pracice as it avoids unnecessary revisions.
+
+This rule checks for all translations that have lines longer than 80,
+and runs @command{msgcat} accordingly to reformat them.  For that
+reason, it is recommended that you wrap all long lines in the comment
+fields (e.g. the file header, including the copyright statement, and any
+other comments for specific messages), because @code{make format} will
+unnecessarily invoke @command{msgcat} for any file that has a longer
+line, wherever it may occur.
+
address@hidden publish
+The @code{publish} rule's task is to copy all modified files to the
+official @dfn{www} repository.  It depends on the @code{format} target
+to ensure that all files are rewrapped to the standard line length
+limit, but deliberately does not depend on @code{sync VCS=yes}.
+Usually, one would run @code{make publish} when one or a bunch of PO
+files are in a satisfactory condition to be published, and this rule is
+just a convenience to avoid multiple manual @command{cp} invocations.
+As a rule of thumb, before running this rule it is sane to run
address@hidden and correct any @dfn{fuzzy} messages and other problems, if
+necessary.
+
+The @code{publish} rule does not depend on @code{sync} explicitly,
+because that would be a nuisance for offline operations and basically
+unnecessary when the committer is fairly confident that there are no
+changes to (re-)merge.  A hard dependency on @code{sync} would slow down
+the operation considerably.
+
+As usual, when committing to the official repository, it is always a
+good practice to examine the output of @command{cvs diff}.
+
+Invoking @code{make publish} prints warnings and does not actually copy
+the affected file if the sub-directory in ``www'' is non-existent or the
+corresponding @file{.pot} is missing.
+
+Typically, after an editing session (whether it involves actual editing
+or just merging contributions from team members), one would do:
+
address@hidden
+$ make sync VCS=yes
+$ make publish
+$ cd @var{wwwdir}
+$ cvs up
+(Add all new translations, if any.)
+  $ cvs add @var{file} @dots{}
+$ cvs diff
+$ cvs commit -m "Some descriptive message."
address@hidden example
+
address@hidden clean
+Deletes all backup and auto-generated files that some PO editors leave
+behind, address@hidden@var{file}.po~}, @address@hidden and
address@hidden@var{file}.mo}.
 @end table
 
 @code{make VCS=yes} is the recommended command to be run periodically.




reply via email to

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