Public release from ruodoo-project: 19.0 - 2026-11-08 22:50:01 UTC
This commit is contained in:
23
translation_helper/static/src/webclient.js
Normal file
23
translation_helper/static/src/webclient.js
Normal file
@@ -0,0 +1,23 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import {TranslateMenu} from "@translation_helper/translate/translate_menu";
|
||||
import {WebClient} from "@web/webclient/webclient";
|
||||
import {patch} from "@web/core/utils/patch";
|
||||
import {registry} from "@web/core/registry";
|
||||
import {useOwnTranslateContext} from "@translation_helper/translate/translate_context";
|
||||
|
||||
patch(WebClient.prototype, {
|
||||
setup() {
|
||||
super.setup();
|
||||
useOwnTranslateContext({categories: ["default"]});
|
||||
if (this.env.translate) {
|
||||
registry.category("systray").add(
|
||||
"web.translate_mode_menu",
|
||||
{
|
||||
Component: TranslateMenu,
|
||||
},
|
||||
{sequence: 200}
|
||||
);
|
||||
}
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user