translation
This commit is contained in:
parent
0ceea17cba
commit
e5c650ab09
|
@ -103,6 +103,7 @@ def render_template(path, week=None, **kwargs):
|
||||||
|
|
||||||
# create a subset of punted users
|
# create a subset of punted users
|
||||||
if u.end:
|
if u.end:
|
||||||
|
u.end_de = datetime.datetime.strptime(rec.get('end'),"%Y/%m/%d").strftime("%d.%m.%Y")
|
||||||
punted.append(u)
|
punted.append(u)
|
||||||
|
|
||||||
def user_key(u):
|
def user_key(u):
|
||||||
|
|
|
@ -8,8 +8,8 @@ PUNTED for balance ≥$30: ${", ".join(sorted(punt))}
|
||||||
% endif
|
% endif
|
||||||
|
|
||||||
People who posted:
|
People who posted:
|
||||||
% for u in sorted(good, key=lambda u:u.name[u.name.find(' '):].lower()):
|
% for u in sorted(good, key=lambda u:u.name[u.name.rfind(' '):].lower()):
|
||||||
${u.username}:
|
${u.name} (${u.username}):
|
||||||
% for p in u.weeks[week]:
|
% for p in u.weeks[week]:
|
||||||
- ${p['url']}
|
- ${p['url']}
|
||||||
% endfor
|
% endfor
|
||||||
|
|
|
@ -1,35 +1,35 @@
|
||||||
Results for week beginning ${week_start.strftime("%F")}
|
Zusammenfassung für die Woche ab ${week_start.strftime("%d.%m.%Y")}:
|
||||||
<h2>Who posted:</h2>
|
<h3>Die Fleißigen:</h3>
|
||||||
<dl>
|
<dl>
|
||||||
% for u in sorted(good, key=lambda u:u.username):
|
% for u in sorted(good, key=lambda u:u.name[u.name.rfind(' '):].lower()):
|
||||||
<dt><span class="user"><strong>${u.name} </strong> \
|
<dt><span class="user"><strong>${u.name} </strong> \
|
||||||
% if u.twitter != False:
|
% if u.twitter != False:
|
||||||
<a href="https://twitter.com/#!/${u.username}">@${u.username}</a> \
|
@<a href="http://twitter.com/${u.username}">${u.username}</a> \
|
||||||
% endif
|
% endif
|
||||||
:</span></dt>
|
:</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<ul>
|
<ul>
|
||||||
% for p in u.weeks[week]:
|
% for p in u.weeks[week]:
|
||||||
<li><a href="${p['url']}">${p['title'] or "[untitled post]"}</a></li>
|
<li><a href="${p['url']}">${p['title'] or "[ohne Titel]"}</a></li>
|
||||||
% endfor
|
% endfor
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
% endfor
|
% endfor
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h2>Slackers:</h2>
|
<h3>Die Faulen:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
% for u in sorted(lame, key=lambda u:u.username):
|
% for u in sorted(lame, key=lambda u:u.name[u.name.rfind(' '):].lower()):
|
||||||
<li class="user"><strong>${u.name} </strong> \
|
<li class="user"><strong>${u.name} </strong> \
|
||||||
% if u.twitter != False:
|
% if u.twitter != False:
|
||||||
<a href="https://twitter.com/#!/${u.username}">@${u.username}</a> \
|
@<a href="http://twitter.com/${u.username}">${u.username}</a> \
|
||||||
% endif
|
% endif
|
||||||
</li>
|
</li>
|
||||||
% endfor
|
% endfor
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
% if punt:
|
% if punt:
|
||||||
<h2>Who was punted for outstanding balances:</h2>
|
<h3>Ausgeschieden wegen zu hoher Schulden:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
% for u in sorted(punt):
|
% for u in sorted(punt):
|
||||||
<li class="user">${u}</li>
|
<li class="user">${u}</li>
|
||||||
|
@ -38,12 +38,12 @@ Results for week beginning ${week_start.strftime("%F")}
|
||||||
% endif
|
% endif
|
||||||
|
|
||||||
% if skip:
|
% if skip:
|
||||||
<h2>Who haven't started yet:</h2>
|
<h3>Noch nicht dabei:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
% for u in sorted(skip, key=lambda u:u.username):
|
% for u in sorted(skip, key=lambda u:u.name[u.name.rfind(' '):].lower()):
|
||||||
<li class="user"><strong>${u.name} </strong> \
|
<li class="user"><strong>${u.name} </strong> \
|
||||||
% if u.twitter != False:
|
% if u.twitter != False:
|
||||||
- <a href="https://twitter.com/#!/${u.username}">@${u.username}</a> \
|
@<a href="http://twitter.com/${u.username}">${u.username}</a> \
|
||||||
% endif
|
% endif
|
||||||
</li>
|
</li>
|
||||||
% endfor
|
% endfor
|
||||||
|
@ -51,27 +51,27 @@ Results for week beginning ${week_start.strftime("%F")}
|
||||||
% endif
|
% endif
|
||||||
|
|
||||||
% if skipped_users:
|
% if skipped_users:
|
||||||
<h2>Who is currently skipped:</h2>
|
<h3>Gerade im Urlaub:</h3>
|
||||||
<ul>
|
<ul>
|
||||||
% for u in sorted(skipped_users, key=lambda u:u.username):
|
% for u in sorted(skipped_users, key=lambda u:u.name[u.name.rfind(' '):].lower()):
|
||||||
<li class="user"><strong>${u.name} </strong> \
|
<li class="user"><strong>${u.name} </strong> \
|
||||||
% if u.twitter != False:
|
% if u.twitter != False:
|
||||||
- <a href="https://twitter.com/#!/${u.username}">@${u.username}</a> \
|
@<a href="http://twitter.com/${u.username}">${u.username}</a> \
|
||||||
% endif
|
% endif
|
||||||
</li>
|
</li>
|
||||||
% endfor
|
% endfor
|
||||||
</ul>
|
</ul>
|
||||||
% endif
|
% endif
|
||||||
|
|
||||||
<h2>Beer fund:</h2>
|
<h3>Kasse:</h3>
|
||||||
<table style="border-left-style:none; border-right-style:none;">
|
<table style="border-left-style:none; border-right-style:none;">
|
||||||
<tr> <td> This week: </td> <td> € ${5 * len(lame)} </td> </tr>
|
<tr> <td> Diese Woche: </td> <td> ${5 * len(lame)} € </td> </tr>
|
||||||
<tr> <td> Total: </td> <td> € ${pool} </td> </tr>
|
<tr> <td> Insgesamt: </td> <td> ${pool} €</td> </tr>
|
||||||
<tr> <td> Paid: </td> <td> € ${paid} </td> </tr>
|
<tr> <td> Beglichen: </td> <td> ${paid} €</td> </tr>
|
||||||
<tr> <td> Events: </td> <td> € ${event} </td> </tr>
|
<tr> <td> verfeiert: </td> <td> ${event} €</td> </tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2>Debts:</h2>
|
<h3>Schulden:</h3>
|
||||||
<% i = 0 %>
|
<% i = 0 %>
|
||||||
<table class="debts" style="border-left-style:none; border-right-style:none;">
|
<table class="debts" style="border-left-style:none; border-right-style:none;">
|
||||||
% for (u, v) in sorted(debts, key=lambda p:p[1], reverse=True):
|
% for (u, v) in sorted(debts, key=lambda p:p[1], reverse=True):
|
||||||
|
@ -89,9 +89,9 @@ Results for week beginning ${week_start.strftime("%F")}
|
||||||
%endif
|
%endif
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2>Previously Punted (pay €30 to return):</h2>
|
<h3>Zuvor ausgeschieden (müssen 30 € für den Wiedereinstieg bezahlen):</h3>
|
||||||
<ul>
|
<ul>
|
||||||
% for (u) in sorted(punted, key=lambda p:p.username):
|
% for (u) in sorted(punted, key=lambda p:p.name[p.name.rfind(' '):].lower()):
|
||||||
<li>${u.username} (${u.end})</li>
|
<li>${u.name} (seit ${u.end_de})</li>
|
||||||
% endfor
|
% endfor
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -58,15 +58,8 @@ if not dry_run:
|
||||||
|
|
||||||
page = dict(title = title, description = body)
|
page = dict(title = title, description = body)
|
||||||
|
|
||||||
try:
|
|
||||||
subprocess.call(['stty', '-echo'])
|
|
||||||
passwd = raw_input("Password for %s: " % (config['username'],))
|
|
||||||
print
|
|
||||||
finally:
|
|
||||||
subprocess.call(['stty', 'echo'])
|
|
||||||
|
|
||||||
x = xmlrpclib.ServerProxy(config['xmlrpc_endpoint'])
|
x = xmlrpclib.ServerProxy(config['xmlrpc_endpoint'])
|
||||||
x.metaWeblog.newPost(config['blog_id'], config['username'], passwd, page, True)
|
x.metaWeblog.newPost(config['blog_id'], config['username'], config['password'], page, True)
|
||||||
email = render.render_template('templates/email.txt', date, punt=punt,mail=config['mail'])
|
email = render.render_template('templates/email.txt', date, punt=punt,mail=config['mail'])
|
||||||
if quick_view:
|
if quick_view:
|
||||||
print(render.render_template('templates/quick_view.tmpl',date,punt=punt))
|
print(render.render_template('templates/quick_view.tmpl',date,punt=punt))
|
||||||
|
|
Loading…
Reference in New Issue