PolinaFam commented on code in PR #34051:
URL: https://github.com/apache/superset/pull/34051#discussion_r2206623960


##########
superset-frontend/src/preamble.ts:
##########
@@ -26,6 +26,20 @@ import setupFormatters from './setup/setupFormatters';
 import setupDashboardComponents from './setup/setupDashboardComponents';
 import { User } from './types/bootstrapTypes';
 import getBootstrapData, { applicationRoot } from './utils/getBootstrapData';
+import 'dayjs/locale/en';

Review Comment:
   String `dayjs.locale(bootstrapData.common.locale);` in `preamble.ts` has no 
effect without these imports



##########
superset/models/helpers.py:
##########
@@ -544,13 +545,28 @@ def changed_on_utc(self) -> str:
         # Convert naive datetime to UTC
         return 
self.changed_on.astimezone(pytz.utc).strftime("%Y-%m-%dT%H:%M:%S.%f%z")
 
+    def _format_time_humanized(self, timestamp: datetime) -> str:

Review Comment:
   The problem with time-related strings is connected not only with `humanize` 
but also with `dayjs`. It is described in PR Summary



##########
superset-frontend/src/explore/components/controls/DateFilterControl/tests/CustomFrame.test.tsx:
##########
@@ -26,6 +26,7 @@ import {
   waitFor,
 } from 'spec/helpers/testing-library';
 import { CustomFrame } from '../components';
+import 'dayjs/locale/fr';

Review Comment:
   Test `should translate Date Picker` requires `fr` locale



-- 
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: [email protected]

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