[MKDoc-commit] Various updates for i18n, macroc etc,
this is a work in progress...
chris at mkdoc.demon.co.uk
chris at mkdoc.demon.co.uk
Wed Nov 3 16:20:38 GMT 2004
Log Message:
-----------
Various updates for i18n, macroc etc, this is a work in progress... :-)
Modified Files:
--------------
mkd/resources/templates/admin/finder:
en.html
mkd/resources/templates/admin/move:
en.html
mkd/resources/templates/admin/new:
en.html
mkd/resources/templates/admin/user_delete:
en.html
mkd/resources/templates/admin/user_insert:
en.html
-------------- next part --------------
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/resources/templates/admin/move/en.html,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lresources/templates/admin/move/en.html -Lresources/templates/admin/move/en.html -u -r1.8 -r1.9
--- resources/templates/admin/move/en.html
+++ resources/templates/admin/move/en.html
@@ -312,7 +312,8 @@
value="some_id"
title="Foo"
petal:repeat="record self/movable_document_list"
- petal:attributes="value record/ID; title record/Title;"
+ petal:attributes="value record/ID;
+ title record/Title;"
petal:content="record/Full_Path"
>/bar/foo/</option>
</select>
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/resources/templates/admin/new/en.html,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lresources/templates/admin/new/en.html -Lresources/templates/admin/new/en.html -u -r1.9 -r1.10
--- resources/templates/admin/new/en.html
+++ resources/templates/admin/new/en.html
@@ -466,7 +466,7 @@
title="Add $audience/label to this documents audience."
petal:attributes="id string:audience-$audience/id;
value audience/id;
- checked audience/checked"
+ checked audience/checked;"
/>
</p>
<br />
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/resources/templates/admin/user_delete/en.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lresources/templates/admin/user_delete/en.html -Lresources/templates/admin/user_delete/en.html -u -r1.3 -r1.4
--- resources/templates/admin/user_delete/en.html
+++ resources/templates/admin/user_delete/en.html
@@ -4,69 +4,189 @@
>
<!--?
+ Delete User Template
+ ====================
-This template is used for deleting user accounts.
+ This template is used for deleting user accounts.
+
+ $Id$
+
+
+ Author: 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
+
?-->
<html
lang="en"
xml:lang="en"
dir="ltr"
- petal:define="
- uri self/uri;
- title string:Delete a User;
- lang self/lang;
- dir self/direction;
- align self/align;
- align_opposite self/align_opposite;
- css string:@import url(/.resources/css/admin.${self/direction}.css)\;;
- document_uri self/parent/uri;
- document_title self/parent/title;
- document_lang self/parent/lang;
- document plugin: flo::plugin::Cache::Fake;
- user_list plugin: flo::plugin::Admin::UserList;
- user_add plugin: flo::plugin::Admin::UserInsert;
- audience_list plugin: flo::plugin::Admin::AudienceList;
- audience_add plugin: flo::plugin::Admin::AudienceInsert;
- preferences plugin: flo::plugin::Account::Preferences;
- edit_preferences_uri string:./${preferences/name};
- "
- petal:attributes="lang lang; xml:lang lang; dir dir"
+ petal:attributes="lang self/lang;
+ xml:lang self/lang;
+ dir self/direction;"
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
+ xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns="http://www.w3.org/1999/xhtml"
- xmlns:petal="http://purl.org/petal/1.0/"
- xmlns:xi="http://www.w3.org/2001/XInclude"
+ i18n:domain="mkdoc"
>
-<!--? This is the <head> for admin documents ?-->
-<?include file="/fragments/head_admin/"?>
-
- <body
- lang="en"
- xml:lang="en"
- dir="ltr"
- petal:attributes="lang lang; xml:lang lang; dir dir"
- >
-
- <xi:include href="/fragments/admin/" />
-
- <div class="admin-content">
- <h1
- lang="en"
- xml:lang="en"
- dir="ltr"
- align="left"
- petal:attributes="align align"
- petal:content="title"
- >Modify the Properties of the document</h1>
+ <head>
+ <title
+ petal:content="structure string:${self/parent_alternate_title}${string:delete-user}"
+ >
+ </title>
+ <meta
+ http-equiv="Content-Type"
+ content="text/html; charset=UTF-8"
+ />
+ <meta
+ http-equiv="Content-Language"
+ content="en"
+ petal:attributes="content self/lang"
+ />
+ <meta
+ http-equiv="Content-Location"
+ content="#"
+ petal:attributes="content self/parent/uri"
+ />
+ <!--? CSS ?-->
+ <style
+ media="screen"
+ type="text/css"
+ title="Screen style sheet"
+ metal:use-macro="/macros/style/#content"
+ >
+ @import url(../../css/public.ltr.css);
+ @import url(../../css/public.css);
+ @import url(../../css/colours.css);
+ @import url(../../css/admin.ltr.css);
+ @import url(../../css/admin.css);
+ </style>
+ <link
+ rel="shortcut icon"
+ href="../../css/favicon.ico"
+ type="image/x-icon"
+ petal:attributes="href string:${self/root/uri}favicon.ico"
+ petal:condition="true: self/root/get --favicon.ico;"
+ />
+ <meta
+ name="generator"
+ content="MKDoc 1.8, see http://mkdoc.com/"
+ />
+ <!--? Document specific things ?-->
+ <link
+ rel="top"
+ href="/"
+ hreflang="en"
+ title="Root Document"
+ type="text/html"
+ petal:attributes="href self/root/uri;
+ hreflang self/root/lang;
+ title self/root/title;"
+ petal:condition="false: self/cgi/path_info_eq '/';"
+ />
+ <link
+ rel="parent"
+ href="#"
+ hreflang="en"
+ title="Document Parent Title"
+ type="text/html"
+ petal:attributes="href self/parent/uri;
+ hreflang self/parent/lang;
+ title self/parent/title"
+ />
+ </head>
+
+ <body>
+
+ <!--? Admin Fragment ?-->
+ <div
+ class="admin"
+ petal:condition="true: self/user;
+ true: self/user/is_editor"
+ metal:use-macro="/macros/menu_admin/#content"
+ >
+ <!--? Mockup content - this will be replaced by the result of the macro ?-->
+ <form accept-charset="utf-8" action="#" method="post">
+ <a lang="en" xml:lang="en" dir="ltr" href="#">Document</a>
+ <bdo dir="ltr">|</bdo>
+ <a lang="en" xml:lang="en" dir="ltr" href="#"
+ title="Modify the Title, Description, and other Properties of this document.">Properties</a>
+ <bdo dir="ltr">|</bdo>
+ <a lang="en" xml:lang="en" dir="ltr" href="#"
+ title="Edit the Content of of this document.">Content</a>
+ <bdo dir="ltr">|</bdo>
+ <a lang="en" xml:lang="en" dir="ltr" href="#" title="Find documents.">Finder</a>
+ <bdo dir="ltr">|</bdo>
+ <a lang="en" xml:lang="en" dir="ltr" href="#"
+ title="Modify the Sort order of the child documents of this document.">Sort</a>
+ <bdo dir="ltr">|</bdo>
+ <a lang="en" xml:lang="en" dir="ltr" href="#" title="Move this document.">Move</a>
+ <bdo dir="ltr">|</bdo>
+ <a lang="en" xml:lang="en" dir="ltr" href="#" title="Copy this document.">Copy</a>
+ <bdo dir="ltr">|</bdo>
+ <a lang="en" xml:lang="en" dir="ltr" href="#" title="Create a new child document.">New</a>
+ <bdo dir="ltr">|</bdo>
+ <a lang="en" xml:lang="en" dir="ltr" href="#" title="Delete this document.">Delete</a>
+ </form>
+ <!--? / Mockup content ?-->
+ </div>
+ <!--? / Admin Fragment ?-->
- <xi:include href="/error/" />
+ <div
+ class="admin-content"
+ >
+
+ <h1>
+ <a
+ id="page_content"
+ name="page_content"
+ lang="en"
+ xml:lang="en"
+ dir="ltr"
+ i18n:attributes="lang two-letter-language-code;
+ xml:lang two-letter-language-code;
+ dir text-direction;"
+ i18n:translate="delete-user"
+ >Delete User</a>
+ </h1>
+
+ <!--? Error Fragment ?-->
+ <div
+ class="error"
+ metal:use-macro="/error/#content"
+ >
+ <!--? Mockup content - this will be replaced by the result of the macro ?-->
+ <h2>
+ <a name="error" id="error">Error</a>
+ </h2>
+ <ul>
+ <li>Oh no! something has gone wrong :-/</li>
+ </ul>
+ </div>
<form
action="#"
method="post"
accept-charset="UTF-8"
enctype="application/x-www-form-urlencoded"
- petal:attributes="action uri"
+ petal:attributes="action self/uri"
>
<input
@@ -78,27 +198,45 @@
lang="en"
xml:lang="en"
dir="ltr"
- align="left"
+ i18n:attributes="lang two-letter-language-code;
+ xml:lang two-letter-language-code;
+ dir text-direction;"
+ i18n:translate="confirm-to-delete-user"
>
- Please confirm that you want to delete the account with the username
+ Please confirm that you want to delete the account with these details,
<em
petal:content="self/user_edit/login"
- >username</em>, name
+ i18n:name="username"
+ >username</em>,
<strong
petal:content="self/user_edit/first_name"
+ i18n:name="first-name"
>First Name</strong>
<strong
petal:content="self/user_edit/family_name"
- >Family Name</strong> and email address
+ i18n:name="family-name"
+ >Family Name</strong>,
<<span
petal:content="self/user_edit/email"
- >user at example.com</span>>
+ i18n:name="email"
+ >user at example.com</span>>.
+ </p>
+
+ <p>
<input
+ lang="en"
+ xml:lang="en"
+ dir="ltr"
type="submit"
value="Delete User"
class="input-submit"
title="Delete the selected user account."
- />.
+ i18n:attributes="lang two-letter-language-code;
+ xml:lang two-letter-language-code;
+ dir text-direction;
+ value delete-user;
+ title delete-the-selected-user-account;"
+ />
</p>
</form>
Index: en.html
===================================================================
RCS file: /var/spool/cvs/mkd/resources/templates/admin/user_insert/en.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lresources/templates/admin/user_insert/en.html -Lresources/templates/admin/user_insert/en.html -u -r1.3 -r1.4
--- resources/templates/admin/user_insert/en.html
+++ resources/templates/admin/user_insert/en.html
@@ -4,14 +4,34 @@
>
<!--?
+ Add User Template
+ =================
-This template is used for adding user accounts.
+ This template is used for adding user accounts.
+
+ $Id$
+
+
+ Author: 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
+
-?-->
-<html
- lang="en"
- xml:lang="en"
- dir="ltr"
petal:define="
uri self/uri;
title string:Add a User;
@@ -30,149 +50,338 @@
preferences plugin: flo::plugin::Account::Preferences;
edit_preferences_uri string:./${preferences/name};
"
- petal:attributes="lang lang; xml:lang lang; dir dir"
+
+?-->
+<html
+ lang="en"
+ xml:lang="en"
+ dir="ltr"
+ petal:attributes="lang self/lang;
+ xml:lang self/lang;
+ dir self/direction;"
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
+ xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns="http://www.w3.org/1999/xhtml"
- xmlns:petal="http://purl.org/petal/1.0/"
- xmlns:xi="http://www.w3.org/2001/XInclude"
+ i18n:domain="mkdoc"
>
-<!--? This is the <head> for admin documents ?-->
-<?include file="/fragments/head_admin/"?>
-
- <body
- lang="en"
- xml:lang="en"
- dir="ltr"
- petal:attributes="lang lang; xml:lang lang; dir dir"
- >
-
- <xi:include href="/fragments/admin/" />
+ <head>
+ <title
+ petal:content="structure string:${self/parent_alternate_title}${string:add-user}"
+ >
+ </title>
+ <meta
+ http-equiv="Content-Type"
+ content="text/html; charset=UTF-8"
+ />
+ <meta
+ http-equiv="Content-Language"
+ content="en"
+ petal:attributes="content self/lang"
+ />
+ <meta
+ http-equiv="Content-Location"
+ content="#"
+ petal:attributes="content self/parent/uri"
+ />
+ <!--? CSS ?-->
+ <style
+ media="screen"
+ type="text/css"
+ title="Screen style sheet"
+ metal:use-macro="/macros/style/#content"
+ >
+ @import url(../../css/public.ltr.css);
+ @import url(../../css/public.css);
+ @import url(../../css/colours.css);
+ @import url(../../css/admin.ltr.css);
+ @import url(../../css/admin.css);
+ </style>
+ <link
+ rel="shortcut icon"
+ href="../../css/favicon.ico"
+ type="image/x-icon"
+ petal:attributes="href string:${self/root/uri}favicon.ico"
+ petal:condition="true: self/root/get --favicon.ico;"
+ />
+ <meta
+ name="generator"
+ content="MKDoc 1.8, see http://mkdoc.com/"
+ />
+ <!--? Document specific things ?-->
+ <link
+ rel="top"
+ href="/"
+ hreflang="en"
+ title="Root Document"
+ type="text/html"
+ petal:attributes="href self/root/uri;
+ hreflang self/root/lang;
+ title self/root/title;"
+ petal:condition="false: self/cgi/path_info_eq '/';"
+ />
+ <link
+ rel="parent"
+ href="#"
+ hreflang="en"
+ title="Document Parent Title"
+ type="text/html"
+ petal:attributes="href self/parent/uri;
+ hreflang self/parent/lang;
+ title self/parent/title"
+ />
+ </head>
+
+ <body>
+
+ <!--? Admin Fragment ?-->
+ <div
+ class="admin"
+ petal:condition="true: self/user;
+ true: self/user/is_editor"
+ metal:use-macro="/macros/menu_admin/#content"
+ >
+ <!--? Mockup content - this will be replaced by the result of the macro ?-->
+ <form accept-charset="utf-8" action="#" method="post">
+ <a lang="en" xml:lang="en" dir="ltr" href="#">Document</a>
+ <bdo dir="ltr">|</bdo>
+ <a lang="en" xml:lang="en" dir="ltr" href="#"
+ title="Modify the Title, Description, and other Properties of this document.">Properties</a>
+ <bdo dir="ltr">|</bdo>
+ <a lang="en" xml:lang="en" dir="ltr" href="#"
+ title="Edit the Content of of this document.">Content</a>
+ <bdo dir="ltr">|</bdo>
+ <a lang="en" xml:lang="en" dir="ltr" href="#" title="Find documents.">Finder</a>
+ <bdo dir="ltr">|</bdo>
+ <a lang="en" xml:lang="en" dir="ltr" href="#"
+ title="Modify the Sort order of the child documents of this document.">Sort</a>
+ <bdo dir="ltr">|</bdo>
+ <a lang="en" xml:lang="en" dir="ltr" href="#" title="Move this document.">Move</a>
+ <bdo dir="ltr">|</bdo>
+ <a lang="en" xml:lang="en" dir="ltr" href="#" title="Copy this document.">Copy</a>
+ <bdo dir="ltr">|</bdo>
+ <a lang="en" xml:lang="en" dir="ltr" href="#" title="Create a new child document.">New</a>
+ <bdo dir="ltr">|</bdo>
+ <a lang="en" xml:lang="en" dir="ltr" href="#" title="Delete this document.">Delete</a>
+ </form>
+ <!--? / Mockup content ?-->
+ </div>
+ <!--? / Admin Fragment ?-->
- <div class="admin-content">
+ <div
+ class="admin-content"
+ >
+
+ <h1>
+ <a
+ id="page_content"
+ name="page_content"
+ lang="en"
+ xml:lang="en"
+ dir="ltr"
+ i18n:attributes="lang two-letter-language-code;
+ xml:lang two-letter-language-code;
+ dir text-direction;"
+ i18n:translate="add-user"
+ >Add User</a>
+ </h1>
+
+ <!--? Error Fragment ?-->
+ <div
+ class="error"
+ metal:use-macro="/error/#content"
+ >
+ <!--? Mockup content - this will be replaced by the result of the macro ?-->
+ <h2>
+ <a name="error" id="error">Error</a>
+ </h2>
+ <ul>
+ <li>Oh no! something has gone wrong :-/</li>
+ </ul>
+ </div>
- <h1
+ <p
lang="en"
xml:lang="en"
dir="ltr"
- align="left"
- petal:attributes="align align"
- petal:content="title"
- >Add a User</h1>
-
- <p
- petal:condition="self/ok"
+ i18n:attributes="lang two-letter-language-code;
+ xml:lang two-letter-language-code;
+ dir text-direction;"
+ i18n:translate="user-added-successfully"
+ petal:condition="true: self/ok"
>
- User added successfully, you may add another or
+ User added successfully, you may add another or return to the list of
<a
href="#"
- title="List, edit, add and delete users."
- petal:attributes="href user_list/uri"
- >return to the users list</a>.
+ lang="en"
+ xml:lang="en"
+ dir="ltr"
+ i18n:attributes="href user_list/uri;
+ lang two-letter-language-code;
+ xml:lang two-letter-language-code;
+ dir text-direction;"
+ petal:attributes=""
+ i18n:translate="users"
+ >Users</a>.
</p>
-
- <xi:include href="/error/" />
+ <p
+ lang="en"
+ xml:lang="en"
+ dir="ltr"
+ i18n:attributes="lang two-letter-language-code;
+ xml:lang two-letter-language-code;
+ dir text-direction;"
+ i18n:translate="use-this-form-to-add-a-user"
+ petal:condition="false: self/ok"
+ >
+ Use the following form to add a new user to this site.
+ </p>
+
<form
action="#"
method="post"
accept-charset="UTF-8"
enctype="application/x-www-form-urlencoded"
- petal:attributes="action uri"
+ petal:attributes="action self/uri"
>
<fieldset
class="user-details"
>
- <legend
- lang="en"
- xml:lang="en"
- dir="ltr"
- align="left"
- petal:attributes="align align"
- >
- User Details
+ <legend>
+ <a
+ lang="en"
+ xml:lang="en"
+ dir="ltr"
+ id="user-details"
+ name="user-details"
+ i18n:attributes="lang two-letter-language-code;
+ xml:lang two-letter-language-code;
+ dir text-direction;"
+ i18n:translate="user-details"
+ >User Details</a>
</legend>
<p
- lang="en"
- xml:lang="en"
- dir="ltr"
- align="left"
- petal:attributes="align align"
+ class="field"
>
+ <label
+ for="login"
+ lang="en"
+ xml:lang="en"
+ dir="ltr"
+ class="mandatory"
+ i18n:attributes="lang two-letter-language-code;
+ xml:lang two-letter-language-code;
+ dir text-direction;"
+ i18n:translate="username"
+ >Username</label>
<em
+ lang="en"
+ xml:lang="en"
+ dir="ltr"
class="help"
+ i18n:attributes="lang two-letter-language-code;
+ xml:lang two-letter-language-code;
+ dir text-direction;"
+ i18n:translate="add-user-username-help"
>
The username is the name that the user will have to enter when they
login to the web site. It should be fairly short, easy to remember and
it cannot contain any spaces or punctuation. Often people user all lowercase
letters for usernames, the username is case sensitive.
</em>
- <label
- for="login"
- >Username</label>
- <br />
<input
type="text"
value=""
id="login"
name="login"
size="20"
+ title="Enter a username."
petal:attributes="value self/cgi/param --login"
+ i18n:attributes="title enter-a-username"
/>
+ <br />
</p>
<p
- lang="en"
- xml:lang="en"
- dir="ltr"
- align="left"
- petal:attributes="align align"
+ class="field"
>
+ <label
+ for="first_name"
+ lang="en"
+ xml:lang="en"
+ dir="ltr"
+ class="mandatory"
+ i18n:attributes="lang two-letter-language-code;
+ xml:lang two-letter-language-code;
+ dir text-direction;"
+ i18n:translate="first-name"
+ >First Name</label>
<em
+ lang="en"
+ xml:lang="en"
+ dir="ltr"
class="help"
+ i18n:attributes="lang two-letter-language-code;
+ xml:lang two-letter-language-code;
+ dir text-direction;"
+ i18n:translate="add-user-first-name-help"
>
The first, or given or christian name of the user.
</em>
- <label
- for="first_name"
- >First Name</label>
- <br />
<input
type="text"
value=""
id="first_name"
name="first_name"
size="20"
+ title="Enter the users first name."
petal:attributes="value self/cgi/param --first_name"
+ i18n:attributes="title enter-first-name"
/>
+ <br />
</p>
<p
- lang="en"
- xml:lang="en"
- dir="ltr"
- align="left"
- petal:attributes="align align"
+ class="field"
>
+ <label
+ for="family_name"
+ lang="en"
+ xml:lang="en"
+ dir="ltr"
+ class="mandatory"
+ i18n:attributes="lang two-letter-language-code;
+ xml:lang two-letter-language-code;
+ dir text-direction;"
+ i18n:translate="family-name"
+ >Family Name</label>
<em
+ lang="en"
+ xml:lang="en"
+ dir="ltr"
class="help"
+ i18n:attributes="lang two-letter-language-code;
+ xml:lang two-letter-language-code;
+ dir text-direction;"
+ i18n:translate="add-user-family-name-help"
>
The family or second or surname of the user.
</em>
- <label
- for="family_name"
- >Family Name</label>
- <br />
<input
type="text"
value=""
id="family_name"
name="family_name"
size="20"
+ title="Enter the users family name."
petal:attributes="value self/cgi/param --family_name"
+ i18n:attributes="title enter-family-name"
/>
+ <br />
</p>
<p
More information about the MKDoc-commit
mailing list