Widget Fields
Fields in Widget to localize: day_night
Additional context
Graph is not localized properly
DO NOT LOCALIZE SEGMENT NAME, that's a different issue
Example for widget data localizeaion
Check out the localize_items code in this widget: most_severe_accidents_table_widget
Flask Babel
For updating messages.pot with all strings for translation - use the following commands:
Go to anyway container: docker exec -it anyway bash
Perform the following updates inside anyway container:
pybabel extract -F babel.cfg -o messages.pot .
For updating existing po files with new strings: pybabel update -i messages.pot -d translations
Update manually the translations: modify translation files - po files per language.
For compiling pybabel mo files use: pybabel compile -d translationsIt's important to compile the files for the transations to take placeMake sure to add all po, mo and pot files to pull request
Widget ID accident_count_by_day_night
Widget Fields Fields in Widget to localize: day_night
Additional context Graph is not localized properly DO NOT LOCALIZE SEGMENT NAME, that's a different issue
Example for widget data localizeaion Check out the localize_items code in this widget: most_severe_accidents_table_widget
Flask Babel For updating messages.pot with all strings for translation - use the following commands:
docker exec -it anyway bash
pybabel extract -F babel.cfg -o messages.pot .
pybabel update -i messages.pot -d translations
pybabel compile -d translations
It's important to compile the files for the transations to take place Make sure to add all po, mo and pot files to pull request