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: Pavel Kharitonov
Subject: trans-coord/gnun/server/gnun ChangeLog GNUmakef...
Date: Tue, 08 Apr 2014 06:21:21 +0000

CVSROOT:        /sources/trans-coord
Module name:    trans-coord
Changes by:     Pavel Kharitonov <ineiev>       14/04/08 06:21:21

Modified files:
        gnun/server/gnun: ChangeLog GNUmakefile NEWS make-prototype.awk 
        gnun/server/gnun/tests: proto.html proto.proto 

Log message:
        * GNUmakefile (PO4A-XHTMLFLAGS): Declare the `<style>' element 
unwrappable.
        * make-prototype.awk: Enclose translator's notes
        in `<div class="translators-notes">' rather than in
        `<div style="font-size: small;">'; allow the `<p>' element
        preceeding translator's credits have attributes.
        * tests/proto.html:
        * tests/proto.proto:
        * NEWS: Update.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/ChangeLog?cvsroot=trans-coord&r1=1.406&r2=1.407
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/GNUmakefile?cvsroot=trans-coord&r1=1.177&r2=1.178
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/NEWS?cvsroot=trans-coord&r1=1.104&r2=1.105
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/make-prototype.awk?cvsroot=trans-coord&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/tests/proto.html?cvsroot=trans-coord&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/tests/proto.proto?cvsroot=trans-coord&r1=1.2&r2=1.3

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/ChangeLog,v
retrieving revision 1.406
retrieving revision 1.407
diff -u -b -r1.406 -r1.407
--- ChangeLog   3 Apr 2014 16:52:04 -0000       1.406
+++ ChangeLog   8 Apr 2014 06:21:20 -0000       1.407
@@ -1,3 +1,15 @@
+2014-04-08  Pavel Kharitonov  <address@hidden>
+
+       * GNUmakefile (PO4A-XHTMLFLAGS): Declare the `<style>'
+       element unwrappable.
+       * make-prototype.awk: Enclose translator's notes
+       in `<div class="translators-notes">' rather than in
+       `<div style="font-size: small;">'; allow the `<p>' element
+       preceeding translator's credits have attributes.
+       * tests/proto.html:
+       * tests/proto.proto:
+       * NEWS: Update.
+
 2014-04-03  Thérèse Godefroy <address@hidden> (tiny change)
 
        * doc/gnun.texi: Multiple minor fixes.

Index: GNUmakefile
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/GNUmakefile,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -b -r1.177 -r1.178
--- GNUmakefile 24 Jan 2014 05:44:10 -0000      1.177
+++ GNUmakefile 8 Apr 2014 06:21:20 -0000       1.178
@@ -1,5 +1,5 @@
-# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software
-#   Foundation, Inc.
+# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013,
+#    2014 Free Software Foundation, Inc.
 
 # This file is part of GNUnited Nations.
 
@@ -45,11 +45,13 @@
 PO4A-GETTEXTIZEFLAGS := -o porefs=none
 PO4A-TRANSLATEFLAGS := --keep=0
 
+# <style> shouldn't wrap because it may contain generated
+# content strings, and wrapping would make them invalid.
 PO4A-XHTMLFLAGS := --format=xhtml --master-charset=utf-8 \
                    -o ontagerror=silent \
                    -o "attributes=<meta>content" \
                    -o "untranslated=W<gnun> W<script>" \
-                   -o "translated=W<pre>"
+                   -o "translated=W<pre> W<style>"
 
 # The lower limit of the number of repeating msgids to include in compendium.
 COMMONALITY := 10

Index: NEWS
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/NEWS,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -b -r1.104 -r1.105
--- NEWS        16 Mar 2014 06:28:04 -0000      1.104
+++ NEWS        8 Apr 2014 06:21:21 -0000       1.105
@@ -2,6 +2,11 @@
 
 * Changes in GNUnited Nations 0.9 (????-??-??)
 
+** `make-prototype.awk' was modified to enclose translator's notes
+   in `<div class="translators-notes">' rather than in
+   `<div style="font-size: small;">'; the `<p>' element preceeding
+   translator's credits may have attributes.
+
 ** An initial testsuite was added.
 
 ** Command line parsers for `gnun-init-po',
@@ -19,6 +24,9 @@
 
 ** Bugs fixed in 0.9.
 
+*** In GNUmakefile, the `<style>' elements could wrap, which
+    broke long generated contents strings.
+
 *** `gnun-validate-html' didn't work with awks that don't
     recognize `\>' in their regular expressions.
 

Index: make-prototype.awk
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/make-prototype.awk,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- make-prototype.awk  8 Oct 2013 04:38:26 -0000       1.3
+++ make-prototype.awk  8 Apr 2014 06:21:21 -0000       1.4
@@ -1,6 +1,6 @@
 # make-prototype.awk: generate `prototype' HTML.
 
-# Copyright (C) 2013 Free Software Foundation, Inc.
+# Copyright (C) 2014 Free Software Foundation, Inc.
 
 # This file is part of GNUnited Nations.
 
@@ -48,13 +48,12 @@
   output = output "<gnun></gnun>"\
     "<!-- This file is automatically generated by GNUnited Nations! -->\n" \
     parts[1] \
-"\n" \
-"<div style=\"font-size: small;\">\n" \
+"<div class=\"translators-notes\">\n" \
 "<!--TRANSLATORS: Use space (SPC) as msgstr if you don't have notes.-->\n" \
 "*GNUN-SLOT: TRANSLATOR'S NOTES*</div>\n" \
     parts[2]
 
-  if(!match (parts[3], /<p>.*[$]Date:/))
+  if(!match (parts[3], /<p[^>]*>.*[$]Date:/))
     {
       print my_name \
         "no `<p>' followed by `$Date:' after `<div id=\"footer\">' found" \
@@ -63,12 +62,17 @@
     }
   tail[1] = substr (parts[3], 1, RSTART + RLENGTH - 1)
   tail[2] = substr (parts[3], RSTART + RLENGTH)
-  match (tail[1], /.*<p>/)
-  tail[2] = substr (tail[1], RSTART + RLENGTH - 3) tail[2]
-  tail[1] = substr (tail[1], 1, RSTART + RLENGTH - 1 - 3)
+  # Find the last <p> in tail[1].
+  match (tail[1], /.*<p[^>]*>/)
+  start = RSTART;
+  p = substr (tail[1], 1, RSTART + RLENGTH - 1);
+  match (p, /<p[^>]*>$/)
+  start = start + RSTART - 1;
+  # Insert translators' credits before the last <p>.
+  tail[2] = substr (tail[1], start) tail[2]
+  tail[1] = substr (tail[1], 1, start - 1)
   printf "%s", output tail[1] \
-"\n" \
 "<div class=\"translators-credits\">\n" \
 "<!--TRANSLATORS: Use space (SPC) as msgstr if you don't want credits.-->\n" \
-"*GNUN-SLOT: TRANSLATOR'S CREDITS*</div>\n\n\n " tail[2]
+"*GNUN-SLOT: TRANSLATOR'S CREDITS*</div>\n\n" tail[2]
 }

Index: tests/proto.html
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/tests/proto.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- tests/proto.html    3 Apr 2014 05:24:28 -0000       1.2
+++ tests/proto.html    8 Apr 2014 06:21:21 -0000       1.3
@@ -21,5 +21,5 @@
 </div>
 <div id="footer">
 
-<p>Updated:
+<p class="unprintable">Updated:
 $Date: 1983/09/27 12:35:59 $

Index: tests/proto.proto
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/tests/proto.proto,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- tests/proto.proto   3 Apr 2014 05:24:28 -0000       1.2
+++ tests/proto.proto   8 Apr 2014 06:21:21 -0000       1.3
@@ -19,18 +19,15 @@
 <gnun></gnun><!-- This file is automatically generated by GNUnited Nations! -->
 <title>proto</title>
 
-
-<div style="font-size: small;">
+<div class="translators-notes">
 <!--TRANSLATORS: Use space (SPC) as msgstr if you don't have notes.-->
 *GNUN-SLOT: TRANSLATOR'S NOTES*</div>
 </div>
 <div id="footer">
 
-
 <div class="translators-credits">
 <!--TRANSLATORS: Use space (SPC) as msgstr if you don't want credits.-->
 *GNUN-SLOT: TRANSLATOR'S CREDITS*</div>
 
-
- <p>Updated:
+<p class="unprintable">Updated:
 $Date: 1983/09/27 12:35:59 $



reply via email to

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