@inspark/inspark-components 14.0.42 → 14.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/full/esm2020/services/inspark-message.service.mjs +9 -3
- package/full/fesm2015/inspark-inspark-components.mjs +8 -2
- package/full/fesm2015/inspark-inspark-components.mjs.map +1 -1
- package/full/fesm2020/inspark-inspark-components.mjs +8 -2
- package/full/fesm2020/inspark-inspark-components.mjs.map +1 -1
- package/full/package.json +1 -1
- package/interface/package.json +1 -1
- package/package.json +1 -1
|
@@ -375,7 +375,13 @@ class InsparkMessageService {
|
|
|
375
375
|
this.messageService.add(options);
|
|
376
376
|
}
|
|
377
377
|
confirm(message, options) {
|
|
378
|
-
|
|
378
|
+
if (options.acceptLabel) {
|
|
379
|
+
options.acceptLabel = this.translate.instant(gettext(options.acceptLabel));
|
|
380
|
+
}
|
|
381
|
+
if (options.rejectLabel) {
|
|
382
|
+
options.rejectLabel = this.translate.instant(gettext(options.rejectLabel));
|
|
383
|
+
}
|
|
384
|
+
this.translate.get(gettext(message)).subscribe((res) => {
|
|
379
385
|
this.confirmationService.confirm({
|
|
380
386
|
...options,
|
|
381
387
|
message: res
|
|
@@ -400,7 +406,7 @@ class InsparkMessageService {
|
|
|
400
406
|
error(message) {
|
|
401
407
|
const title = this.getToastErrorTitleLocalized();
|
|
402
408
|
// this.translate.get(gettext('Toast_Error_Caption')).subscribe((title: string) => {
|
|
403
|
-
this.translate.get(message).subscribe((res) => {
|
|
409
|
+
this.translate.get(gettext(message)).subscribe((res) => {
|
|
404
410
|
this.messageService.add({ severity: 'error', summary: title, detail: res });
|
|
405
411
|
});
|
|
406
412
|
// });
|