Closed jsangmeister closed 2 years ago
The better approach is to use a full framework. It can probably be implemented analogous to the website: https://github.com/OpenSlides/openslides.com
It cannot be implemented analogous, because openslides.com uses flask and the backend is barebone. I don't know how to continue here. Babel is a way to extract the messages easily. The localization uses gettext. Gettext uses the locale of the Docker container, which is a generic one. It is not easy to switch the locale. Shouldn't the translated text be based on the request? I don't know, how to do that.
We want the client to send the language with Accept Language in the header. We will pass the lang to the action, which get a translation function. Then translate the forget_password action.
The commands pybabel compile/update/extract need a place to work. Should I include make commands for them?
The commands pybabel compile/update/extract need a place to work. Should I include make commands for them?
yes
After https://github.com/OpenSlides/openslides-backend/issues/948 is implemented, we will need server-side translations for these mails. Either hardcoded with if-else (as long as it's just for this case) or (better) we need to use a python translation framework like babel.