From 8a71ee5b7e9fbb8fc58dc431c55dc48b7d14b22e Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Mon, 16 Nov 2015 20:27:40 +0100 Subject: [PATCH] cleaner image upload without canvas, also possible to upload any attachment, plus error message when upload fails --- actions/qvitter.php | 4 +- css/qvitter.css | 7 +- js/dom-functions.js | 7 +- js/qvitter.js | 167 +++++++++++++++++++---------------------- locale/ar.json | 3 +- locale/ast.json | 3 +- locale/ca.json | 3 +- locale/de.json | 3 +- locale/en.json | 3 +- locale/eo.json | 3 +- locale/es.json | 3 +- locale/es_ahorita.json | 3 +- locale/eu.json | 3 +- locale/fa.json | 3 +- locale/fi.json | 3 +- locale/fr.json | 3 +- locale/gl.json | 3 +- locale/he.json | 3 +- locale/io.json | 3 +- locale/it.json | 3 +- locale/no.json | 3 +- locale/pt_br.json | 3 +- locale/sv.json | 3 +- locale/zh_cn.json | 3 +- locale/zh_tw.json | 3 +- 25 files changed, 132 insertions(+), 116 deletions(-) diff --git a/actions/qvitter.php b/actions/qvitter.php index e831a6d..d35c5e5 100644 --- a/actions/qvitter.php +++ b/actions/qvitter.php @@ -325,7 +325,7 @@ class QvitterAction extends ApiAction } ?> - +
Please enable javascript to use this site.
+
Please enable javascript to use this site.
' + message + '
'); +function showErrorMessage(message, after) { + if(typeof after == 'undefined') { + var after = $('#user-container'); + } + after.after('
' + message + '
'); } diff --git a/js/qvitter.js b/js/qvitter.js index ec9818d..69c7f21 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -79,6 +79,7 @@ window.onpopstate = function(event) { · · · · · · · · · · · · · */ $('body').on('click','.discard-error-message',function(){ + $(this).addClass('clicked'); $(this).closest('.error-message').slideUp(100,function(){ $(this).remove(); }); @@ -1672,7 +1673,8 @@ $('body').on('click','.queet',function (event) { .action-ellipsis-container a b,\ span.group,\ .longdate,\ - .screen-name') + .screen-name,\ + .discard-error-message') && !$(this).parent('.stream-item').hasClass('user')) { // not if user stream expand_queet($(this).parent()); } @@ -2436,6 +2438,11 @@ $('body').on('blur','.queet-box-syntax',function (e) { return true; } + // don't collapse if an error message discard button has been clicked + if($(this).siblings('.error-message').children('.discard-error-message').length>0) { + return true; + } + // don't collapse if we're clicking around inside queet-box var syntaxTwoBox = $(this).siblings('.syntax-two'); if(syntaxTwoBox.hasClass('clicked')) { @@ -3457,7 +3464,7 @@ function cleanUpAfterCropping(){ /* · · - · Upload image + · Upload attachment · · · · · · · · · · · · · · */ @@ -3478,7 +3485,7 @@ $('body').on('click','.upload-image',function () { $('#upload-image-input').one('click',function(){ // trick to make the change event only fire once when selecting a file $(this).one('change',function(e){ - uploadImage(e, thisUploadButton); + uploadAttachment(e, thisUploadButton); }) }); @@ -3494,103 +3501,83 @@ $('body').on('click','.upload-image',function () { } }); -function uploadImage(e, thisUploadButton) { - // get orientation - loadImage.parseMetaData(e.target.files[0], function (data) { - if (data.exif) { - var orientation = data.exif.get('Orientation'); - } - else { - var orientation = 1; - } +function uploadAttachment(e, thisUploadButton) { - // loader cover stuff - thisUploadButton.closest('.queet-toolbar').parent().append('
'); - thisUploadButton.closest('.queet-toolbar').siblings('.queet-box-loading-cover').width(thisUploadButton.closest('.queet-toolbar').parent().outerWidth()); - display_spinner(thisUploadButton.closest('.queet-toolbar').siblings('.queet-box-loading-cover')[0]); - thisUploadButton.closest('.queet-toolbar').siblings('.queet-box-loading-cover').find('.loader').css('top', (thisUploadButton.closest('.queet-toolbar').parent().outerHeight()/2-20) + 'px'); + // loader cover stuff + thisUploadButton.closest('.queet-toolbar').parent().append('
'); + thisUploadButton.closest('.queet-toolbar').siblings('.queet-box-loading-cover').width(thisUploadButton.closest('.queet-toolbar').parent().outerWidth()); + display_spinner(thisUploadButton.closest('.queet-toolbar').siblings('.queet-box-loading-cover')[0]); + thisUploadButton.closest('.queet-toolbar').siblings('.queet-box-loading-cover').find('.loader').css('top', (thisUploadButton.closest('.queet-toolbar').parent().outerHeight()/2-20) + 'px'); - // clean up - cleanUpAfterCropping(); + var uploadButton = thisUploadButton.closest('.queet-toolbar').find('.upload-image'); + var queetBox = thisUploadButton.closest('.queet-toolbar').siblings('.queet-box-syntax'); + var caretPos = uploadButton.attr('data-caret-pos').split(','); - // create image - loadImage(e.target.files[0], - function (img) { - if(typeof img.target == 'undefined') { - // The preview image below queet box. - var appendedImg = thisUploadButton.closest('.queet-toolbar').before(''); - var imgFormData = new FormData(); - imgFormData.append('media', $('#upload-image-input')[0].files[0]); + var imgFormData = new FormData(); + imgFormData.append('media', $('#upload-image-input')[0].files[0]); - // upload - $.ajax({ url: window.apiRoot + 'statusnet/media/upload', - type: "POST", - data: imgFormData, - contentType: false, - processData: false, - dataType: "xml", - error: function(data){ console.log('error'); console.log(data); $('.queet-box-loading-cover').remove(); }, - success: function(data) { - var rsp = $(data).find('rsp'); - if (rsp.attr('stat') == 'ok') { - cleanUpAfterCropping(); + // upload + $.ajax({ url: window.apiRoot + 'statusnet/media/upload', + type: "POST", + data: imgFormData, + contentType: false, + processData: false, + dataType: "xml", + error: function(data, textStatus, errorThrown){ + showErrorMessage(window.sL.ERRORattachmentUploadFailed, queetBox.siblings('.syntax-two')); + $('.queet-box-loading-cover').remove(); + queetBox.focus(); + }, + success: function(data) { + var rsp = $(data).find('rsp'); + if (rsp.attr('stat') == 'ok') { - // If doing 'multiple' input element, maybe reply with many mediaurl elements - // and then rsp.find('mediaurl').each(...)? - var mediaurl = rsp.find('mediaurl').text(); + // maybe add thumbnail below queet box + var mimeType = $(data).find('atom\\:link').attr('type'); + if(mimeType.indexOf('image/') == 0) { + var imgUrl = $(data).find('atom\\:link').attr('href'); + thisUploadButton.closest('.queet-toolbar').before(''); + } - var uploadButton = $('img.to-upload').parent().siblings('.queet-toolbar').find('.upload-image'); - var queetBox = $('img.to-upload').parent().siblings('.queet-box-syntax'); - var caretPos = uploadButton.attr('data-caret-pos').split(','); + var mediaurl = rsp.find('mediaurl').text(); - // if this site is like quitter.se, we have to do this, otherwise - // gnusocial will not recognize the link to the image as a local attachment - if(window.thisSiteThinksItIsHttpButIsActuallyHttps) { - mediaurl = mediaurl.replace('https://','http://'); - } + // if this site is like quitter.se, we have to do this, otherwise + // gnusocial will not recognize the link to the image as a local attachment + if(window.thisSiteThinksItIsHttpButIsActuallyHttps) { + mediaurl = mediaurl.replace('https://','http://'); + } - $('img.to-upload').attr('data-shorturl', mediaurl); - $('img.to-upload').addClass('uploaded'); - $('img.to-upload').removeClass('to-upload'); + $('img.to-upload').attr('data-shorturl', mediaurl); + $('img.to-upload').addClass('uploaded'); + $('img.to-upload').removeClass('to-upload'); - // insert shorturl in queet box - deleteBetweenCharacterIndices(queetBox[0], caretPos[0], caretPos[1]); - var range = createRangeFromCharacterIndices(queetBox[0], caretPos[0], caretPos[0]); - if(typeof range == 'undefined') { - // if queetbox is empty no range is returned, and inserting will fail, - // so we insert a space and try to get range again... - queetBox.html(' '); - range = createRangeFromCharacterIndices(queetBox[0], caretPos[0], caretPos[0]); - } - range.insertNode(document.createTextNode(' ' + mediaurl + ' ')); + // insert shorturl in queet box + deleteBetweenCharacterIndices(queetBox[0], caretPos[0], caretPos[1]); + var range = createRangeFromCharacterIndices(queetBox[0], caretPos[0], caretPos[0]); + if(typeof range == 'undefined') { + // if queetbox is empty no range is returned, and inserting will fail, + // so we insert a space and try to get range again... + queetBox.html(' '); + range = createRangeFromCharacterIndices(queetBox[0], caretPos[0], caretPos[0]); + } + range.insertNode(document.createTextNode(' ' + mediaurl + ' ')); - // put caret after - queetBox.focus(); - var putCaretAt = parseInt(caretPos[0],10)+mediaurl.length+2; - setSelectionRange(queetBox[0], putCaretAt, putCaretAt); - queetBox.trigger('input'); // avoid some flickering - setTimeout(function(){ queetBox.trigger('input');},1); // make sure chars are counted and shorten-button activated - $('.queet-box-loading-cover').remove(); - } - else { - alert('Try again! ' + rsp.find('err').attr('msg')); - $('.save-profile-button').removeAttr('disabled'); - $('.save-profile-button').removeClass('disabled'); - $('img.to-upload').parent().remove(); - $('.queet-box-loading-cover').remove(); - } - } - }); - } - else { - remove_spinner(); - $('.queet-box-loading-cover').remove(); - alert('could not read image'); - } - }, - { canvas: true, - orientation: orientation } // Options - ); + // put caret after + queetBox.focus(); + var putCaretAt = parseInt(caretPos[0],10)+mediaurl.length+2; + setSelectionRange(queetBox[0], putCaretAt, putCaretAt); + queetBox.trigger('input'); // avoid some flickering + setTimeout(function(){ queetBox.trigger('input');},1); // make sure chars are counted and shorten-button activated + $('.queet-box-loading-cover').remove(); + } + else { + alert('Try again! ' + rsp.find('err').attr('msg')); + $('.save-profile-button').removeAttr('disabled'); + $('.save-profile-button').removeClass('disabled'); + $('img.to-upload').parent().remove(); + $('.queet-box-loading-cover').remove(); + } + } }); } diff --git a/locale/ar.json b/locale/ar.json index 7813f1a..d5265a6 100644 --- a/locale/ar.json +++ b/locale/ar.json @@ -138,5 +138,6 @@ "ERRORcouldNotFindGroupWithNickname":"Could not find a group with nickname \"{nickname}\" on this server", "ERRORcouldNotFindPage":"Could not find that page.", "ERRORnoticeRemoved": "This notice has been removed.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!" + "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large." } diff --git a/locale/ast.json b/locale/ast.json index 06fefa1..5776ce9 100644 --- a/locale/ast.json +++ b/locale/ast.json @@ -138,5 +138,6 @@ "ERRORcouldNotFindGroupWithNickname":"Could not find a group with nickname \"{nickname}\" on this server", "ERRORcouldNotFindPage":"Could not find that page.", "ERRORnoticeRemoved": "This notice has been removed.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!" + "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large." } diff --git a/locale/ca.json b/locale/ca.json index 2cb7297..c825985 100644 --- a/locale/ca.json +++ b/locale/ca.json @@ -138,5 +138,6 @@ "ERRORcouldNotFindGroupWithNickname":"No s'ha pogut trobar el grup amb el nom \"{nickname}\" en aquest servidor", "ERRORcouldNotFindPage":"No s'ha pogut trobar aquesta pàgina", "ERRORnoticeRemoved": "Aquest avís s'ha eliminat.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!" + "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large." } diff --git a/locale/de.json b/locale/de.json index d05723f..f3ad0cd 100644 --- a/locale/de.json +++ b/locale/de.json @@ -138,5 +138,6 @@ "ERRORcouldNotFindGroupWithNickname":"Konnte Gruppe mit Bezeichnung \"{nickname}\" nicht finden", "ERRORcouldNotFindPage":"Konnte Seite nicht finden.", "ERRORnoticeRemoved": "Dieser Queet wurde gelöscht.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!" + "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large." } diff --git a/locale/en.json b/locale/en.json index bfed28e..68afe08 100644 --- a/locale/en.json +++ b/locale/en.json @@ -138,5 +138,6 @@ "ERRORcouldNotFindGroupWithNickname":"Could not find a group with nickname \"{nickname}\" on this server", "ERRORcouldNotFindPage":"Could not find that page.", "ERRORnoticeRemoved": "This notice has been removed.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!" + "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large." } diff --git a/locale/eo.json b/locale/eo.json index 6d2d806..3466f51 100644 --- a/locale/eo.json +++ b/locale/eo.json @@ -138,5 +138,6 @@ "ERRORcouldNotFindGroupWithNickname":"Could not find a group with nickname \"{nickname}\" on this server", "ERRORcouldNotFindPage":"Could not find that page.", "ERRORnoticeRemoved": "This notice has been removed.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!" + "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large." } diff --git a/locale/es.json b/locale/es.json index def6fc9..624293b 100644 --- a/locale/es.json +++ b/locale/es.json @@ -138,5 +138,6 @@ "ERRORcouldNotFindGroupWithNickname":"No se ha encontrado el grupo con el nombre \"{nickname}\" en este servidor", "ERRORcouldNotFindPage":"No se pudo encontrar la página.", "ERRORnoticeRemoved": "Este aviso se ha eliminado.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!" + "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large." } diff --git a/locale/es_ahorita.json b/locale/es_ahorita.json index a08f214..9738a75 100644 --- a/locale/es_ahorita.json +++ b/locale/es_ahorita.json @@ -138,5 +138,6 @@ "ERRORcouldNotFindGroupWithNickname":"Could not find a group with nickname \"{nickname}\" on this server", "ERRORcouldNotFindPage":"Could not find that page.", "ERRORnoticeRemoved": "This notice has been removed.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!" + "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large." } diff --git a/locale/eu.json b/locale/eu.json index 16ce331..fe6ca21 100644 --- a/locale/eu.json +++ b/locale/eu.json @@ -138,5 +138,6 @@ "ERRORcouldNotFindGroupWithNickname":"Could not find a group with nickname \"{nickname}\" on this server", "ERRORcouldNotFindPage":"Could not find that page.", "ERRORnoticeRemoved": "This notice has been removed.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!" + "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large." } diff --git a/locale/fa.json b/locale/fa.json index 8f037d9..665daf1 100644 --- a/locale/fa.json +++ b/locale/fa.json @@ -138,5 +138,6 @@ "ERRORcouldNotFindGroupWithNickname":"Could not find a group with nickname \"{nickname}\" on this server", "ERRORcouldNotFindPage":"Could not find that page.", "ERRORnoticeRemoved": "This notice has been removed.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!" + "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large." } diff --git a/locale/fi.json b/locale/fi.json index 18427da..54ec374 100644 --- a/locale/fi.json +++ b/locale/fi.json @@ -138,5 +138,6 @@ "ERRORcouldNotFindGroupWithNickname":"Could not find a group with nickname \"{nickname}\" on this server", "ERRORcouldNotFindPage":"Could not find that page.", "ERRORnoticeRemoved": "This notice has been removed.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!" + "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large." } diff --git a/locale/fr.json b/locale/fr.json index 69ffc10..437e983 100644 --- a/locale/fr.json +++ b/locale/fr.json @@ -138,5 +138,6 @@ "ERRORcouldNotFindGroupWithNickname":"Impossible de trouver un groupe avec le nom \"{nickname}\" sur ce serveur", "ERRORcouldNotFindPage":"Impossible de trouver cette page.", "ERRORnoticeRemoved": "Cet avis a été supprimé.", - "ERRORnoContactWithServer": "Impossible d'établir une connexion avec le serveur. Il peut être surchargé, ou il peut y avoir un problème avec votre connexion. Réessayez plus tard !" + "ERRORnoContactWithServer": "Impossible d'établir une connexion avec le serveur. Il peut être surchargé, ou il peut y avoir un problème avec votre connexion. Réessayez plus tard !", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large." } diff --git a/locale/gl.json b/locale/gl.json index 2aabebd..9a986bf 100644 --- a/locale/gl.json +++ b/locale/gl.json @@ -138,5 +138,6 @@ "ERRORcouldNotFindGroupWithNickname":"Could not find a group with nickname \"{nickname}\" on this server", "ERRORcouldNotFindPage":"Could not find that page.", "ERRORnoticeRemoved": "This notice has been removed.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!" + "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large." } diff --git a/locale/he.json b/locale/he.json index e3baadb..c199333 100644 --- a/locale/he.json +++ b/locale/he.json @@ -138,5 +138,6 @@ "ERRORcouldNotFindGroupWithNickname":"Could not find a group with nickname \"{nickname}\" on this server", "ERRORcouldNotFindPage":"Could not find that page.", "ERRORnoticeRemoved": "This notice has been removed.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!" + "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large." } diff --git a/locale/io.json b/locale/io.json index 48b58e7..0de360b 100644 --- a/locale/io.json +++ b/locale/io.json @@ -138,5 +138,6 @@ "ERRORcouldNotFindGroupWithNickname":"On ne trovis grupo kun la nomo \"{nickname}\" en ica servilo.", "ERRORcouldNotFindPage":"On ne trovis ica pagino.", "ERRORnoticeRemoved": "Ica mesajo esas supresita.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!" + "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large." } diff --git a/locale/it.json b/locale/it.json index f35511b..84f594d 100644 --- a/locale/it.json +++ b/locale/it.json @@ -138,5 +138,6 @@ "ERRORcouldNotFindGroupWithNickname":"Could not find a group with nickname \"{nickname}\" on this server", "ERRORcouldNotFindPage":"Could not find that page.", "ERRORnoticeRemoved": "This notice has been removed.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!" + "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large." } diff --git a/locale/no.json b/locale/no.json index 328fa5e..4517938 100644 --- a/locale/no.json +++ b/locale/no.json @@ -138,5 +138,6 @@ "ERRORcouldNotFindGroupWithNickname":"Kan ikke finne en gruppe med gruppenavnet \"{nickname}\" på denne instansen", "ERRORcouldNotFindPage":"Kan ikke finne siden.", "ERRORnoticeRemoved": "Denne notisen er slettet.", - "ERRORnoContactWithServer": "Kan ikke etablere en kobling til instansen. Dette kan skyldes at den er overbelastet, eller det er et problem med din internet kobling. Vennligst forsøk senere." + "ERRORnoContactWithServer": "Kan ikke etablere en kobling til instansen. Dette kan skyldes at den er overbelastet, eller det er et problem med din internet kobling. Vennligst forsøk senere.", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large." } diff --git a/locale/pt_br.json b/locale/pt_br.json index 7ef346f..0be7f68 100644 --- a/locale/pt_br.json +++ b/locale/pt_br.json @@ -138,5 +138,6 @@ "ERRORcouldNotFindGroupWithNickname":"Could not find a group with nickname \"{nickname}\" on this server", "ERRORcouldNotFindPage":"Could not find that page.", "ERRORnoticeRemoved": "This notice has been removed.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!" + "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large." } diff --git a/locale/sv.json b/locale/sv.json index 7b9e939..189d6b0 100644 --- a/locale/sv.json +++ b/locale/sv.json @@ -138,5 +138,6 @@ "ERRORcouldNotFindGroupWithNickname":"Det finns ingen grupp med namnet \"{nickname}\" på den här servern.", "ERRORcouldNotFindPage":"Sidan hittades inte.", "ERRORnoticeRemoved": "Den här qvittringen är borttagen.", - "ERRORnoContactWithServer": "Kan inte ansluta till servern. Servern kanske är överbelastad, eller så har du ett problem med din internetuppkoppling. Försök igen senare!" + "ERRORnoContactWithServer": "Kan inte ansluta till servern. Servern kanske är överbelastad, eller så har du ett problem med din internetuppkoppling. Försök igen senare!", + "ERRORattachmentUploadFailed": "Uppladdningen misslyckades. Filen är kanske för stor eller av en otillåtet typ." } diff --git a/locale/zh_cn.json b/locale/zh_cn.json index ff0067b..9a22446 100644 --- a/locale/zh_cn.json +++ b/locale/zh_cn.json @@ -137,5 +137,6 @@ "ERRORcouldNotFindGroupWithNickname":"Could not find a group with nickname \"{nickname}\" on this server", "ERRORcouldNotFindPage":"Could not find that page.", "ERRORnoticeRemoved": "This notice has been removed.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!" + "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large." } diff --git a/locale/zh_tw.json b/locale/zh_tw.json index 93a6dca..45183e0 100644 --- a/locale/zh_tw.json +++ b/locale/zh_tw.json @@ -137,5 +137,6 @@ "ERRORcouldNotFindGroupWithNickname":"Could not find a group with nickname \"{nickname}\" on this server", "ERRORcouldNotFindPage":"Could not find that page.", "ERRORnoticeRemoved": "This notice has been removed.", - "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!" + "ERRORnoContactWithServer": "Can not establish a connection to the server. The server could be overloaded, or there might be a problem with your internet connecton. Please try again later!", + "ERRORattachmentUploadFailed": "The upload failed. The format might be unsupported or the size too large." }