Merge pull request #9713 from deaflynx/fix/count-widget-label-custom-translation

CountWidget added label custom translation
This commit is contained in:
Igor Kulikov 2023-12-05 17:59:33 +02:00 committed by GitHub
commit 272aabb858
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,6 +42,7 @@ import {
} from '@home/components/widget/lib/count/count-widget.models';
import { coerceBoolean } from '@shared/decorators/coercion';
import { ResizeObserver } from '@juggle/resize-observer';
import { UtilsService } from '@core/services/utils.service';
const layoutHeight = 36;
const layoutHeightWithTitle = 60;
@ -104,6 +105,7 @@ export class CountWidgetComponent implements OnInit, AfterViewInit, OnDestroy {
private hasTitle = false;
constructor(private renderer: Renderer2,
private utils: UtilsService,
private cd: ChangeDetectorRef) {
}
@ -114,7 +116,7 @@ export class CountWidgetComponent implements OnInit, AfterViewInit, OnDestroy {
this.layout = this.settings.layout;
this.showLabel = this.settings.showLabel;
this.label = this.settings.label;
this.label = this.utils.customTranslation(this.settings.label, this.settings.label);
this.labelStyle = textStyle(this.settings.labelFont);
this.labelColor = ColorProcessor.fromSettings(this.settings.labelColor);