Browse Source
Merge pull request #5278 from ArtemDzhereleiko/bug-fix/markdown-card-widget/custom-translation
[3.2.2] Fix custom translation for markdown card
pull/5285/head
Igor Kulikov
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
1 deletions
-
ui-ngx/src/app/modules/home/components/widget/lib/markdown-widget.component.ts
|
|
|
@ -31,6 +31,7 @@ import { |
|
|
|
import { FormattedData } from '@home/components/widget/lib/maps/map-models'; |
|
|
|
import { hashCode, isNotEmptyStr } from '@core/utils'; |
|
|
|
import cssjs from '@core/css/css'; |
|
|
|
import { UtilsService } from '@core/services/utils.service'; |
|
|
|
|
|
|
|
interface MarkdownWidgetSettings { |
|
|
|
markdownTextPattern: string; |
|
|
|
@ -59,6 +60,7 @@ export class MarkdownWidgetComponent extends PageComponent implements OnInit { |
|
|
|
markdownClass: string; |
|
|
|
|
|
|
|
constructor(protected store: Store<AppState>, |
|
|
|
private utils: UtilsService, |
|
|
|
private cd: ChangeDetectorRef) { |
|
|
|
super(store); |
|
|
|
} |
|
|
|
@ -104,7 +106,7 @@ export class MarkdownWidgetComponent extends PageComponent implements OnInit { |
|
|
|
markdownText = fillPattern(markdownText, replaceInfo, allData); |
|
|
|
} |
|
|
|
if (this.markdownText !== markdownText) { |
|
|
|
this.markdownText = markdownText; |
|
|
|
this.markdownText = this.utils.customTranslation(markdownText, markdownText); |
|
|
|
this.cd.detectChanges(); |
|
|
|
} |
|
|
|
} |
|
|
|
|