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



##########
File path: superset-frontend/src/preamble.ts
##########
@@ -40,7 +40,7 @@ if (typeof window !== 'undefined') {
   if (bootstrapData.common && bootstrapData.common.language_pack) {
     const languagePack = bootstrapData.common.language_pack;
     configure({ languagePack });
-    moment.locale(bootstrapData.common.locale);
+    moment.locale(bootstrapData.common.moment_locale);

Review comment:
       Users can set `LANGUAGES` with any locale or custom flags, but locales 
supported by `moment` is fixed. I think it's easier if we have one Superset 
`locale` config value everywhere and only do the transformation for each 
library when calling that library. The supported locales are enumerable so the 
transformation should be fairly simple.
   
   Either way, I'd recommend limit the scope of this PR to only change humanize 
for CURD list first. i18n is a complex topic, let's proceed with caution.




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