Commit b9b05b3e authored by Samir Sadyhov's avatar Samir Sadyhov 🤔

update NCALayer.js, add i18n

parent 25e5aa75
...@@ -38,7 +38,7 @@ this.NCALayer = { ...@@ -38,7 +38,7 @@ this.NCALayer = {
Cons.hideLoader(); Cons.hideLoader();
me.connect = null; me.connect = null;
console.log('[NCALayer error]', error); console.log('[NCALayer error]', error);
UIkit.modal.alert(`<span>Убедитесь что программа NCALayer запущена и повторите попытку.<br><a href="https://pki.gov.kz/ncalayer/" target="_blank">Инструкция по запуску программы</a></span>`); UIkit.modal.alert(`<span>${i18n.tr('Убедитесь что программа NCALayer запущена и повторите попытку.')}<br><a href="https://pki.gov.kz/ncalayer/" target="_blank">${i18n.tr('Инструкция по запуску программы')}</a></span>`);
} }
this.webSocket.onmessage = function(event) { this.webSocket.onmessage = function(event) {
...@@ -67,7 +67,7 @@ this.NCALayer = { ...@@ -67,7 +67,7 @@ this.NCALayer = {
if(result.responseObject.hasOwnProperty('signedData')) me.verificationKey(); if(result.responseObject.hasOwnProperty('signedData')) me.verificationKey();
} }
} else { } else {
showMessage("Ошибка проверки ключа.", "error"); showMessage(i18n.tr("Ошибка проверки ключа."), "error");
console.log('[NCALayer onmessage error]', result); console.log('[NCALayer onmessage error]', result);
} }
} }
...@@ -101,7 +101,7 @@ this.NCALayer = { ...@@ -101,7 +101,7 @@ this.NCALayer = {
}, },
signDocument: async function(socket){ signDocument: async function(socket){
const { rawdata } = await AS.FORMS.ApiUtils.simpleAsyncGet(`rest/api/docflow/doc/document_info?documentID=${this.documentID}`); const { rawdata } = await AS.FORMS.ApiUtils.simpleAsyncGet(`rest/api/docflow/doc/document_info?documentID=${this.documentID}&locale=${AS.OPTIONS.locale}`);
const param = { const param = {
module: 'kz.arta.synergy.signmodule', module: 'kz.arta.synergy.signmodule',
...@@ -139,7 +139,7 @@ this.NCALayer = { ...@@ -139,7 +139,7 @@ this.NCALayer = {
if(this.successHandler) this.successHandler(this.info); if(this.successHandler) this.successHandler(this.info);
} catch (err) { } catch (err) {
showMessage(err.message, "error"); showMessage(i18n.tr(err.message), "error");
} }
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment