Skip to content

Commit

Permalink
fix(theme-shared): fix confirmation and toast localizations
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmet-erim committed Jan 10, 2020
1 parent b32718e commit 423192e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
</div>
<div class="content">
<h1 class="title" *ngIf="data.title">
{{ title }}
{{ data.title | abpLocalization: data.options?.titleLocalizationParams }}
</h1>
<p class="message" *ngIf="data.message">
{{ message }}
{{ data.message | abpLocalization: data.options?.messageLocalizationParams }}
</p>
</div>
<div class="footer">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,6 @@ export class ConfirmationComponent {
}
}

get title(): string {
return this.localizationService.instant(
this.data.title,
...(this.data.options.titleLocalizationParams || []),
);
}

get message(): string {
return this.localizationService.instant(
this.data.message,
...(this.data.options.messageLocalizationParams || []),
);
}

constructor(
private confirmationService: ConfirmationService,
private localizationService: LocalizationService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<i class="fa fa-times"></i>
</button>
<div class="toast-title">
{{ toast.title | abpLocalization: messageLocalizationParams }}
{{ toast.title | abpLocalization: toast.options?.titleLocalizationParams }}
</div>
<div class="toast-message">
{{ toast.message | abpLocalization: titleLocalizationParams }}
{{ toast.message | abpLocalization: toast.options?.messageLocalizationParams }}
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,6 @@ export class ToastComponent implements OnInit {
}
}

get titleLocalizationParams(): string {
return this.localizationService.instant(
this.toast.title,
...this.toast.options.titleLocalizationParams,
);
}

get messageLocalizationParams() {
return this.localizationService.instant(
this.toast.message,
...this.toast.options.messageLocalizationParams,
);
}

constructor(
private toastService: ToasterService,
private localizationService: LocalizationService,
Expand Down

0 comments on commit 423192e

Please sign in to comment.