diff --git a/index.html b/index.html index 17cff04..3938040 100644 --- a/index.html +++ b/index.html @@ -11,15 +11,16 @@ - - + + + -

X关闭

+

X关闭close

- +
@@ -37,8 +38,7 @@ @@ -46,12 +46,14 @@

-

上传分享您的文件

+

上传分享您的文件Upload and share your files



-

托管于华为云对象存储,文件保留24小时,快来尝试吧~

-

如果需要永久储存图片,请使用呓喵酱の图床

+ +

托管于华为云对象存储,文件保留24小时,快来尝试吧~

+

如果需要永久储存图片,请使用呓喵酱の图床

Hosted in HUAWEI CLOUD Object Storage, files are kept for 24 hours, come and try~

+

If you need to store pictures permanently, please use 呓喵酱の图床

- 开始上传 + 开始上传Start upload

diff --git a/js/jquery.imageuploader.js b/js/jquery.imageuploader.js index 707ded3..a4693bd 100644 --- a/js/jquery.imageuploader.js +++ b/js/jquery.imageuploader.js @@ -149,7 +149,10 @@ } size = 0; $('#disabled').attr("disabled", true); - $('#disabled').text('上传中,请稍等......'); + if(page.tran.getLang() == 'zh') + $('#disabled').text('上传中,请稍等......'); + else + $('#disabled').text('Uploading......'); $.ajax({ type: 'POST', url: options.ajaxUrl+'?fp='+page.fp, @@ -162,7 +165,11 @@ clearInterval(_timer); if (res.code >= 300) { console.info(res.code); - alert('上传时发生了点小插曲,请打开控制器查看原因!') + if(page.tran.getLang() == 'zh') + alert('上传时发生了点小插曲,请打开控制器查看原因!'); + else + alert('An accident occurred during upload, please open the console to check the reason!'); + }else{ $('#text').show(); let s = ''; @@ -170,30 +177,48 @@ s += res.data[i]; s += '\n\n' } - tips.info({ - title: 'info', - message: '请耐心等待几分钟使链接生效哦~' - }); - tips.success({ - title: 'success', - message: '生成链接成功!!' - }); + + if(page.tran.getLang() == 'zh') + tips.info({ + message: '请耐心等待几分钟使链接生效哦~' + }); + else + tips.info({ + message: 'Please wait a few minutes for the link to take effect~' + }); + if(page.tran.getLang() == 'zh') + tips.success({ + message: '生成链接成功!!' + }); + else + tips.success({ + message: 'Link generated successfully!!' + }); $('#text').val(s); } $('#disabled').attr("disabled", false); $('.js-upload-remove-button').click(); - $('#disabled').text('上传选择的文件') + if(page.tran.getLang() == 'zh') + $('#disabled').text('上传选择的文件') + else + $('#disabled').text('Choose files to upload') }, xhr: xhrOnProgress(function(e) { if ((Math.floor(e.loaded / e.total * 100) - 1) == 99) { _tmp = 62; _timer = setInterval(() => { if (_tmp < 100) { - $('#disabled').text('配置生效中..您现在可以关闭此页面,链接将在几分钟内生效 (' + (_tmp++) + '% 处理中)'); + if(page.tran.getLang() == 'zh') + $('#disabled').text('配置生效中..您现在可以关闭此页面,链接将在几分钟内生效 (' + (_tmp++) + '% 处理中)'); + else + $('#disabled').text('The configuration is in effect.. You can close this page now and the link will take effect in a few minutes (' + (_tmp++) + '% Processing)'); } }, 1000) }; - $('#disabled').text('队列上传中. 可能需要一些时间. (' + (Math.floor(e.loaded / e.total * 100 / 1.6) - 1) + '% ' + (((Math.floor(e.loaded / e.total * 100) - 1) == 99) ? '处理中' : '上传中') + ')') + if(page.tran.getLang() == 'zh') + $('#disabled').text('队列上传中. 可能需要一些时间. (' + (Math.floor(e.loaded / e.total * 100 / 1.6) - 1) + '% ' + (((Math.floor(e.loaded / e.total * 100) - 1) == 99) ? '处理中' : '上传中') + ')') + else + $('#disabled').text('Queue upload. It may take some time. (' + (Math.floor(e.loaded / e.total * 100 / 1.6) - 1) + '% ' + (((Math.floor(e.loaded / e.total * 100) - 1) == 99) ? 'Processing' : 'Uploading') + ')') }) }) } diff --git a/js/main.js b/js/main.js index 133f50e..533f60b 100644 --- a/js/main.js +++ b/js/main.js @@ -45,10 +45,10 @@ function select(){ (function(){ var options = {}; $('.js-uploader__box').uploader({ - 'selectButtonCopy':'请选择或拖拽文件', - 'instructionsCopy':'你可以选择或拖拽多个文件', - 'submitButtonCopy':'上传选择的文件', - 'furtherInstructionsCopy':'你可以选择或拖拽更多的文件', - 'secondarySelectButtonCopy':'选择更多的文件' + 'selectButtonCopy': '请选择或拖拽文件Please select or drag and drop files', + 'instructionsCopy': '你可以选择或拖拽多个文件You can select or drag multiple files', + 'submitButtonCopy': '上传选择的文件Upload selected file', + 'furtherInstructionsCopy': '你可以选择或拖拽更多的文件You can select or drag and drop more files', + 'secondarySelectButtonCopy':'选择更多的文件Select more files' }); }()); \ No newline at end of file