dosubot[bot] commented on issue #31790: URL: https://github.com/apache/superset/issues/31790#issuecomment-2582682796
<!-- Answer --> The issue you're experiencing with the 'adaptive' datetime formatting option reverting to English month names instead of using your custom D3 datetime format is likely due to how the 'adaptive' option is implemented in Superset. The 'adaptive' option, when set, uses a dynamic formatter based on the data's granularity and does not automatically apply custom D3 formats specified in `superset_config.py` for localization <sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts)</sup><sup>[[2]](https://github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-chart-controls/src/utils/D3Formatting.ts)</sup>. To address this, you might need to ensure that the locale settings are correctly applied when using the 'adaptive' option. The `createSmartDateFormatter` function in the codebase supports a `locale` parameter, which can be used to provide non-English month and day names <sup>[[3]](https://github.com/apache/superset/blob/master/superset-frontend/packages/superset-ui-core/src/time-format/formatters/smartDate.ts)</sup>. However, it seems that this locale parameter might not be automatically linked to the custom D3 formats defined in `superset_config.py`. A potential workaround could be to explicitly set the locale in the frontend code where the formatter is applied, ensuring that your custom month and day names are used. This might require modifying the Superset codebase to pass the locale information from your configuration to the formatter. If this approach is not feasible, consider using a specific D3 format instead of 'adaptive' to ensure your custom settings are applied. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/5c0fc451-1bcb-4457-b6e0-8df00968b33a?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/5c0fc451-1bcb-4457-b6e0-8df00968b33a?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/5c0fc451-1bcb-4457-b6e0-8df00968b33a?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/5c0fc451-1bcb-4457-b6e0-8df00968b33a?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5c0fc451-1bcb-4457-b6e0-8df00968b33a?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/5c0fc451-1bcb-4457-b6e0-8df00968b33a?feedback_type=other)</sup> -- 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