diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2011-03-06 18:22:32 +0100 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2011-03-06 18:22:32 +0100 |
commit | c0ed28b17baa41a8d69d0cdfd952144d453ea17d (patch) | |
tree | e2f950bb564b5f8b344517fa15b53432b0dd7759 /controller.py | |
parent | 7ab81cd8ccebd0865f9a3498d88d72129c695a45 (diff) | |
download | kosten-c0ed28b17baa41a8d69d0cdfd952144d453ea17d.tar.gz kosten-c0ed28b17baa41a8d69d0cdfd952144d453ea17d.tar.bz2 kosten-c0ed28b17baa41a8d69d0cdfd952144d453ea17d.zip |
Change to german in output
Diffstat (limited to '')
-rw-r--r-- | controller.py | 40 |
1 files changed, 26 insertions, 14 deletions
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" ) ) |