added new english strings for GUI

This commit is contained in:
Micah Lee 2014-06-06 22:00:18 -04:00
parent 927282a432
commit c8f3632fa4
2 changed files with 11 additions and 7 deletions

View File

@ -8,7 +8,12 @@
"ctrlc_to_stop": "Press Ctrl-C to stop server", "ctrlc_to_stop": "Press Ctrl-C to stop server",
"not_a_file": "{0} is not a file.", "not_a_file": "{0} is not a file.",
"filesize": "File size", "filesize": "File size",
"sha1_checksum": "SHA1 checksum" "sha1_checksum": "SHA1 checksum",
"copied_url": "Copied URL to clipboard",
"download_page_loaded": "Download page loaded",
"download_started": "Download started",
"download_finished": "Download finished",
"other_page_loaded": "Other page has been loaded"
}, "no": { }, "no": {
"punching_a_hole": "Åpner port i brannmuren.", "punching_a_hole": "Åpner port i brannmuren.",
"closing_hole": "Lukker port i brannmuren.", "closing_hole": "Lukker port i brannmuren.",

View File

@ -17,7 +17,7 @@ $(function(){
$.ajax({ $.ajax({
url: '/copy_url', url: '/copy_url',
success: function(data, textStatus, jqXHR){ success: function(data, textStatus, jqXHR){
update('Copied secret URL to clipboard'); update(onionshare.strings['copied_url']);
} }
}); });
} }
@ -33,12 +33,12 @@ $(function(){
if(data != '') { if(data != '') {
var r = JSON.parse(data); var r = JSON.parse(data);
if(r.type == REQUEST_LOAD) { if(r.type == REQUEST_LOAD) {
update($('<span>').addClass('weblog').html('Download page loaded')); update($('<span>').addClass('weblog').html(onionshare.strings['download_page_loaded']));
} else if(r.type == REQUEST_DOWNLOAD) { } else if(r.type == REQUEST_DOWNLOAD) {
update($('<span>').addClass('weblog').html('Download started')); update($('<span>').addClass('weblog').html(onionshare.strings['download_started']));
} else { } else {
if(r.path != '/favicon.ico') if(r.path != '/favicon.ico')
update($('<span>').addClass('weblog-error').html('Other page has been loaded: {0}'.replace('{0}', r.path))); update($('<span>').addClass('weblog-error').html(onionshare.strings['other_page_loaded']+': '+r.path));
} }
} }
@ -54,8 +54,7 @@ $(function(){
onionshare = JSON.parse(data); onionshare = JSON.parse(data);
$('#basename').html(onionshare.basename); $('#basename').html(onionshare.basename);
update("Sharing file: "+onionshare.basename+" ("+onionshare.filesize+" bytes)"); update(onionshare.strings['sha1_checksum']+": "+onionshare.filehash);
update("SHA1 checksum: "+onionshare.filehash);
linebreak(); linebreak();
update(onionshare.strings['give_this_url']); update(onionshare.strings['give_this_url']);
update($('<strong>').html(onionshare.url)); update($('<strong>').html(onionshare.url));