From 06ae750b327f286b61e18775a338ceeb9d4c9242 Mon Sep 17 00:00:00 2001 From: ralf Date: Tue, 6 Sep 2022 10:41:08 +0200 Subject: [PATCH] getting label / tooltip of images to be translated not sure why this is necessary, as Et2Widgets lists label and statustext as to translate ... --- api/js/etemplate/Et2Image/Et2Image.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/Et2Image/Et2Image.ts b/api/js/etemplate/Et2Image/Et2Image.ts index 912f407265..2c59031c97 100644 --- a/api/js/etemplate/Et2Image/Et2Image.ts +++ b/api/js/etemplate/Et2Image/Et2Image.ts @@ -80,6 +80,21 @@ export class Et2Image extends Et2Widget(SlotMixin(LitElement)) implements et2_ID } } + set_label(label) + { + this.label = label; + } + + set label(label) + { + this.__label = this.egw().lang(label); + } + + get label() + { + return this.__label; + } + get slots() { return { @@ -119,9 +134,9 @@ export class Et2Image extends Et2Widget(SlotMixin(LitElement)) implements et2_ID return html` ${this.label}`; }