From a7fa5ba5b847dfa97a266b58b690de9009413585 Mon Sep 17 00:00:00 2001 From: qiang Date: Tue, 9 Mar 2021 19:01:21 +0800 Subject: [PATCH] feat(App): uni.startSoterAuthentication i18n --- src/core/helpers/i18n/en.json | 1 + src/core/helpers/i18n/es.json | 1 + src/core/helpers/i18n/fr.json | 1 + src/core/helpers/i18n/zh-Hans.json | 1 + src/core/helpers/i18n/zh-Hant.json | 1 + .../app-plus/service/api/device/soter-authentication.js | 5 ++++- 6 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/core/helpers/i18n/en.json b/src/core/helpers/i18n/en.json index b88904b88..9e9d23a92 100644 --- a/src/core/helpers/i18n/en.json +++ b/src/core/helpers/i18n/en.json @@ -21,6 +21,7 @@ "uni.scanCode.fail": "Recognition failure", "uni.scanCode.flash.on": "Tap to turn light on", "uni.scanCode.flash.off": "Tap to turn light off", + "uni.startSoterAuthentication.authContent": "Fingerprint recognition", "uni.picker.done": "Done", "uni.picker.cancel": "Cancel", "uni.video.danmu": "Danmu", diff --git a/src/core/helpers/i18n/es.json b/src/core/helpers/i18n/es.json index b2a9c113b..0c106b1eb 100644 --- a/src/core/helpers/i18n/es.json +++ b/src/core/helpers/i18n/es.json @@ -21,6 +21,7 @@ "uni.scanCode.fail": "Échec de la reconnaissance", "uni.scanCode.flash.on": "Toque para encender la luz", "uni.scanCode.flash.off": "Toque para apagar la luz", + "uni.startSoterAuthentication.authContent": "Reconocimiento de huellas dactilares", "uni.picker.done": "OK", "uni.picker.cancel": "Cancelar", "uni.video.danmu": "Danmu", diff --git a/src/core/helpers/i18n/fr.json b/src/core/helpers/i18n/fr.json index 61e235c2a..89ed22f0f 100644 --- a/src/core/helpers/i18n/fr.json +++ b/src/core/helpers/i18n/fr.json @@ -21,6 +21,7 @@ "uni.scanCode.fail": "Fallo de reconocimiento", "uni.scanCode.flash.on": "Appuyez pour activer l'éclairage", "uni.scanCode.flash.off": "Appuyez pour désactiver l'éclairage", + "uni.startSoterAuthentication.authContent": "Reconnaissance de l'empreinte digitale", "uni.picker.done": "OK", "uni.picker.cancel": "Annuler", "uni.video.danmu": "Danmu", diff --git a/src/core/helpers/i18n/zh-Hans.json b/src/core/helpers/i18n/zh-Hans.json index 7feae1018..16d0010dd 100644 --- a/src/core/helpers/i18n/zh-Hans.json +++ b/src/core/helpers/i18n/zh-Hans.json @@ -21,6 +21,7 @@ "uni.scanCode.fail": "识别失败", "uni.scanCode.flash.on": "轻触照亮", "uni.scanCode.flash.off": "轻触关闭", + "uni.startSoterAuthentication.authContent": "指纹识别中...", "uni.picker.done": "完成", "uni.picker.cancel": "取消", "uni.video.danmu": "弹幕", diff --git a/src/core/helpers/i18n/zh-Hant.json b/src/core/helpers/i18n/zh-Hant.json index c29388ea4..888f74173 100644 --- a/src/core/helpers/i18n/zh-Hant.json +++ b/src/core/helpers/i18n/zh-Hant.json @@ -21,6 +21,7 @@ "uni.scanCode.fail": "識別失敗", "uni.scanCode.flash.on": "輕觸照亮", "uni.scanCode.flash.off": "輕觸關閉", + "uni.startSoterAuthentication.authContent": "指紋識別中...", "uni.picker.done": "完成", "uni.picker.cancel": "取消", "uni.video.danmu": "彈幕", diff --git a/src/platforms/app-plus/service/api/device/soter-authentication.js b/src/platforms/app-plus/service/api/device/soter-authentication.js index 7ac69ee12..d8ea1e95a 100644 --- a/src/platforms/app-plus/service/api/device/soter-authentication.js +++ b/src/platforms/app-plus/service/api/device/soter-authentication.js @@ -2,6 +2,9 @@ import { invoke, requireNativePlugin } from '../../bridge' +import { + t +} from 'uni-core/helpers/i18n' function checkIsSupportFaceID () { const platform = plus.os.name.toLowerCase() @@ -128,7 +131,7 @@ export function startSoterAuthentication ({ const realAuthMode = enrolledRequestAuthMode[0] if (realAuthMode === 'fingerPrint') { if (plus.os.name.toLowerCase() === 'android') { - plus.nativeUI.showWaiting(authContent || '指纹识别中...').onclose = function () { + plus.nativeUI.showWaiting(authContent || t('uni.startSoterAuthentication.authContent')).onclose = function () { plus.fingerprint.cancel() } } -- GitLab