update translation of downloading updates

This commit is contained in:
printempw 2017-01-02 15:31:46 +08:00
parent 8790f4b630
commit 30fb7bdedf
3 changed files with 14 additions and 7 deletions

View File

@ -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('<i class="fa fa-spinner fa-spin"></i> 正在准备').prop('disabled', 'disabled');
$('#update-button').html('<i class="fa fa-spinner fa-spin"></i> '+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('<i class="fa fa-spinner fa-spin"></i> ' + trans('admin.extracting'));
$('.modal-body').append('<p>'+trans('admin.downloadCompleted')+'</p>')
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);

View File

@ -138,7 +138,11 @@
statusDisabled: '已禁用',
enablePlugin: '启用插件',
disablePlugin: '禁用插件',
confirmDeletion: '真的要删除这个插件吗?'
confirmDeletion: '真的要删除这个插件吗?',
preparing: '正在准备',
downloadCompleted: '更新包下载完成',
extracting: '正在解压更新包'
},
utils: {
fatalError: '严重错误(请联系作者)'

View File

@ -117,10 +117,10 @@
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">{{ trans('admin.update.downloading') }}</h4>
<h4 class="modal-title">{{ trans('admin.update.download.downloading') }}</h4>
</div>
<div class="modal-body">
<p>{{ trans('admin.update.size') }}<span id="file-size">0</span> Bytes</p>
<p>{{ trans('admin.update.download.size') }}<span id="file-size">0</span> Bytes</p>
<div class="progress">
<div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
<span id="imported-progress">0</span>%