ktmud commented on a change in pull request #13020:
URL: https://github.com/apache/superset/pull/13020#discussion_r573137765



##########
File path: superset/views/base.py
##########
@@ -327,6 +329,17 @@ def common_bootstrap_payload() -> Dict[str, Any]:
     }
 
 
+def get_moment_locale(locale):
+    moment_locale = locale
+    if "_" in moment_locale:
+        moment_locale = moment_locale.split("_")[0]
+
+    flag = conf.get("LANGUAGES").get(locale).get("flag")

Review comment:
       I'd prefer not to add them in the configs as the languages are 
enumerable and there seems to be an easy way to transform between each. You may 
create an util function on both backend and frontend to consolidate the format 
for each library.
   
   




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to