alex-poor commented on code in PR #40679:
URL: https://github.com/apache/superset/pull/40679#discussion_r3877191009
##########
superset-frontend/src/views/CRUD/types.ts:
##########
@@ -61,7 +61,11 @@ export interface Dashboard {
changed_on_utc?: string;
changed_by: string;
dashboard_title: string;
+ // Title resolved for the viewer's locale (read-only); falls back to
+ // dashboard_title. Present only when asset-metadata translation is enabled.
+ localized_title?: string;
slice_name?: string;
+ localized_name?: string;
Review Comment:
Acted on in 5d2015956 — though the premise needs one correction. This type
is not dashboard-only: `slice_name` has been on it since the home screen MVP
(#11206), because the home activity list renders chart, dashboard and
saved-query entities through a single `ActivityObject` union. So a chart field
beside `slice_name` is consistent rather than misplaced, and I have added the
comment saying so.
Your underlying point was right, though, and better than the one you made:
nothing was reading either localized field there. `getEntityTitle` returned the
canonical name for entities fetched from the chart and dashboard APIs, so only
activity-log rows -- whose `item_title` is resolved server-side -- were
localized. The home fetch selects no explicit columns, so those responses
already carry the resolved names; it now uses them, and the home list agrees
with the chart and dashboard lists.
--
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]