[i18n] Fix importer project errors

stable
David Barragán Merino 2015-05-11 16:13:48 +02:00
parent d434b29a25
commit 90f83f9694
7 changed files with 24 additions and 4 deletions

View File

@ -85,17 +85,25 @@ resourceProvider = ($config, $repo, $http, $urls, $auth, $q, $translate) ->
maxFileSize = $config.get("maxUploadFileSize", null)
if maxFileSize and file.size > maxFileSize
errorMsg = $translate.instant("PROJECT.IMPORT.ERROR_MAX_SIZE_EXCEEDED", {
fileName: file.name
fileSize: sizeFormat(file.size)
maxFileSize: sizeFormat(maxFileSize)
})
response = {
status: 413,
data: _error_message: "'#{file.name}' (#{sizeFormat(file.size)}) is too heavy for our oompa
loompas, try it with a smaller than (#{sizeFormat(maxFileSize)})"
data: _error_message: errorMsg
}
defered.reject(response)
return defered.promise
uploadProgress = (evt) =>
percent = Math.round((evt.loaded / evt.total) * 100)
message = "Uloaded #{sizeFormat(evt.loaded)} of #{sizeFormat(evt.total)}"
message = $translate.instant("PROJECT.IMPORT.UPLOAD_IN_PROGRESS_MESSAGE", {
uploadedSize: sizeFormat(evt.loaded)
totalSize: sizeFormat(evt.total)
})
statusUpdater("in-progress", null, message, percent)
uploadComplete = (evt) =>

View File

@ -476,9 +476,11 @@
"DESCRIPTION": "Aquest procés pot durar una mica, pero favor mantinga la finestra oberta",
"ASYNC_IN_PROGRESS_TITLE": "Els Oompa Loompas estàn important el teu projecte",
"ASYNC_IN_PROGRESS_MESSAGE": "Aquest procés pot durar uns moments <br/> T'enviarem un correo quan estiga llest.",
"UPLOAD_IN_PROGRESS_MESSAGE": "Uploaded {{uploadedSize}} of {{totalSize}}",
"ERROR": "Els Oompa Loompas han tingut problemes pujan les teues dades. Per favor intenta-ho de nou.",
"ERROR_TOO_MANY_REQUEST": "Ho sentim, els Oompa Loompas estàn molt ocupats ara mateix. Intenta-ho de nou en uns moments.",
"ERROR_MESSAGE": "Els Oompa Loompas tenen problemes important les teues dades: {{error_message}}",
"ERROR_MAX_SIZE_EXCEEDED": "'{{fileName}}' ({{fileSize}}) is too heavy for our Oompa Loompas, try it with a smaller than ({{maxFileSize}})",
"SYNC_SUCCESS": "El teu projecte s'ha importat correctament"
}
},
@ -792,7 +794,7 @@
"PLACEHOLDER_FIELD": "Mot d'usuari i correu",
"ACTION_RESET_PASSWORD": "Resetejar contrasenya",
"LINK_CANCEL": "No, portam enrere, crec que ho recorde.",
"SUCCESS": "<strong>Check your inbox!</strong><br />We have sent you an email with the instructions to set a new password",
"SUCCESS": "<strong>Mira el teu correu!</strong><br /> Hem enviat un correu amb les instrucciones per a setejar una nova contrasenya.",
"ERROR": "Segons els nostres Oompa Loompas, no estàs registrat encara."
},
"LOGIN_COMMON": {

View File

@ -476,9 +476,11 @@
"DESCRIPTION": "This process can take a while, please keep the window open.",
"ASYNC_IN_PROGRESS_TITLE": "Our Oompa Loompas are importing your project",
"ASYNC_IN_PROGRESS_MESSAGE": "This process could take a few minutes <br/> We will send you an email when ready",
"UPLOAD_IN_PROGRESS_MESSAGE": "Uploaded {{uploadedSize}} of {{totalSize}}",
"ERROR": "Our Oompa Loompas have some problems importing your dump data. Please try again.",
"ERROR_TOO_MANY_REQUEST": "Sorry, our Oompa Loompas are very busy right now. Please try again in a few minutes.",
"ERROR_MESSAGE": "Our Oompa Loompas have some problems importing your dump data: {{error_message}}",
"ERROR_MAX_SIZE_EXCEEDED": "'{{fileName}}' ({{fileSize}}) is too heavy for our Oompa Loompas, try it with a smaller than ({{maxFileSize}})",
"SYNC_SUCCESS": "Your project has been imported successfuly"
}
},

View File

@ -476,9 +476,11 @@
"DESCRIPTION": "Este proceso puede tardar un ratito, por favor mantén la ventana abierta.",
"ASYNC_IN_PROGRESS_TITLE": "Nuestros Oompa Loompa están importando su proyecto",
"ASYNC_IN_PROGRESS_MESSAGE": "Este proceso puede llevarnos algún tiempo <br/> Te enviaremos un email cuando esté listo",
"UPLOAD_IN_PROGRESS_MESSAGE": "Subidos {{uploadedSize}} de {{totalSize}}",
"ERROR": "Nuestros Oompa Loompas tienen problemas para importar tus datos. Por favor inténtalo nuevamente.",
"ERROR_TOO_MANY_REQUEST": "Lo sentimos, nuestros Oompa Loompas están muy ocupados en este momento. Por favor inténtalo nuevamente en unos minutos.",
"ERROR_MESSAGE": "Nuestros Oompa Loompas tienen algunos problemas importando tus datos: {{error_message}}",
"ERROR_MAX_SIZE_EXCEEDED": "El fichero '{{fileName}}' ({{fileSize}}) es demasiado pesado para nuestros Oompa Loompas, prueba con uno de menos de ({{maxFileSize}}).",
"SYNC_SUCCESS": "Tu proyecto se ha importado con éxito."
}
},

View File

@ -476,9 +476,11 @@
"DESCRIPTION": "Tämä voi kestää hetken, pidä ikkuna auki.",
"ASYNC_IN_PROGRESS_TITLE": " Oompa Loompas tuovat projektia",
"ASYNC_IN_PROGRESS_MESSAGE": "Tämä voi kestää muutaman minuutin <br/>Lähetämme sähköpostin on valmista",
"UPLOAD_IN_PROGRESS_MESSAGE": "Uploaded {{uploadedSize}} of {{totalSize}}",
"ERROR": "Oompa Loompas eivät onnistuneet tuomaan tiedostoasi. Yritä uudestaan.",
"ERROR_TOO_MANY_REQUEST": "Oompa Loompas ovat kiireisiä juuri nyt. Yritä hetken päästä uudelleen.",
"ERROR_MESSAGE": "Oompa Loompas eivät pysty lukemaan tiedostoasi: {{error_message}}",
"ERROR_MAX_SIZE_EXCEEDED": "'{{fileName}}' ({{fileSize}}) is too heavy for our Oompa Loompas, try it with a smaller than ({{maxFileSize}})",
"SYNC_SUCCESS": "Projektisi on tuotu sisään onnistuneesti"
}
},

View File

@ -476,9 +476,11 @@
"DESCRIPTION": "Ce processus peut prendre du temps, veuillez garder cette fenêtre ouverte.",
"ASYNC_IN_PROGRESS_TITLE": "Nos Oompas Loompas sont en train d'importer votre projet",
"ASYNC_IN_PROGRESS_MESSAGE": "Ce processus pourrait durer plusieurs minutes <br/> Nous vous enverrons un emai quand ce sera prêt",
"UPLOAD_IN_PROGRESS_MESSAGE": "Uploaded {{uploadedSize}} of {{totalSize}}",
"ERROR": "Nos Oompas Loompas ont rencontré des problèmes en important votre dump de données. Merci de réessayer.",
"ERROR_TOO_MANY_REQUEST": "Nous sommes désolés, nos oompa loompas sont très occupés en ce moment. Veuillez réessayer dans quelques minutes.",
"ERROR_MESSAGE": "Nos oompa loompas ont des problèmes pour importer le dump de vos données : {{error_message}}",
"ERROR_MAX_SIZE_EXCEEDED": "'{{fileName}}' ({{fileSize}}) is too heavy for our Oompa Loompas, try it with a smaller than ({{maxFileSize}})",
"SYNC_SUCCESS": "Votre projet a été importé avec succès"
}
},

View File

@ -476,9 +476,11 @@
"DESCRIPTION": "這個過桯要花點時間,請保持视窗開啟",
"ASYNC_IN_PROGRESS_TITLE": "我們的工程師對你的專案很重要哦",
"ASYNC_IN_PROGRESS_MESSAGE": "這個過程要花上一點時間<br/> 當弄好時我們會發給你一封郵件",
"UPLOAD_IN_PROGRESS_MESSAGE": "Uploaded {{uploadedSize}} of {{totalSize}}",
"ERROR": "系統在滙進你倒入的資料時遇上一些問題,請再試一次",
"ERROR_TOO_MANY_REQUEST": "抱歉系統繁忙中,請稍後再試試 ",
"ERROR_MESSAGE": "我們的系統無法滙入你的資料",
"ERROR_MAX_SIZE_EXCEEDED": "'{{fileName}}' ({{fileSize}}) is too heavy for our Oompa Loompas, try it with a smaller than ({{maxFileSize}})",
"SYNC_SUCCESS": "你的專案已成功滙入"
}
},