GitHub user ViniciusCavalcanteSantos added a comment to the discussion:
Translation of time passed
@dosu
Inside changed_on_humanized `print("LOCALE: ", get_locale())` and it returned
"en" instead of "pt_BR". I already have configured the babel locale on the
superset_config.py with:
```
LANGUAGES = {
"en": {"flag": "us", "name": "English"},
"es": {"flag": "es", "name": "Spanish"},
"pt_BR": {"flag": "br", "name": "Brazilian Portuguese"}
}
BABEL_DEFAULT_LOCALE = 'pt_BR'
```
The other problem is that the code:
```
delta = datetime.utcnow() - self.changed_on
return format_timedelta(delta, granularity='second')
```
returned "in 3 days" instead of something like "3 days ago" as it was before,
in pt_BR it return "em 3 dias", maybe i could use the __() function to
translate it?
GitHub link:
https://github.com/apache/superset/discussions/33630#discussioncomment-13322415
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]