Merge pull request #9713 from deaflynx/fix/count-widget-label-custom-translation
CountWidget added label custom translation
This commit is contained in:
commit
272aabb858
@ -42,6 +42,7 @@ import {
|
|||||||
} from '@home/components/widget/lib/count/count-widget.models';
|
} from '@home/components/widget/lib/count/count-widget.models';
|
||||||
import { coerceBoolean } from '@shared/decorators/coercion';
|
import { coerceBoolean } from '@shared/decorators/coercion';
|
||||||
import { ResizeObserver } from '@juggle/resize-observer';
|
import { ResizeObserver } from '@juggle/resize-observer';
|
||||||
|
import { UtilsService } from '@core/services/utils.service';
|
||||||
|
|
||||||
const layoutHeight = 36;
|
const layoutHeight = 36;
|
||||||
const layoutHeightWithTitle = 60;
|
const layoutHeightWithTitle = 60;
|
||||||
@ -104,6 +105,7 @@ export class CountWidgetComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
private hasTitle = false;
|
private hasTitle = false;
|
||||||
|
|
||||||
constructor(private renderer: Renderer2,
|
constructor(private renderer: Renderer2,
|
||||||
|
private utils: UtilsService,
|
||||||
private cd: ChangeDetectorRef) {
|
private cd: ChangeDetectorRef) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,7 +116,7 @@ export class CountWidgetComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
this.layout = this.settings.layout;
|
this.layout = this.settings.layout;
|
||||||
|
|
||||||
this.showLabel = this.settings.showLabel;
|
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.labelStyle = textStyle(this.settings.labelFont);
|
||||||
this.labelColor = ColorProcessor.fromSettings(this.settings.labelColor);
|
this.labelColor = ColorProcessor.fromSettings(this.settings.labelColor);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user