fix not translated tooltip, select options and emptyLabel

This commit is contained in:
ralf 2022-07-26 15:06:07 +02:00
parent 6afd07da03
commit aa80b4027a
3 changed files with 5 additions and 5 deletions

View File

@ -332,7 +332,7 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
return html``;
}
return html`
<sl-menu-item value="">${this.emptyLabel}</sl-menu-item>`;
<sl-menu-item value="">${this.egw().lang(this.emptyLabel)}</sl-menu-item>`;
}
/**
@ -355,9 +355,9 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
// Tag used must match this.optionTag, but you can't use the variable directly.
// Pass option along so SearchMixin can grab it if needed
return html`
<sl-menu-item value="${option.value}" title="${option.title}" class="${option.class}" .option=${option}>
<sl-menu-item value="${option.value}" title="${!option.title || this.noLang ? option.title : this.egw().lang(option.title)}" class="${option.class}" .option=${option}>
${icon}
${option.label}
${this.noLang ? option.label : this.egw().lang(option.label)}
</sl-menu-item>`;
}

View File

@ -195,7 +195,7 @@ export const Et2widgetWithSelectMixin = <T extends Constructor<LitElement>>(supe
*/
_emptyLabelTemplate() : TemplateResult
{
return html`${this.emptyLabel}`;
return html`${this.emptyLabel ? this.egw().lang(this.emptyLabel) : ''}`;
}
/**

View File

@ -227,7 +227,7 @@ const Et2WidgetMixin = <T extends Constructor>(superClass : T) =>
if(this.statustext)
{
this.egw().tooltipBind(this, this.statustext);
this.egw().tooltipBind(this, this.egw().lang(this.statustext));
}
}