-
I have referred to the documentation here and it is not clear to me. Do I need to change anything in my configuration? My babel.cfg is very similar to the documented example:
Upon running I have tried setting my domain to security, to no effect: What am I missing here? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I get confused with babel as well.. So tell me a bit more about your directory structure - did you copy ALL the templates/security/** into your project? I am sure pybabel isnt going to look in site-packages! I assume you are using Flask-Security-Too 4.0.0 - in that case the templates actually reference Flask-Security translations directly and should work even if you copied and modified the template. And don't set your domain to 'security'... Out of the box, if you use flask-security templates (not copied) then translations should work - might be worth quickly making sure that is the case. |
Beta Was this translation helpful? Give feedback.
-
Hmm - I think that is way too much work - as you have seen - translations come from code as well as templates. One thought would be to simply fork flask-security-too - add a new translations directory for your LANG type - then run I haven't played with it - but it is possible you could simply copy an existing .po file and modify it. BABEL_TRANSLATIONS_DIRECTORIES can be set to point to your translations directory I believe... Sorry - all a bit vague - hopefully give you some ideas. You are more than welcome to submit a PR with your translations (as many as you do). |
Beta Was this translation helpful? Give feedback.
Hmm - I think that is way too much work - as you have seen - translations come from code as well as templates.
One thought would be to simply fork flask-security-too - add a new translations directory for your LANG type - then run
python setup.py update_catalog - that should create a .po file you can modify to add the translations.
I haven't played with it - but it is possible you could simply copy an existing .po file and modify it. BABEL_TRANSLATIONS_DIRECTORIES can be set to point to your translations directory I believe...
Sorry - all a bit vague - hopefully give you some ideas.
You are more than welcome to submit a PR with your translations (as many as you do).