added internationalization

This commit is contained in:
Nicolas Constant 2020-03-21 19:15:08 -04:00 committed by Luc Didry
parent 538bf77cbe
commit b2c4a7f0e0
No known key found for this signature in database
GPG Key ID: EA868E12D0257E3C
3 changed files with 4 additions and 2 deletions

View File

@ -95,7 +95,7 @@ function spawnWebsocket(pa) {
if (data.part + 1 === data.total) {
var blob = new Blob(a, {type: data.type});
notify('File downloaded', data.name);
notify(i18n.fileDownloaded, data.name);
$('#please-wait').remove();
$('#loading').remove();

View File

@ -477,7 +477,7 @@ function updateProgressBar(data) {
console.log('Error on WebSocket connection but file has been fully send, so we don\'t care.');
}
notify('File uploaded', data.name);
notify(i18n.fileUploaded, data.name);
$('#parts-'+window.fc).remove();
var n = $('#name-'+window.fc);

View File

@ -28,6 +28,8 @@ var i18n = {
noLimit: '<%= l('No expiration delay') %>',
sending: '<%= l('Sending part XX1 of XX2. Please, be patient, the progress bar can take a while to move.') %>',
wsProblem: '<%= l('Websocket communication error') %>',
fileDownloaded: '<%= l('File downloaded') %>',
fileUploaded: '<%= l('File uploaded') %>',
};
var maxSize = <%= config('max_file_size') || 0 %>;