Public release from ruodoo-project: 19.0 - 2026-09-20 21:17:41 UTC
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import {_t} from "@web/core/l10n/translation";
|
||||
import {browser} from "@web/core/browser/browser";
|
||||
import {registry} from "@web/core/registry";
|
||||
import {routeToUrl} from "@web/core/browser/router";
|
||||
|
||||
function leaveTranslateMode({env}) {
|
||||
return {
|
||||
type: "item",
|
||||
description: _t("Leave the Translate Tools"),
|
||||
callback: () => {
|
||||
const route = env.services.router.current;
|
||||
route.search.translate = "";
|
||||
browser.location.href = browser.location.origin + routeToUrl(route);
|
||||
},
|
||||
sequence: 450,
|
||||
};
|
||||
}
|
||||
|
||||
registry.category("translate").category("default").add("leaveTranslateMode", leaveTranslateMode);
|
||||
Reference in New Issue
Block a user