bug-gnu-utils
[Top][All Lists]
Advanced

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

priming bison-runtime's pump


From: Paul Eggert
Subject: priming bison-runtime's pump
Date: Fri, 22 Jul 2005 11:48:43 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Bison CVS's bison-runtime directory didn't have any .po files.
Initially I thought I'd just let the translation teams fix this one by
one, but that will delay acceptance of bison-runtime.  So I installed
the following patch to generate these .po files automatically from the
old po/*.po files until the translation teams supersede this with
manual translations.

I ran into some problems with gettext while doing this, so I thought
I'd CC: this to bug-gnu-gettext.  I'll send a detailed bug report
via separate email.

2005-07-22  Paul Eggert  <address@hidden>

        * bootstrap: For translations that have not yet been upgraded to
        the new runtime-po domain, prime the pump by extracting the
        relevant strings from the obsolete translations.  This code can be
        removed once the bison-runtime domain has been translated by each
        team.

--- bootstrap.~1.22.~   2005-07-18 15:10:15.000000000 -0700
+++ bootstrap   2005-07-22 11:33:44.000000000 -0700
@@ -179,6 +179,34 @@ case $SKIP_PO in
      rm -f dummy `ls | sed -n '/\.gmo$/p; /\.po$/p'` &&
      wget -nv -nd -r -l 1 -A .po -C off \
        http://www.iro.umontreal.ca/translation/maint/$package-runtime/ &&
+
+     # For translations that have not yet been upgraded to the new
+     # runtime-po domain, prime the pump by extracting the relevant
+     # strings from the obsolete translations.
+     # This code can be removed once the bison-runtime domain
+     # has been translated by each team.
+     for po in ../po/*.po; do
+       test -f "$po" || continue
+       runpo=`basename $po`
+       test -f $runpo || {
+        msggrep -K \
+            -e 'memory exhausted' \
+            -e 'syntax error' \
+            $po 2>/dev/null |
+          sed '
+            s/^#~ //
+            /^msgid "syntax error; also memory exhausted"$/,/^$/d
+            /^$/,${ /^#/d; }
+          ' >$runpo-
+        if cmp -s $runpo- $runpo; then
+          rm $runpo-
+        else
+          mv $runpo- $runpo
+        fi
+        test -s $runpo || rm -f $runpo
+       } || exit
+     done &&
+
      ls *.po | sed 's/\.po$//' >LINGUAS
     ) || exit
   esac;;




reply via email to

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