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... [sr-hr]


From: Yavor Doganov
Subject: trans-coord/gnun/server/gnun ChangeLog GNUmakef... [sr-hr]
Date: Thu, 01 Jul 2010 15:06:08 +0000

CVSROOT:        /sources/trans-coord
Module name:    trans-coord
Branch:         sr-hr
Changes by:     Yavor Doganov <yavor>   10/07/01 15:06:08

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&only_with_tag=sr-hr&r1=1.157.2.15&r2=1.157.2.16
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/GNUmakefile.team?cvsroot=trans-coord&only_with_tag=sr-hr&r1=1.6.2.3&r2=1.6.2.4
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/NEWS?cvsroot=trans-coord&only_with_tag=sr-hr&r1=1.15.2.8&r2=1.15.2.9
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/THANKS?cvsroot=trans-coord&only_with_tag=sr-hr&r1=1.2.2.1&r2=1.2.2.2
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/doc/gnun.texi?cvsroot=trans-coord&only_with_tag=sr-hr&r1=1.9.2.8&r2=1.9.2.9

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/ChangeLog,v
retrieving revision 1.157.2.15
retrieving revision 1.157.2.16
diff -u -b -r1.157.2.15 -r1.157.2.16
--- ChangeLog   16 Feb 2010 21:21:15 -0000      1.157.2.15
+++ ChangeLog   1 Jul 2010 15:06:08 -0000       1.157.2.16
@@ -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.6.2.3
retrieving revision 1.6.2.4
diff -u -b -r1.6.2.3 -r1.6.2.4
--- GNUmakefile.team    10 Jan 2010 09:08:37 -0000      1.6.2.3
+++ GNUmakefile.team    1 Jul 2010 15:06:08 -0000       1.6.2.4
@@ -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.15.2.8
retrieving revision 1.15.2.9
diff -u -b -r1.15.2.8 -r1.15.2.9
--- NEWS        10 Jan 2010 09:08:37 -0000      1.15.2.8
+++ NEWS        1 Jul 2010 15:06:08 -0000       1.15.2.9
@@ -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.2.2.1
retrieving revision 1.2.2.2
diff -u -b -r1.2.2.1 -r1.2.2.2
--- THANKS      20 Dec 2009 17:26:21 -0000      1.2.2.1
+++ THANKS      1 Jul 2010 15:06:08 -0000       1.2.2.2
@@ -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.9.2.8
retrieving revision 1.9.2.9
diff -u -b -r1.9.2.8 -r1.9.2.9
--- doc/gnun.texi       16 Feb 2010 21:21:15 -0000      1.9.2.8
+++ doc/gnun.texi       1 Jul 2010 15:06:08 -0000       1.9.2.9
@@ -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]