Skip to content

Commit 7ed7b6d

Browse files
committed
[FIX] translation mode
- On a website with "French" installed, go in translate mode. - Discard. - Change the language of the website to "English". - Enter in translate mode. - The "Blocks" and "Theme" tabs are not selectable as the system thinks it is in translate mode. The problem is that `this.translation` in the `WebsiteBuilder` is not updated when the language of the website is changed.
1 parent 6e36b56 commit 7ed7b6d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

addons/website/static/src/client_actions/website_preview/website_builder_action.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ export class WebsiteBuilder extends Component {
7474
// TODO: to remove: this is only needed to not use the website systray
7575
// when using the "website preview" app.
7676
this.websiteService.useMysterious = true;
77-
this.translation = !!this.props.action.context.params?.edit_translations;
7877

7978
this.overlayRef = useChildRef();
8079
useSubEnv({
@@ -372,6 +371,10 @@ export class WebsiteBuilder extends Component {
372371
return path;
373372
}
374373

374+
get translation() {
375+
return this.websiteService.currentWebsite?.metadata.translatable;
376+
}
377+
375378
async reloadEditor(param = {}) {
376379
this.initialTab = param.initialTab;
377380
this.target = param.target || null;

0 commit comments

Comments
 (0)