From 30fb7bdedf637d6a09edc03710ff00bfcb91b039 Mon Sep 17 00:00:00 2001 From: printempw Date: Mon, 2 Jan 2017 15:31:46 +0800 Subject: [PATCH] update translation of downloading updates --- resources/assets/src/js/admin.js | 11 +++++++---- resources/lang/zh_CN/locale.js | 6 +++++- resources/views/admin/update.tpl | 4 ++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/resources/assets/src/js/admin.js b/resources/assets/src/js/admin.js index 6b92e4ca..fb58c3c8 100644 --- a/resources/assets/src/js/admin.js +++ b/resources/assets/src/js/admin.js @@ -2,7 +2,7 @@ * @Author: printempw * @Date: 2016-07-22 14:02:44 * @Last Modified by: printempw - * @Last Modified time: 2017-01-02 12:11:43 + * @Last Modified time: 2017-01-02 15:30:42 */ 'use strict'; @@ -367,7 +367,7 @@ function downloadUpdates() { type: 'GET', dataType: 'json', beforeSend: function() { - $('#update-button').html(' 正在准备').prop('disabled', 'disabled'); + $('#update-button').html(' '+trans('admin.preparing')).prop('disabled', 'disabled'); }, }) .done(function(json) { @@ -405,7 +405,8 @@ function downloadUpdates() { if (progress == 100) { clearInterval(interval_id); - toastr.success('正在解压更新包'); + $('.modal-title').html(' ' + trans('admin.extracting')); + $('.modal-body').append('

'+trans('admin.downloadCompleted')+'

') console.log("Start extracting"); $.ajax({ @@ -414,7 +415,7 @@ function downloadUpdates() { dataType: 'json' }) .done(function(json) { - console.log("Files covered"); + console.log("Package extracted and files are covered"); $('#modal-start-download').modal('toggle'); swal({ @@ -422,6 +423,8 @@ function downloadUpdates() { html: json.msg }).then(function() { window.location = "../"; + }, function(dismiss) { + window.location = "../"; }); }) .fail(showAjaxError); diff --git a/resources/lang/zh_CN/locale.js b/resources/lang/zh_CN/locale.js index e58a440e..ca2dcb3f 100644 --- a/resources/lang/zh_CN/locale.js +++ b/resources/lang/zh_CN/locale.js @@ -138,7 +138,11 @@ statusDisabled: '已禁用', enablePlugin: '启用插件', disablePlugin: '禁用插件', - confirmDeletion: '真的要删除这个插件吗?' + confirmDeletion: '真的要删除这个插件吗?', + + preparing: '正在准备', + downloadCompleted: '更新包下载完成', + extracting: '正在解压更新包' }, utils: { fatalError: '严重错误(请联系作者)' diff --git a/resources/views/admin/update.tpl b/resources/views/admin/update.tpl index a6593ce5..65dc9c44 100644 --- a/resources/views/admin/update.tpl +++ b/resources/views/admin/update.tpl @@ -117,10 +117,10 @@