diff --git a/TODO.md b/TODO.md index 78f009d..e69de29 100644 --- a/TODO.md +++ b/TODO.md @@ -1 +0,0 @@ -* wtforms locale diff --git a/prolefeeder.py b/prolefeeder.py index f5c78b0..9f83526 100644 --- a/prolefeeder.py +++ b/prolefeeder.py @@ -17,12 +17,16 @@ from config import Config app = Flask(__name__) app.config.from_object(Config) +app.config['WTF_I18N_ENABLED'] = False # enables WTForms built-in translations Bootstrap(app) attachment_filenames = {} class DownloadForm(FlaskForm): + class Meta: + locales = ['de_DE', 'de'] + start_time = DateTimeField('Startzeit', validators=[InputRequired()], format='%d.%m.%Y %H:%M') diff --git a/requirements.txt b/requirements.txt index 0fcfc29..6f574de 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,6 @@ flask flask-bootstrap -flask-wtf python-dotenv + +# flask-wtf 0.14.2 is broken (enabling WTForms built-in translations does not work): +git+https://github.com/lepture/flask-wtf.git@534e1734b86c2f0907af131c11b981e6146ca57c