summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2019-04-21 12:58:53 -0700
committerMicah Lee <micah@micahflee.com>2019-04-21 12:58:53 -0700
commitbea6e3878cfeacd5800ad73dac524e7970952ee6 (patch)
tree1a36b28b74f705eefde0af850721bb764305ab89
parent69249f81b13bbcae4519e7862168189ebbf43845 (diff)
downloadonionshare-bea6e3878cfeacd5800ad73dac524e7970952ee6.tar.gz
onionshare-bea6e3878cfeacd5800ad73dac524e7970952ee6.zip
Remove more CLI strings
-rw-r--r--onionshare/onion.py4
-rw-r--r--onionshare/web/receive_mode.py6
-rw-r--r--onionshare/web/share_mode.py2
-rw-r--r--onionshare/web/web.py2
-rw-r--r--share/locale/en.json2
5 files changed, 7 insertions, 9 deletions
diff --git a/onionshare/onion.py b/onionshare/onion.py
index e2485b10..2f4ddffd 100644
--- a/onionshare/onion.py
+++ b/onionshare/onion.py
@@ -272,7 +272,7 @@ class Onion(object):
summary = res_parts[4].split('=')[1]
# "\033[K" clears the rest of the line
- print("{}: {}% - {}{}".format(strings._('connecting_to_tor'), progress, summary, "\033[K"), end="\r")
+ print("Connecting to the Tor network: {}% - {}{}".format(progress, summary, "\033[K"), end="\r")
if callable(tor_status_update_func):
if not tor_status_update_func(progress, summary):
@@ -446,7 +446,7 @@ class Onion(object):
raise TorTooOld(strings._('error_stealth_not_supported'))
if not save_scheduled_key:
- print(strings._("config_onion_service").format(int(port)))
+ print("Setting up onion service on port {0:d}.".format(int(port)))
if self.stealth:
if self.settings.get('hidservauth_string'):
diff --git a/onionshare/web/receive_mode.py b/onionshare/web/receive_mode.py
index dcf69a96..bc805445 100644
--- a/onionshare/web/receive_mode.py
+++ b/onionshare/web/receive_mode.py
@@ -79,7 +79,7 @@ class ReceiveModeWeb(object):
})
self.common.log('ReceiveModeWeb', 'define_routes', '/upload, uploaded {}, saving to {}'.format(f.filename, local_path))
- print('\n' + strings._('receive_mode_received_file').format(local_path))
+ print('\n' + "Received: {}".format(local_path))
if request.upload_error:
self.common.log('ReceiveModeWeb', 'define_routes', '/upload, there was an upload error')
@@ -87,7 +87,7 @@ class ReceiveModeWeb(object):
self.web.add_request(self.web.REQUEST_ERROR_DATA_DIR_CANNOT_CREATE, request.path, {
"receive_mode_dir": request.receive_mode_dir
})
- print(strings._('error_cannot_create_data_dir').format(request.receive_mode_dir))
+ print("Could not create OnionShare data folder: {}".format(request.receive_mode_dir))
msg = 'Error uploading, please inform the OnionShare user'
if ajax:
@@ -313,7 +313,7 @@ class ReceiveModeRequest(Request):
self.web.add_request(self.web.REQUEST_ERROR_DATA_DIR_CANNOT_CREATE, request.path, {
"receive_mode_dir": self.receive_mode_dir
})
- print(strings._('error_cannot_create_data_dir').format(self.receive_mode_dir))
+ print("Could not create OnionShare data folder: {}".format(self.receive_mode_dir))
self.web.common.log('ReceiveModeRequest', '__init__', 'Permission denied creating receive mode directory')
self.upload_error = True
diff --git a/onionshare/web/share_mode.py b/onionshare/web/share_mode.py
index eb487c42..560a8ba4 100644
--- a/onionshare/web/share_mode.py
+++ b/onionshare/web/share_mode.py
@@ -201,7 +201,7 @@ class ShareModeWeb(object):
# Close the server, if necessary
if not self.web.stay_open and not canceled:
- print(strings._("closing_automatically"))
+ print("Stopped because transfer is complete")
self.web.running = False
try:
if shutdown_func is None:
diff --git a/onionshare/web/web.py b/onionshare/web/web.py
index ebfff2f3..edaf75f1 100644
--- a/onionshare/web/web.py
+++ b/onionshare/web/web.py
@@ -153,7 +153,7 @@ class Web(object):
if self.error404_count == 20:
self.add_request(Web.REQUEST_RATE_LIMIT, request.path)
self.force_shutdown()
- print(strings._('error_rate_limit'))
+ print("Someone has made too many wrong attempts on your address, which means they could be trying to guess it, so OnionShare has stopped the server. Start sharing again and send the recipient a new address to share.")
r = make_response(render_template('404.html'), 404)
return self.add_security_headers(r)
diff --git a/share/locale/en.json b/share/locale/en.json
index 472d28b7..9ca9c339 100644
--- a/share/locale/en.json
+++ b/share/locale/en.json
@@ -1,5 +1,4 @@
{
- "config_onion_service": "Setting up onion service on port {0:d}.",
"preparing_files": "Compressing files.",
"not_a_readable_file": "{0:s} is not a readable file.",
"no_available_port": "Could not find an available port to start the onion service",
@@ -170,7 +169,6 @@
"gui_receive_mode_no_files": "No Files Received Yet",
"gui_receive_mode_autostop_timer_waiting": "Waiting to finish receiving",
"receive_mode_upload_starting": "Upload of total size {} is starting",
- "receive_mode_received_file": "Received: {}",
"days_first_letter": "d",
"hours_first_letter": "h",
"minutes_first_letter": "m",