validator/share/templates/en_US invalid.tmpl,1.13,1.14 table.tmpl,1.24,1.25 valid.tmpl,1.17,1.18 xml_output.tmpl,1.2,1.3

Update of /sources/public/validator/share/templates/en_US
In directory hutz:/tmp/cvs-serv21353/share/templates/en_US

Modified Files:
	invalid.tmpl table.tmpl valid.tmpl xml_output.tmpl 
Log Message:
Adding a bit of complexity to the code for the sake of localization.
Instead of having messages like "no error" or "1 error" or "2 error" 
directly created in the check script, the script will instead pass 
parameters to the templates stating whether there is 0, 1, 2 or more
error(s) (and warnings alike).

This should keep translation work away from check - we want it contained 
in documentation and templates.



Index: valid.tmpl
===================================================================
RCS file: /sources/public/validator/share/templates/en_US/valid.tmpl,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- valid.tmpl	20 Feb 2007 02:14:48 -0000	1.17
+++ valid.tmpl	1 Mar 2007 02:52:56 -0000	1.18
@@ -5,7 +5,8 @@
         </TMPL_IF>
 
 <TMPL_IF NAME="has_errors">
-<h3 id="warning_loop">Validation Output<TMPL_IF NAME="number_of_warnings">: <TMPL_VAR NAME="number_of_warnings" ESCAPE="HTML"></TMPL_IF></h3>
+<h3 id="warning_loop">Validation Output<TMPL_IF NAME="number_of_warnings_is_1">: 1 Warning</TMPL_IF><TMPL_IF NAME="number_of_warnings_is_plural">: <TMPL_VAR NAME="valid_warnings_num" ESCAPE="HTML"> Warnings</TMPL_IF>
+        </h3>
     <p>
       Below is a list of the warning message(s) produced when validating your document.
     </p>

Index: invalid.tmpl
===================================================================
RCS file: /sources/public/validator/share/templates/en_US/invalid.tmpl,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- invalid.tmpl	20 Feb 2007 02:14:48 -0000	1.13
+++ invalid.tmpl	1 Mar 2007 02:52:56 -0000	1.14
@@ -8,7 +8,12 @@
 
 <div id="result">
 
-<h3>Validation Output<TMPL_IF NAME="number_of_errors">: <TMPL_VAR NAME="number_of_errors" ESCAPE="HTML"></TMPL_IF></h3>
+<h3>Validation Output:
+        <!-- this case where validation fails but no error is listed should never happen -->
+        <TMPL_IF NAME="number_of_errors_is_0">Invalid </TMPL_IF>
+        <TMPL_IF NAME="number_of_errors_is_1">1 Error</TMPL_IF>
+        <TMPL_IF NAME="number_of_errors_is_plural"><TMPL_VAR NAME="valid_errors_num" ESCAPE="HTML"> Errors</TMPL_IF>
+        </h3>
 
 <TMPL_IF NAME="opt_group_errors">
     <TMPL_INCLUDE NAME="error_loop_grouped.tmpl">

Index: table.tmpl
===================================================================
RCS file: /sources/public/validator/share/templates/en_US/table.tmpl,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- table.tmpl	20 Feb 2007 07:12:54 -0000	1.24
+++ table.tmpl	1 Mar 2007 02:52:56 -0000	1.25
@@ -24,7 +24,8 @@
       </TMPL_IF>
     <TMPL_ELSE>
     <td colspan="2" class="invalid">
-      Failed validation<TMPL_IF NAME="number_of_errors">, <TMPL_VAR NAME="number_of_errors" ESCAPE="HTML"></TMPL_IF>
+      Failed validation<TMPL_IF NAME="number_of_errors_is_1">, 1 Error</TMPL_IF><TMPL_IF NAME="number_of_errors_is_plural">, <TMPL_VAR NAME="valid_errors_num" ESCAPE="HTML"> Errors</TMPL_IF>
+     <!-- this case where validation fails but no error is listed should never happen -->   
     </TMPL_IF>
     </td>
     </tr>

Index: xml_output.tmpl
===================================================================
RCS file: /sources/public/validator/share/templates/en_US/xml_output.tmpl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- xml_output.tmpl	2 Nov 2006 03:16:57 -0000	1.2
+++ xml_output.tmpl	1 Mar 2007 02:52:56 -0000	1.3
@@ -50,7 +50,7 @@
     <size><TMPL_VAR NAME="file_size" ESCAPE="HTML"></size>
     <encoding><TMPL_VAR NAME="file_charset" ESCAPE="HTML"></encoding>
     <doctype><TMPL_VAR NAME="file_doctype" ESCAPE="HTML"></doctype>
-    <errors><TMPL_VAR NAME="number_of_errors" ESCAPE="HTML"></errors>
+    <errors><TMPL_VAR NAME="valid_errors_num" ESCAPE="HTML"></errors>
   </meta>
 
   <warnings>

Received on Thursday, 1 March 2007 02:53:08 UTC