diff --git a/src/locales/en-US.json b/src/locales/en-US.json index 29a0ae4c0b..c80473fb1e 100644 --- a/src/locales/en-US.json +++ b/src/locales/en-US.json @@ -384,8 +384,10 @@ "errorReplaceCertificate": "Error replacing certificate.", "errorGenerateCsr": "Error generating CSR.", "successAddCertificate": "Successfully added %{certificate}.", + "successAddedHTTPCertificate": "Successfully added %{certificate}. Reload the browser page to see the changes.", "successDeleteCertificate": "Successfully deleted %{certificate}.", - "successReplaceCertificate": "Successfully replaced %{certificate}." + "successReplaceCertificate": "Successfully replaced %{certificate}.", + "successReplacedHTTPCertificate": "Successfully replaced %{certificate}. Reload the browser page to see the changes." } }, "pageChangePassword": { diff --git a/src/store/modules/SecurityAndAccess/CertificatesStore.js b/src/store/modules/SecurityAndAccess/CertificatesStore.js index 4b599ec256..832d6b4ade 100644 --- a/src/store/modules/SecurityAndAccess/CertificatesStore.js +++ b/src/store/modules/SecurityAndAccess/CertificatesStore.js @@ -211,9 +211,21 @@ export const CertificatesStore = defineStore('certificates', { }) .then(() => this.getCertificates()) .then(() => { - return i18n.global.t('pageCertificates.toast.successAddCertificate', { - certificate: getCertificateProp(type, 'label'), - }); + if (typeOfCertificate === 'HTTPS Certificate') { + return i18n.global.t( + 'pageCertificates.toast.successAddedHTTPCertificate', + { + certificate: getCertificateProp(type, 'label'), + } + ); + } else { + return i18n.global.t( + 'pageCertificates.toast.successAddCertificate', + { + certificate: getCertificateProp(type, 'label'), + } + ); + } }) .catch((error) => { console.log(error); @@ -269,12 +281,21 @@ export const CertificatesStore = defineStore('certificates', { this.getCertificates(); }) .then(() => { - return i18n.global.t( - 'pageCertificates.toast.successReplaceCertificate', - { - certificate: getCertificateProp(type, 'label'), - } - ); + if (typeOfCertificate === 'HTTPS Certificate') { + return i18n.global.t( + 'pageCertificates.toast.successReplacedHTTPCertificate', + { + certificate: getCertificateProp(type, 'label'), + } + ); + } else { + return i18n.global.t( + 'pageCertificates.toast.successReplaceCertificate', + { + certificate: getCertificateProp(type, 'label'), + } + ); + } }) .catch((error) => { console.log(error);