From c0ed28b17baa41a8d69d0cdfd952144d453ea17d Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Sun, 6 Mar 2011 18:22:32 +0100 Subject: Change to german in output --- controller.py | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) (limited to 'controller.py') diff --git a/controller.py b/controller.py index 62eb235..ea8be5b 100644 --- a/controller.py +++ b/controller.py @@ -1,3 +1,4 @@ +# -*- encoding: utf-8 -*- from __future__ import with_statement import web @@ -93,21 +94,25 @@ class Add: form.Textbox( "date", form.notnull, - Validator("Date Format does not match", lambda v: datetime.datetime.strptime(v, self.dformat)), - value = datetime.date.today().strftime(self.dformat) + Validator("Datumsformat stimmt nicht", lambda v: datetime.datetime.strptime(v, self.dformat)), + value = datetime.date.today().strftime(self.dformat), + description = "Datum" ), form.Textbox( "expense", form.notnull, - Validator("Not a valid decimal", decimal.Decimal), + Validator("Keine Dezimalzahl", decimal.Decimal), + description = "Betrag" ), form.Textbox( "description", - form.notnull + form.notnull, + description = "Beschreibung" ), form.Dropdown( "category", - map(op.itemgetter(0), sorted(Category.query.values(Category.name))) + map(op.itemgetter(0), sorted(Category.query.values(Category.name))), + description = "Kategorie" ) ) @@ -225,38 +230,45 @@ class ConstAdd: form.Textbox( "start", form.notnull, - Validator("Date Format does not match", lambda v: datetime.datetime.strptime(v, self.dformat)), - value = datetime.date.today().strftime(self.dformat) + Validator("Datumsformat stimmt nicht", lambda v: datetime.datetime.strptime(v, self.dformat)), + value = datetime.date.today().strftime(self.dformat), + description = "Start" ), form.Textbox( "end", form.notnull, - Validator("Date Format does not match", lambda v: datetime.datetime.strptime(v, self.dformat)), - value = datetime.date.today().strftime(self.dformat) + Validator("Datumsformat stimmt nicht", lambda v: datetime.datetime.strptime(v, self.dformat)), + value = datetime.date.today().strftime(self.dformat), + description = "Ende" ), form.Textbox( "months", form.notnull, - Validator("Not an integer > 0", lambda v: int(v) > 0), + Validator("Zahl muss größer als 0 sein", lambda v: int(v) > 0), value = "12", - description = "Number of Months" + description = "Zahlungsrhythmus", + post = " Monate" ), form.Textbox( "expense", form.notnull, Validator("Not a valid decimal", decimal.Decimal), + description = "Betrag" ), form.Textbox( "description", - form.notnull + form.notnull, + description = "Beschreibung" ), form.Dropdown( "category", - map(op.itemgetter(0), sorted(Category.query.values(Category.name))) + map(op.itemgetter(0), sorted(Category.query.values(Category.name))), + description = "Kategorie" ), form.Dropdown( "prev", - iter.chain([(-1, '')], prev_list) + iter.chain([(-1, '')], prev_list), + description = "Vorgänger" ) ) -- cgit v1.2.3-70-g09d2