From 5d42e76eb830bb16c2a287503a642a71393bf449 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Tue, 6 Mar 2018 03:24:17 -0800 Subject: [PATCH] Show different message for receive mode than for send mode --- onionshare/__init__.py | 22 ++++++++++++++++------ share/locale/en.json | 6 ++++-- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/onionshare/__init__.py b/onionshare/__init__.py index 8d914f9c..3ab5cfed 100644 --- a/onionshare/__init__.py +++ b/onionshare/__init__.py @@ -144,13 +144,23 @@ def main(cwd=None): settings.set('slug', web.slug) settings.save() - if(stealth): - print(strings._("give_this_url_stealth")) - print('http://{0:s}/{1:s}'.format(app.onion_host, web.slug)) - print(app.auth_string) + print('') + if receive: + if stealth: + print(strings._("give_this_url_receive_stealth")) + print('http://{0:s}/{1:s}'.format(app.onion_host, web.slug)) + print(app.auth_string) + else: + print(strings._("give_this_url_receive")) + print('http://{0:s}/{1:s}'.format(app.onion_host, web.slug)) else: - print(strings._("give_this_url")) - print('http://{0:s}/{1:s}'.format(app.onion_host, web.slug)) + if stealth: + print(strings._("give_this_url_stealth")) + print('http://{0:s}/{1:s}'.format(app.onion_host, web.slug)) + print(app.auth_string) + else: + print(strings._("give_this_url")) + print('http://{0:s}/{1:s}'.format(app.onion_host, web.slug)) print('') print(strings._("ctrlc_to_stop")) diff --git a/share/locale/en.json b/share/locale/en.json index e72686b8..8686ea13 100644 --- a/share/locale/en.json +++ b/share/locale/en.json @@ -5,8 +5,10 @@ "wait_for_hs_trying": "Trying...", "wait_for_hs_nope": "Not ready yet.", "wait_for_hs_yup": "Ready!", - "give_this_url": "Give this address to the person you're sending the file to:", - "give_this_url_stealth": "Give this address and HidServAuth line to the person you're sending the file to:", + "give_this_url": "Give this address to the person you're sending the files to:", + "give_this_url_stealth": "Give this address and HidServAuth line to the person you're sending the files to:", + "give_this_url_receive": "Give this address to the people sending you files:", + "give_this_url_receive_stealth": "Give this address and HidServAuth line to the people sending you files:", "ctrlc_to_stop": "Press Ctrl-C to stop server", "not_a_file": "{0:s} is not a valid file.", "not_a_readable_file": "{0:s} is not a readable file.",