From a3a674399b699df4f00d0a1ef5eae93547f47a32 Mon Sep 17 00:00:00 2001 From: "ismail.yilmaz" Date: Mon, 20 Dec 2021 01:36:19 +0300 Subject: [PATCH] Fixed a l10n issue on confirm dialog --- .../sweetalert2/abp-sweetalert2.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/sweetalert2/abp-sweetalert2.js b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/sweetalert2/abp-sweetalert2.js index f89f6ffed7..4fc9bdba34 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/sweetalert2/abp-sweetalert2.js +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/sweetalert2/abp-sweetalert2.js @@ -4,6 +4,10 @@ var abp = abp || {}; return; } + var localize = function (key) { + return abp.localization.getResource('AbpUi')(key); + }; + /* DEFAULTS *************************************************/ abp.libs = abp.libs || {}; @@ -98,9 +102,10 @@ var abp = abp || {}; }; abp.event.on('abp.configurationInitialized', function () { - var l = abp.localization.getResource('AbpUi'); - - abp.libs.sweetAlert.config.confirm.title = l('AreYouSure'); + abp.libs.sweetAlert.config.confirm.title = localize('AreYouSure'); + abp.libs.sweetAlert.config.confirm.confirmButtonText = localize('Yes'); + abp.libs.sweetAlert.config.confirm.denyButtonText = localize('No'); + abp.libs.sweetAlert.config.confirm.cancelButtonText = localize('Cancel'); abp.libs.sweetAlert.config.confirm.showCancelButton = true; abp.libs.sweetAlert.config.confirm.reverseButtons = true; });