start internationalisation

* add babel stuff to setup.py
 * translate existing templates (addresses #11)
 * translate existing controllers

git-svn-id: file:///var/www/wwwusers/usr01/svn/pyalchemybiz/trunk@9 389c73d4-bf09-4d3d-a15e-f94a37d0667a
This commit is contained in:
Jan Dittberner 2008-10-05 23:14:25 +00:00
parent b53e8c48df
commit 1bbcc8e559
9 changed files with 112 additions and 11 deletions

View file

@ -2,7 +2,7 @@
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>PyAlchemyBiz</title>
<title>${_('PyAlchemyBiz')}</title>
${h.stylesheet_link_tag('/pyalchemybiz.css')}
${h.javascript_include_tag(
'/javascripts/pyalchemybiz.js', builtins=True)}
@ -11,8 +11,8 @@
<div class="content">
${next.body()}\
<p class="footer">
Return to the
${h.link_to('FrontPage',
${_("Return to the %s.") % \
h.link_to(_('FrontPage'),
h.url_for(controller="index", action="index"))}
</p>
</div>

View file

@ -1,9 +1,9 @@
<%inherit file="/base.mako" />
<h1>Hallo</h1>
<h1>${_('Hello')}</h1>
<ul id="customers">
% for customer in c.customers:
<li>${h.escape_once(customer)} [${h.link_to('edit', h.url_for(id=customer.id, action="edit"))}]</li>
<li>${customer | h} [${h.link_to(_('edit'), h.url_for(id=customer.id, action="edit"))}]</li>
% endfor
</ul>

View file

@ -1,3 +1,7 @@
<%inherit file="base.mako" />
${h.link_to('customers', h.url_for(controller="customer", action="index"))}
<ul id="menu">
% for item in c.menuitems:
<li>${h.link_to(item[0], h.url_for(controller=item[1], action=item[2]))}</li>
% endfor
</ul>