alex-poor commented on code in PR #40679:
URL: https://github.com/apache/superset/pull/40679#discussion_r4034721792


##########
superset-frontend/src/dashboard/actions/hydrate.ts:
##########
@@ -403,6 +405,12 @@ export const hydrateDashboard =
           // only persistent refreshFrequency will be saved to backend
           shouldPersistRefreshFrequency: false,
           css: dashboard.css || '',
+          // Display-only localized title; the canonical title lives in the
+          // header layout meta (meta.text) and is what edits/saves operate on.
+          localizedTitle: dashboard.localized_title,

Review Comment:
   Fixed in fa68898 — the preview now clears `localized_title`, so the header 
falls back to the historical canonical title. Your point about the feature 
being off is the part that makes this worse than a wrong translation: 
`localized_title` mirrors the live canonical title in that case, so a preview 
would have shown the *live* name over historical content in a deployment with 
no hook configured at all.
   
   Added the renamed-title preview test you asked for: it seeds a live 
translation, previews a snapshot with a different title, and asserts the 
hydrated dashboard carries the snapshot title with no translation attached.



##########
superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.tsx:
##########
@@ -762,6 +762,15 @@ const Chart = (props: ChartProps) => {
           props.updateSliceName(props.id, name)
         }
         sliceName={props.sliceName}
+        localizedName={

Review Comment:
   Fixed in fa68898 — the displayed name is now carried on the slice object the 
controls receive, and both strings follow it. It is resolved once in `Chart`, 
using the same rule as the header title, so a panel title override wins over 
the translation and the two cannot drift apart.
   
   Kept `slice_name` for the cases you singled out and one more: edits, the 
image/PDF/pivot-XLSX download filenames, and the extension menu payload, where 
a third party is receiving an identifier rather than a label. Covered by a test 
asserting the tooltip reads "Click to edit Ventes" and the modal "Chart Data: 
Ventes".



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