Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localize Widget - accident_count_by_day_night #2524

Open
atalyaalon opened this issue Dec 31, 2023 · 1 comment
Open

Localize Widget - accident_count_by_day_night #2524

atalyaalon opened this issue Dec 31, 2023 · 1 comment
Assignees

Comments

@atalyaalon
Copy link
Collaborator

atalyaalon commented Dec 31, 2023

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
Screenshot 2023-12-31 at 17 32 24

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:

  1. Go to anyway container: docker exec -it anyway bash
  2. 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 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
@atalyaalon
Copy link
Collaborator Author

Itamar this is blocked by #2532

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants