提交 82b486a0 编写于 作者: Q qiang

feat(App): uni.app.quit i18n

上级 a7fa5ba5
{ {
"uni.app.quit": "Press back button again to exit",
"uni.async.error": "The connection timed out, click the screen to try again.", "uni.async.error": "The connection timed out, click the screen to try again.",
"uni.showActionSheet.cancel": "Cancel", "uni.showActionSheet.cancel": "Cancel",
"uni.showToast.unpaired": "Please note showToast must be paired with hideToast", "uni.showToast.unpaired": "Please note showToast must be paired with hideToast",
......
{ {
"uni.app.quit": "Pulse otra vez para salir",
"uni.async.error": "Se agotó el tiempo de conexión, haga clic en la pantalla para volver a intentarlo.", "uni.async.error": "Se agotó el tiempo de conexión, haga clic en la pantalla para volver a intentarlo.",
"uni.showActionSheet.cancel": "Cancelar", "uni.showActionSheet.cancel": "Cancelar",
"uni.showToast.unpaired": "Tenga en cuenta que showToast debe estar emparejado con hideToast", "uni.showToast.unpaired": "Tenga en cuenta que showToast debe estar emparejado con hideToast",
......
{ {
"uni.app.quit": "Appuyez à nouveau pour quitter l'application",
"uni.async.error": "La connexion a expiré, cliquez sur l'écran pour réessayer.", "uni.async.error": "La connexion a expiré, cliquez sur l'écran pour réessayer.",
"uni.showActionSheet.cancel": "Annuler", "uni.showActionSheet.cancel": "Annuler",
"uni.showToast.unpaired": "Veuillez noter que showToast doit être associé à hideToast", "uni.showToast.unpaired": "Veuillez noter que showToast doit être associé à hideToast",
......
{ {
"uni.app.quit": "再按一次退出应用",
"uni.async.error": "连接服务器超时,点击屏幕重试", "uni.async.error": "连接服务器超时,点击屏幕重试",
"uni.showActionSheet.cancel": "取消", "uni.showActionSheet.cancel": "取消",
"uni.showToast.unpaired": "请注意 showToast 与 hideToast 必须配对使用", "uni.showToast.unpaired": "请注意 showToast 与 hideToast 必须配对使用",
......
{ {
"uni.app.quit": "再按一次退出應用",
"uni.async.error": "連接服務器超時,點擊屏幕重試", "uni.async.error": "連接服務器超時,點擊屏幕重試",
"uni.showActionSheet.cancel": "取消", "uni.showActionSheet.cancel": "取消",
"uni.showToast.unpaired": "請注意 showToast 與 hideToast 必須配對使用", "uni.showToast.unpaired": "請注意 showToast 與 hideToast 必須配對使用",
......
...@@ -15,12 +15,16 @@ import { ...@@ -15,12 +15,16 @@ import {
closeWebview closeWebview
} from './util' } from './util'
import {
t
} from 'uni-core/helpers/i18n'
let firstBackTime = 0 let firstBackTime = 0
function quit () { function quit () {
if (!firstBackTime) { if (!firstBackTime) {
firstBackTime = Date.now() firstBackTime = Date.now()
plus.nativeUI.toast('再按一次退出应用') plus.nativeUI.toast(t('uni.app.quit'))
setTimeout(() => { setTimeout(() => {
firstBackTime = null firstBackTime = null
}, 2000) }, 2000)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册