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

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

trans-coord/gnun/server/gnun doc/gnun.texi conf... [sr-hr]


From: Yavor Doganov
Subject: trans-coord/gnun/server/gnun doc/gnun.texi conf... [sr-hr]
Date: Tue, 04 Aug 2009 16:48:12 +0000

CVSROOT:        /sources/trans-coord
Module name:    trans-coord
Branch:         sr-hr
Changes by:     Yavor Doganov <yavor>   09/08/04 16:48:12

Modified files:
        gnun/server/gnun/doc: gnun.texi 
        gnun/server/gnun: configure.ac NEWS Makefile.am ChangeLog 
Added files:
        gnun/server/gnun: gnun-clear-previous.in 

Log message:
        Add new script `gnun-clear-previous', for convenience.
        * gnun-clear-previous.in: New file.
        * configure.ac: Add a test for a new enough `msgattrib' program.
        (NEW_MSGATTRIB): New Automake conditional.
        * Makefile.am (bin_SCRIPTS): Add `gnun-clear-previous' guarded by
        the NEW_MSGATTRIB conditional.
        * doc/gnun.texi (gnun-clear-previous): New node.
        (Scripts): Mention that `gnun-clear-previous' is not a tool used
        internally by GNUN.
        * NEWS: Update.

CVSWeb URLs:
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.1&r2=1.9.2.2
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/configure.ac?cvsroot=trans-coord&only_with_tag=sr-hr&r1=1.16.2.4&r2=1.16.2.5
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/NEWS?cvsroot=trans-coord&only_with_tag=sr-hr&r1=1.15.2.2&r2=1.15.2.3
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/Makefile.am?cvsroot=trans-coord&only_with_tag=sr-hr&r1=1.11.2.3&r2=1.11.2.4
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/ChangeLog?cvsroot=trans-coord&only_with_tag=sr-hr&r1=1.157.2.5&r2=1.157.2.6
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/gnun-clear-previous.in?cvsroot=trans-coord&only_with_tag=sr-hr&rev=1.1.2.2

Patches:
Index: doc/gnun.texi
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/doc/gnun.texi,v
retrieving revision 1.9.2.1
retrieving revision 1.9.2.2
diff -u -b -r1.9.2.1 -r1.9.2.2
--- doc/gnun.texi       1 Aug 2009 19:05:26 -0000       1.9.2.1
+++ doc/gnun.texi       4 Aug 2009 16:48:11 -0000       1.9.2.2
@@ -1618,11 +1618,15 @@
 invoked separately, as stand-alone programs, and sometimes they are
 useful on their own.
 
+The @command{gnun-clear-previous} script is an exception---it is not
+used in @acronym{GNUN}'s rules at all.
+
 @menu
 * make-prototype::
 * gnun-validate-html::
 * mailfail::
 * validate-html-notify::
+* gnun-clear-previous::
 @end menu
 
 @node make-prototype
@@ -1786,6 +1790,33 @@
 wrapper has a specific task and cannot be used to invoke an arbitrary
 command---use @command{mailfail} for that.  @xref{mailfail}.
 
address@hidden gnun-clear-previous
address@hidden The @command{gnun-clear-previous} Script
address@hidden previous, manipulating PO files
+
+This simple script is not used internally in @acronym{GNUN}.  It is
+merely for convenience only, for those who find it hard to remember the
+various @samp{gettext} tools and their options.
+
address@hidden deletes the @dfn{previous} messages in a
+PO file, which is a good thing to do after the corresponding translation
+is updated and the @dfn{fuzzy} marker removed.  It can also be used to
+wrap long lines in PO files.
+
+Usage:
+
address@hidden
+gnun-clear-previous FILE
address@hidden example
+
address@hidden @option
address@hidden --version
+Print copyright and version information on the standard output.
+
address@hidden --help
+Print usage information on stdout.
address@hidden table
+
 @node Rules
 @section How The Recipes Work
 

Index: configure.ac
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/configure.ac,v
retrieving revision 1.16.2.4
retrieving revision 1.16.2.5
diff -u -b -r1.16.2.4 -r1.16.2.5
--- configure.ac        3 Aug 2009 16:37:07 -0000       1.16.2.4
+++ configure.ac        4 Aug 2009 16:48:12 -0000       1.16.2.5
@@ -63,6 +63,18 @@
 AS_IF([test -n "$MSGMERGE"], [decent_gettext=yes], [decent_gettext=no])
 AC_CHECK_PROGS([MSGFILTER], [msgfilter gmsgfilter])
 
+# Presumably if msgmerge supports --previous, msgattrib supports
+# --clear-previous as well, but it's safer to check anyway.
+AC_CACHE_CHECK([for msgattrib that supports --clear-previous],
+               [ac_cv_path_MSGATTRIB],
+  [AC_PATH_PROGS_FEATURE_CHECK([MSGATTRIB], [msgattrib gmsgattrib],
+    [[$ac_path_MSGATTRIB --clear-previous /dev/null 2>/dev/null \
+      && ac_cv_path_MSGATTRIB=$ac_path_MSGATTRIB]],
+      [AC_MSG_WARN([none found -- consider updating gettext])])])
+AC_SUBST([MSGATTRIB], [$ac_cv_path_MSGATTRIB])
+AS_IF([test -n "$MSGATTRIB"], [decent_msgattrib=yes], [decent_msgattrib=no])
+AM_CONDITIONAL([NEW_MSGATTRIB], [test "$decent_msgattrib" = yes])
+
 AC_PATH_PROG([GUILE], [guile])
 AS_IF([test -n "$GUILE"], [have_guile=yes], [have_guile=no])
 AM_CONDITIONAL([HAVE_GUILE], [test -n "$GUILE"])
@@ -144,6 +156,8 @@
 AS_IF([test -n "$GUILE"],
       [m4_map_args([gnun_config_exec_file],
       [make-prototype], [recode-escape], [recode-unescape])])
+AS_IF([test "$decent_msgattrib" = yes],
+      [AC_CONFIG_FILES([gnun-clear-previous], [chmod +x gnun-clear-previous])])
 AC_OUTPUT
 
 cat <<EOF
@@ -152,6 +166,7 @@
 echo "Basic make operations...                $decent_make"
 echo "PO files manipulation, make report...   $decent_gettext"
 echo "make-prototype...                       $have_guile"
+echo "gnun-clear-previous...                  $decent_msgattrib"
 echo "POT/HTML generation...                  $gnun_cv_recent_po4a"
 echo "HTML validation...                      $have_xmllint"
 echo "GRACE support...                        $decent_awk"

Index: NEWS
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/NEWS,v
retrieving revision 1.15.2.2
retrieving revision 1.15.2.3
diff -u -b -r1.15.2.2 -r1.15.2.3
--- NEWS        1 Aug 2009 21:15:03 -0000       1.15.2.2
+++ NEWS        4 Aug 2009 16:48:12 -0000       1.15.2.3
@@ -1,5 +1,13 @@
 GNUnited Nations NEWS - User visible changes.
 
+* Changes in GNUnited Nations 0.4 (2009-??-??)
+
+** New script `gnun-clear-previous'.
+   This is a simple wrapper around `msgattrib', for those who find it
+   hard to remember the correct options.  It currently deletes all
+   msgid's marked as "previous", which is usually done right after the
+   translation has been updated.
+
 * Changes in GNUnited Nations 0.3.1 (2009-08-02)
 
 ** GNUmakefile.team supports GNU Bzr repositories.

Index: Makefile.am
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/Makefile.am,v
retrieving revision 1.11.2.3
retrieving revision 1.11.2.4
diff -u -b -r1.11.2.3 -r1.11.2.4
--- Makefile.am 3 Aug 2009 16:37:07 -0000       1.11.2.3
+++ Makefile.am 4 Aug 2009 16:48:12 -0000       1.11.2.4
@@ -31,6 +31,10 @@
 bin_SCRIPTS += gnun-validate-html
 endif
 
+if NEW_MSGATTRIB
+bin_SCRIPTS += gnun-clear-previous
+endif
+ 
 noinst_SCRIPTS = stamp-config.mk
 pkglibexec_SCRIPTS = validate-html-notify
 

Index: ChangeLog
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/ChangeLog,v
retrieving revision 1.157.2.5
retrieving revision 1.157.2.6
diff -u -b -r1.157.2.5 -r1.157.2.6
--- ChangeLog   3 Aug 2009 16:37:07 -0000       1.157.2.5
+++ ChangeLog   4 Aug 2009 16:48:12 -0000       1.157.2.6
@@ -1,3 +1,16 @@
+2009-08-04  Yavor Doganov  <address@hidden>
+
+       Add new script `gnun-clear-previous', for convenience.
+       * gnun-clear-previous.in: New file.
+       * configure.ac: Add a test for a new enough `msgattrib' program.
+       (NEW_MSGATTRIB): New Automake conditional.
+       * Makefile.am (bin_SCRIPTS): Add `gnun-clear-previous' guarded by
+       the NEW_MSGATTRIB conditional.
+       * doc/gnun.texi (gnun-clear-previous): New node.
+       (Scripts): Mention that `gnun-clear-previous' is not a tool used
+       internally by GNUN.
+       * NEWS: Update.
+
 2009-08-03  Yavor Doganov  <address@hidden>
 
        Factorize homepage URL in --help output.

Index: gnun-clear-previous.in
===================================================================
RCS file: gnun-clear-previous.in
diff -N gnun-clear-previous.in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ gnun-clear-previous.in      4 Aug 2009 16:48:12 -0000       1.1.2.2
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+# Copyright (C) 2009 Free Software Foundation, Inc.
+
+# This file is part of GNUnited Nations.
+
+# GNUnited Nations is free software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+
+# GNUnited Nations is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with GNUnited Nations.  If not, see <http://www.gnu.org/licenses/>.
+
+set -e
+
+usage ()
+{
+cat <<EOF
+Usage: $0 FILE
+
+Delete the "previous" messages in the PO file FILE.
+
+Options:
+      --version              Just print version info and return
+      --help                 Print this usage information message
+
+Report bugs to @PACKAGE_BUGREPORT@
address@hidden@ home page: <@PACKAGE_URL@>
+General help using GNU software: <http://www.gnu.org/gethelp/>
+EOF
+}
+
+version ()
+{
+cat <<EOF
+$0 (@PACKAGE_NAME@) @PACKAGE_VERSION@
+Copyright (C) 2009 Free Software Foundation, Inc.
+You may redistribute copies of @PACKAGE_NAME@
+under the terms of the GNU General Public License.
+For more information about these matters, see the file named COPYING.
+EOF
+}
+
+case $1 in
+    --help)
+       usage
+       exit 0
+       ;;
+    --version)
+       version
+       exit 0
+       ;;
+esac
+
+# FIXME: Perhaps extend the script to do more useful things?
+
+case $# in
+    0)
+       echo "$0: missing arguments." 1>&2
+       echo "See \`$0 --help'." 1>&2
+       exit 1
+       ;;
+    1)
+       @MSGATTRIB@ --clear-previous --output-file $1 $1
+       exit 0
+       ;;
+    *)
+       echo "$0: too many arguments." 1>&2
+       echo "See \`$0 --help'." 1>&2
+       exit 1
+       ;;
+esac




reply via email to

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