Quatters commented on code in PR #33189:
URL: https://github.com/apache/superset/pull/33189#discussion_r2194809839


##########
superset/utils/core.py:
##########
@@ -1831,3 +1833,10 @@ def get_user_agent(database: Database, source: 
QuerySource | None) -> str:
         return user_agent_func(database, source)
 
     return DEFAULT_USER_AGENT
+
+
+def activate_humanize_locale() -> str:
+    locale = session.get("locale", "en")

Review Comment:
   > Does get_locale method return like so?
   
   Yes, I just checked, switching lang in dropdown causes `get_locale` to 
return selected locale. 
   
   I made a little research about `get_locale`: 
   1. It's standard and centralized way for getting current locale in 
`flask_babel`. 
   2. It's behavior is 
[configurable](https://python-babel.github.io/flask-babel/index.html#configuration:~:text=locale_selector%3Dget_locale)
 (though I don't see any configuration in Superset, so we are using default 
implementation).
   
   Also, bootstrap data object utilizes this function: 
https://github.com/apache/superset/blob/0bc214e8896c8276b0e483735db6f6590dc5a9ca/superset/views/base.py#L384



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to