[MKDoc-commit] Various i18n related updates

chris at mkdoc.demon.co.uk chris at mkdoc.demon.co.uk
Wed Apr 6 15:48:43 BST 2005


Log Message:
-----------
Various i18n related updates

Modified Files:
--------------
    mkd/resources/templates/component/file:
        en.html
    mkd/resources/templates/component/headlines:
        en.html
    mkd/resources/templates/component/image:
        en.html
    mkd/resources/templates/component/link:
        en.html
    mkd/resources/templates/component/photo:
        en.html
    mkd/resources/templates/component/rss/bulleted_list:
        en.html
    mkd/resources/templates/component/rss/definition_list:
        en.html
    mkd/resources/templates/component/rss/invisible:
        en.html

-------------- next part --------------
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/resources/templates/component/file/en.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lresources/templates/component/file/en.html -Lresources/templates/component/file/en.html -u -r1.6 -r1.7
--- resources/templates/component/file/en.html
+++ resources/templates/component/file/en.html
@@ -5,7 +5,7 @@
 
   This template is used for rendering file components in documents. 
 
-  It will only display is the file name doesn't match one oif the 
+  It will only display is the file name doesn't match one of the 
   special file names that are set not to display, these are:
 
   - style.css this is for user uploaded CSS
@@ -45,12 +45,14 @@
 
 ?-->
 <div 
-  petal:condition="false: self/name_is --style.css;
+  class="component-file"
+  xmlns:petal="http://purl.org/petal/1.0/"
+  petal:condition="true: self/title;
+                   true: self/uri;
+                   false: self/name_is --style.css;
                    false: self/name_is --favicon.ico;
                    false: self/name_is --logo.png;
                    false: self/name_is --script.js"
-  xmlns:petal="http://purl.org/petal/1.0/"
-  class="component-file"
 >
   <p 
     class="file-ext"
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/resources/templates/component/headlines/en.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lresources/templates/component/headlines/en.html -Lresources/templates/component/headlines/en.html -u -r1.4 -r1.5
--- resources/templates/component/headlines/en.html
+++ resources/templates/component/headlines/en.html
@@ -39,6 +39,7 @@
   class="headlines"
   xmlns:petal="http://purl.org/petal/1.0/"
   xmlns:i18n="http://xml.zope.org/namespaces/i18n"
+  i18n:domain="mkdoc"
 >
   <!--? The following is for people accessing the site with a username ?-->
   <div 
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/resources/templates/component/image/en.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lresources/templates/component/image/en.html -Lresources/templates/component/image/en.html -u -r1.2 -r1.3
--- resources/templates/component/image/en.html
+++ resources/templates/component/image/en.html
@@ -32,7 +32,8 @@
 <span
   class="image"
   xmlns:petal="http://purl.org/petal/1.0/"
-  petal:condition="self/title"
+  petal:condition="true: self/title;
+                   true: self/uri"
 >
   <a 
     href="#"
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/resources/templates/component/link/en.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lresources/templates/component/link/en.html -Lresources/templates/component/link/en.html -u -r1.2 -r1.3
--- resources/templates/component/link/en.html
+++ resources/templates/component/link/en.html
@@ -30,7 +30,10 @@
 
 ?-->
 <dl 
+  class="link"
   xmlns:petal="http://purl.org/petal/1.0/"
+  petal:condition="true: self/title;
+                   true: self/url"
 >
   <dt>
     <a 
@@ -42,7 +45,8 @@
 
   <dd 
     petal:content="self/description"
+    petal:condition="true: self/description"
   >
     This is a really cool link. You should check it out.
   </dd>
-</dl>
+</dl
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/resources/templates/component/photo/en.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lresources/templates/component/photo/en.html -Lresources/templates/component/photo/en.html -u -r1.2 -r1.3
--- resources/templates/component/photo/en.html
+++ resources/templates/component/photo/en.html
@@ -30,14 +30,14 @@
 ?-->
 <span
   class="photo"
-  petal:condition="true: self/image"
   xmlns:petal="http://purl.org/petal/1.0/"
+  petal:condition="true: self/image"
 >
   <a 
     href="#"
     title="Photo Title"
     petal:attributes="href  self/uri_html; 
-                      title self/title"
+                      title self/description"
   ><img
      src="#"
      alt="my beautiful image"
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/resources/templates/component/rss/bulleted_list/en.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lresources/templates/component/rss/bulleted_list/en.html -Lresources/templates/component/rss/bulleted_list/en.html -u -r1.1 -r1.2
--- resources/templates/component/rss/bulleted_list/en.html
+++ resources/templates/component/rss/bulleted_list/en.html
@@ -1,42 +1,76 @@
 <!--?
 
+  RSS Bulleted List Template
+  ==========================
+
+  This template is used for rendering the RSS component as an 
+  unordered list in documents. 
+
+  $Id$
+
+
+  Author: Jean-Michel Hiver, Chris Croome <chris at webarchitects.co.uk>, and others
+  Copyright: (c) 2004-2005, MKDoc Ltd.
+
+  This file is part of MKDoc. 
+  
+  MKDoc 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 2 of the License, or
+  (at your option) any later version.
+  
+  MKDoc 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 MKDoc; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-This template is used for rendering the RSS component in documents. 
   
 ?-->
 <div 
   class="rss"
   xmlns:petal="http://purl.org/petal/1.0/"
+  xmlns:i18n="http://xml.zope.org/namespaces/i18n"
+  i18n:domain="mkdoc"
 >
   <h2 
     petal:content="self/title"
   >foobaz</h2>
   <p 
-    petal:condition="true:self/is_5xx; true:self/user; true:self/user/is_editor"
+    class="error"
+    i18n:translate="rss-not-feteched-yet"
+    petal:condition="true: self/is_5xx" 
+  >
+    The RSS feed hasn't been fetched yet.
+  </p>
+  <p 
+    class="error"
+    i18n:translate="rss-not-found"
+    petal:condition="true: self/is_4xx" 
   >
-    <strong>
-      There is an RSS component which should go there, but it will not be displayed
-      because the RSS feed hasn't been fetched yet.
-    </strong>
+    The RSS feed was not found.
   </p>
   <p 
-    petal:condition="true:self/is_4xx; true:self/user; true:self/user/is_editor"
+    class="error"
+    i18n:translate="rss-contains-no-items"
+    petal:condition="false: self/items" 
   >
-    <strong>
-      There is an RSS component which should go there, but it will not be displayed
-      because the RSS feed which was specified was not found.
-    </strong>
+    The RSS feed was not found.
   </p>
-  <div>
-    <ul 
-      petal:define="items self/items"
-      petal:condition="true:items"
-    >
+  <div
+    petal:define="items self/items"
+    petal:condition="true: self/items"
+  >
+    <ul>
       <li 
         petal:repeat="item items">
         <a 
           href="#" 
-          petal:attributes="href item/uri; title item/description" 
+          petal:attributes="href item/uri; 
+                            title item/description" 
           petal:content="item/title"
         >foo</a>
       </li>
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/resources/templates/component/rss/definition_list/en.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lresources/templates/component/rss/definition_list/en.html -Lresources/templates/component/rss/definition_list/en.html -u -r1.1 -r1.2
--- resources/templates/component/rss/definition_list/en.html
+++ resources/templates/component/rss/definition_list/en.html
@@ -1,48 +1,85 @@
 <!--?
 
+  RSS Definition List Template
+  ============================
+
+  This template is used for rendering the RSS component as an 
+  definition list in documents. 
+
+  $Id$
+
+
+  Author: Jean-Michel Hiver, Chris Croome <chris at webarchitects.co.uk>, and others
+  Copyright: (c) 2004-2005, MKDoc Ltd.
+
+  This file is part of MKDoc. 
+  
+  MKDoc 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 2 of the License, or
+  (at your option) any later version.
+  
+  MKDoc 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 MKDoc; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-This template is used for rendering the RSS component in documents. 
   
 ?-->
 <div 
   class="rss"
   xmlns:petal="http://purl.org/petal/1.0/"
+  xmlns:i18n="http://xml.zope.org/namespaces/i18n"
+  i18n:domain="mkdoc"
 >
   <h2 
     petal:content="self/title"
   >foobaz</h2>
   <p 
-    petal:condition="true:self/is_5xx; true:self/user; true:self/user/is_editor"
+    class="error"
+    i18n:translate="rss-not-feteched-yet"
+    petal:condition="true: self/is_5xx" 
+  >
+    The RSS feed hasn't been fetched yet.
+  </p>
+  <p 
+    class="error"
+    i18n:translate="rss-not-found"
+    petal:condition="true: self/is_4xx" 
   >
-    <strong>
-      There is an RSS component which should go there, but it will not be displayed
-      because the RSS feed hasn't been fetched yet.
-    </strong>
+    The RSS feed was not found.
   </p>
   <p 
-    petal:condition="true:self/is_4xx; true:self/user; true:self/user/is_editor"
+    class="error"
+    i18n:translate="rss-contains-no-items"
+    petal:condition="false: self/items" 
   >
-    <strong>
-      There is an RSS component which should go there, but it will not be displayed
-      because the RSS feed which was specified was not found.
-    </strong>
+    The RSS feed was not found.
   </p>
-  <div 
-    petal:define="items self/items" petal:condition="items"
-   >
+  <div
+    petal:define="items self/items"
+    petal:condition="true: self/items"
+  >
     <dl>
-      <?for name="item self/items"?>
-      <dt>
-        <a 
-          href="#" 
-          petal:attributes="href item/uri" 
-          petal:content="item/title"
-        >foo</a>
-      </dt>
-      <dd 
-        petal:content="item/description"
-      >bar</dd>
-      <?end?>
+      <div
+        petal:repeat="item items"
+        petal:omit-tag=""
+      >
+        <dt>
+          <a 
+            href="#" 
+            petal:attributes="href item/uri" 
+            petal:content="item/title"
+          >foo</a>
+        </dt>
+        <dd 
+          petal:content="item/description"
+        >bar</dd>
+      </div>
     </dl>
   </div>
 </div>
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/resources/templates/component/rss/invisible/en.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lresources/templates/component/rss/invisible/en.html -Lresources/templates/component/rss/invisible/en.html -u -r1.1 -r1.2
--- resources/templates/component/rss/invisible/en.html
+++ resources/templates/component/rss/invisible/en.html
@@ -1,16 +1,47 @@
 <!--?
 
+  RSS Invisible Template
+  ==========================
+
+  This template is used for rendering the RSS component as an 
+  invisable component in documents. 
+
+  $Id$
+
+
+  Author: Jean-Michel Hiver, Chris Croome <chris at webarchitects.co.uk>, and others
+  Copyright: (c) 2004-2005, MKDoc Ltd.
+
+  This file is part of MKDoc. 
+  
+  MKDoc 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 2 of the License, or
+  (at your option) any later version.
+  
+  MKDoc 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 MKDoc; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-This template is used for rendering the RSS component in documents. 
   
 ?-->
 <div 
   class="rss"
   xmlns:petal="http://purl.org/petal/1.0/"
+  xmlns:i18n="http://xml.zope.org/namespaces/i18n"
+  i18n:domain="mkdoc"
+  petal:condition="true:self/user; 
+                   true:self/user/is_editor"
 >
-  <div 
-    petal:condition="true:self/user; true:self/user/is_editor"
-   >
-    <em>(&quot;$self/title&quot; is invisible. You can see it because you're an editor).</em>
-  </div>
+  <p
+    class="error"
+    i18n:translate="invisible-rss-component"
+  >
+    This RSS Component is invisible. This message only appears for document editors. 
+  </>
 </div>


More information about the MKDoc-commit mailing list