[MKDoc-commit] i18n attributes added
chris at mkdoc.demon.co.uk
chris at mkdoc.demon.co.uk
Thu Dec 2 15:32:32 GMT 2004
Log Message:
-----------
i18n attributes added
Modified Files:
--------------
mkd/resources/templates/component/headlines:
en.html
-------------- next part --------------
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/resources/templates/component/headlines/en.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lresources/templates/component/headlines/en.html -Lresources/templates/component/headlines/en.html -u -r1.2 -r1.3
--- resources/templates/component/headlines/en.html
+++ resources/templates/component/headlines/en.html
@@ -1,56 +1,50 @@
<!--?
+ Headlines Component Template
+ ============================
+
+ This template is used for rendering the headlines component in documents.
+
+ It contains three different versions of the headlines listings:
+
+ - Users with a match between the headlines and their audience preferences
+ - Users without a match between the headlines and their audience preferences
+ - Anon users
+
+ $Id$
+
+
+ Author: Jean-Michel Hiver, Chris Croome <chris at webarchitects.co.uk>, and others
+ Copyright: (c) 2004, MKDoc Holdings 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 headlines component in documents.
?-->
<div
class="headlines"
- petal:define="
- title self/title;
- lang self/lang;
- dir self/direction;
- align self/align;
- align_opposite self/align_opposite;
- "
xmlns:petal="http://purl.org/petal/1.0/"
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
>
<h2
- xml:lang="en"
- lang="en"
- dir="ltr"
- align="left"
- petal:condition="true: title"
- petal:attributes="xml:lang lang; lang lang; dir dir; align align"
+ petal:condition="true: self/title"
petal:content="self/title"
>Demain, on rase gratis!</h2>
- <!--? The following error messages are for editors ?-->
- <!-- div
- petal:condition="true: self/user/is_admin"
- >
- <p
- xml:lang="en"
- lang="en"
- dir="ltr"
- align="left"
- petal:attributes="align align"
- >
- You seem to have specified a base headlines path that doesn't exist,
- are you sure you want to do this?
- </p>
- <p
- xml:lang="en"
- lang="en"
- dir="ltr"
- align="left"
- petal:attributes="align align"
- >
- You seem to have specified a base headlines path for a document
- without children are you sure you want to do this?
- </p>
- </div -->
-
<!--? The following is for people accessing the site with a username ?-->
<div
petal:condition="true: self/is_user_logged_in"
@@ -65,20 +59,24 @@
xml:lang="en"
lang="en"
dir="ltr"
- align="left"
- petal:attributes="align align"
+ i18n:attributes="lang two-letter-language-code;
+ xml:lang two-letter-language-code;
+ dir text-direction;"
+ i18n:translate="the-following-list-of-documents-has-been-personalised"
>
- The following list of documents has been personalised for you based on
+ The following list of documents has been personalised for you based on your
<a
petal:define="preferences_p plugin: flo::plugin::Account::Preferences"
- petal:attributes="href preferences_p/uri"
href="./.account.preferences"
- >your preferences</a>:
+ petal:attributes="href preferences_p/uri"
+ i18n:translate="preferences"
+ i18n:name="preferences"
+ >preferences</a>.
</p>
<dl>
<div
petal:repeat="headline self/personalized_headlines"
- petal:omit-tag="string:1"
+ petal:omit-tag=""
>
<dt>
<a
@@ -87,13 +85,11 @@
lang="en"
xml:lang="en"
dir="ltr"
- petal:attributes="
- href headline/uri;
+ petal:attributes="href headline/uri;
hreflang headline/lang;
- lang headline/lang;
+ lang headline/lang;
xml:lang headline/lang;
- dir headline/direction;
- "
+ dir headline/direction;"
petal:content="headline/title"
>Pumpkins on fire!</a>
</dt>
@@ -102,16 +98,17 @@
lang="en"
xml:lang="en"
dir="ltr"
- petal:attributes="
- lang headline/lang;
+ petal:attributes="lang headline/lang;
xml:lang headline/lang;
- dir headline/direction;"
+ dir headline/direction;"
petal:content="headline/description"
>
Some description describing some stuff about fire and pumpkins.
</span>
<br />
- <small petal:content="headline/date_created">
+ <small
+ petal:content="headline/date_created"
+ >
DATE
</small>
</dd>
@@ -125,19 +122,25 @@
petal:condition="false: self/personalized_headlines"
>
<p
- lang="en"
xml:lang="en"
+ lang="en"
dir="ltr"
- align="left"
- petal:attributes="align align"
+ i18n:attributes="lang two-letter-language-code;
+ xml:lang two-letter-language-code;
+ dir text-direction;"
+ i18n:translate="the-following-list-of-documents-has-not-been-personalised"
+ petal:define="preferences_p plugin: flo::plugin::Account::Preferences"
+ petal:condition="true: preferences_p/audiences"
>
- This list of documents has not been personalized because you didn't set
+ This list of documents has not been personalized because you didn't set your
<a
petal:define="preferences_p plugin: flo::plugin::Account::Preferences"
- petal:attributes="href preferences_p/uri"
href="./.account.preferences"
- >your preferences</a>
- or because none of the documents in the list matched them.
+ petal:attributes="href preferences_p/uri"
+ i18n:translate="preferences"
+ i18n:name="preferences"
+ >preferences</a>
+ or because none of the new documents matched them.
</p>
<dl>
<div
@@ -151,11 +154,11 @@
lang="en"
xml:lang="en"
dir="ltr"
- petal:attributes="href headline/uri;
+ petal:attributes="href headline/uri;
hreflang headline/lang;
- lang headline/lang;
+ lang headline/lang;
xml:lang headline/lang;
- dir headline/direction;"
+ dir headline/direction;"
petal:content="headline/title"
>Pumpkins on fire!</a>
</dt>
@@ -165,9 +168,9 @@
xml:lang="en"
dir="ltr"
petal:attributes="
- lang headline/lang;
+ lang headline/lang;
xml:lang headline/lang;
- dir headline/direction;"
+ dir headline/direction;"
petal:content="headline/description"
>
Some description describing some stuff about fire and pumpkins.
@@ -189,7 +192,7 @@
<dl>
<div
petal:repeat="headline self/default_headlines"
- petal:omit-tag="string:1"
+ petal:omit-tag=""
>
<dt>
<a
@@ -198,13 +201,11 @@
lang="en"
xml:lang="en"
dir="ltr"
- petal:attributes="
- href headline/uri;
+ petal:attributes="href headline/uri;
hreflang headline/lang;
- lang headline/lang;
+ lang headline/lang;
xml:lang headline/lang;
- dir headline/direction;
- "
+ dir headline/direction;"
petal:content="headline/title"
>Pumpkins on fire!</a>
</dt>
@@ -213,19 +214,19 @@
lang="en"
xml:lang="en"
dir="ltr"
- petal:attributes="
- lang headline/lang;
+ petal:attributes="lang headline/lang;
xml:lang headline/lang;
- dir headline/direction;
- "
+ dir headline/direction;"
petal:content="headline/description"
>
Some description describing some stuff about fire and pumpkins.
</span>
- <br />
- <small petal:content="headline/date_created">
- DATE
- </small>
+ <br />
+ <small
+ petal:content="headline/date_created"
+ >
+ DATE
+ </small>
</dd>
</div>
</dl>
More information about the MKDoc-commit
mailing list