Commit 36cda0f09cc5a88ee226a1a708f4d5b98fe32825

Authored by Igor Kulikov
Committed by GitHub
2 parents 5a28def3 49d9f37c

Merge pull request #5278 from ArtemDzhereleiko/bug-fix/markdown-card-widget/custom-translation

[3.2.2] Fix custom translation for markdown card
... ... @@ -31,6 +31,7 @@ import {
31 31 import { FormattedData } from '@home/components/widget/lib/maps/map-models';
32 32 import { hashCode, isNotEmptyStr } from '@core/utils';
33 33 import cssjs from '@core/css/css';
  34 +import { UtilsService } from '@core/services/utils.service';
34 35
35 36 interface MarkdownWidgetSettings {
36 37 markdownTextPattern: string;
... ... @@ -59,6 +60,7 @@ export class MarkdownWidgetComponent extends PageComponent implements OnInit {
59 60 markdownClass: string;
60 61
61 62 constructor(protected store: Store<AppState>,
  63 + private utils: UtilsService,
62 64 private cd: ChangeDetectorRef) {
63 65 super(store);
64 66 }
... ... @@ -104,7 +106,7 @@ export class MarkdownWidgetComponent extends PageComponent implements OnInit {
104 106 markdownText = fillPattern(markdownText, replaceInfo, allData);
105 107 }
106 108 if (this.markdownText !== markdownText) {
107   - this.markdownText = markdownText;
  109 + this.markdownText = this.utils.customTranslation(markdownText, markdownText);
108 110 this.cd.detectChanges();
109 111 }
110 112 }
... ...