diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-07-24 19:33:38 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-07-24 19:33:38 +0200 |
commit | 12b4b835427962c23546a4a7aff064d0bb03b12d (patch) | |
tree | f1f5649ec1de78082289e8f333b859b5f72f433e | |
parent | a22a9f91995a4892acad90d9643f0d0b159f2304 (diff) | |
download | kosten-12b4b835427962c23546a4a7aff064d0bb03b12d.tar.gz kosten-12b4b835427962c23546a4a7aff064d0bb03b12d.tar.bz2 kosten-12b4b835427962c23546a4a7aff064d0bb03b12d.zip |
Revert "Remove translation hack"
This reverts commit 6600ae0674bc685c4756a040b4db47e927f2e15e.
-rw-r--r-- | kosten/app/forms.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kosten/app/forms.py b/kosten/app/forms.py index 818384d..61bf6f1 100644 --- a/kosten/app/forms.py +++ b/kosten/app/forms.py @@ -37,7 +37,7 @@ def lenOf(col): class Form(FlaskForm): class Meta: - locales = False + locales = ['de_DE', 'de'] def __init__ (self, *args, **kwargs): self._msg = kwargs.pop('flash', "Fehler im Formular!") @@ -55,3 +55,9 @@ class Form(FlaskForm): def validate_on_submit (self): return self.is_submitted() and self.flash_validate() + + def _get_translations(self): + # use WTForms builtin translation support instead of the flask-babael + # stuff added by flask-wtf + # FIXME: remove this, if flask-babel is used in the app + return WTForm._get_translations(self) |