new translation keys for file upload

pull/1/head
ansuz 8 years ago
parent 834830fc4f
commit 827233dcba

@ -347,6 +347,10 @@ define(function () {
out.settings_logoutEverywhere = "Log out of all other web sessions"; out.settings_logoutEverywhere = "Log out of all other web sessions";
out.settings_logoutEverywhereConfirm = "Are you sure? You will need to log in with all your devices."; out.settings_logoutEverywhereConfirm = "Are you sure? You will need to log in with all your devices.";
out.upload_serverError = "Server Error: unable to upload your file at this time.";
out.upload_uploadPending = "You already have an upload in progress. Cancel it and upload your new file?";
out.upload_success = "Your file ({0}) has been successfully uploaded and added to your drive";
// index.html // index.html

@ -89,7 +89,7 @@ define([
var defaultName = Cryptpad.getDefaultName(Cryptpad.parsePadUrl(window.location.href)); var defaultName = Cryptpad.getDefaultName(Cryptpad.parsePadUrl(window.location.href));
Title.updateTitle(title || defaultName); Title.updateTitle(title || defaultName);
APP.toolbar.title.show(); APP.toolbar.title.show();
Cryptpad.alert("successfully uploaded: " + title); Cryptpad.alert(Messages._getKey('upload_success', [title]));
}); });
}); });
}; };
@ -97,15 +97,16 @@ define([
Cryptpad.rpc.send('UPLOAD_STATUS', estimate, function (e, pending) { Cryptpad.rpc.send('UPLOAD_STATUS', estimate, function (e, pending) {
if (e) { if (e) {
console.error(e); console.error(e);
return void Cryptpad.alert("something went wrong"); // TODO translate return void Cryptpad.alert(Messages.upload_serverError);
} }
if (pending[0]) { if (pending[0]) {
return void Cryptpad.confirm('upload pending, abort?', function (yes) { // TODO translate return void Cryptpad.confirm(Messages.upload_uploadPending, function (yes) {
if (!yes) { return; } if (!yes) { return; }
Cryptpad.rpc.send('UPLOAD_CANCEL', '', function (e, res) { Cryptpad.rpc.send('UPLOAD_CANCEL', '', function (e, res) {
if (e) { return void console.error(e); } if (e) { return void console.error(e); }
console.log(res); console.log(res);
next(again);
}); });
}); });
} }

Loading…
Cancel
Save