From 8c54b72905f439717bcfaf625a7bc868a326a09b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 25 Feb 2022 15:04:28 +0000 Subject: [PATCH] By default accept any language as understood --- desktop_client.py | 2 +- epicyon.py | 7 ++++++- inbox.py | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/desktop_client.py b/desktop_client.py index 1b816b04d..ba4d4bdf3 100644 --- a/desktop_client.py +++ b/desktop_client.py @@ -1362,7 +1362,7 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str, content_license_url = 'https://creativecommons.org/licenses/by/4.0' blocked_cache = {} - languages_understood = [system_language] + languages_understood = [] indent = ' ' if show_new_posts: diff --git a/epicyon.py b/epicyon.py index 86ea7a8db..b38ca64fc 100644 --- a/epicyon.py +++ b/epicyon.py @@ -265,6 +265,10 @@ parser.add_argument('--language', dest='language', type=str, default=None, help='Specify a single language code, ' + 'eg. "en" or "fr" or "de"') +parser.add_argument('--languagesUnderstood', dest='languages_understood', + type=str, default=None, + help='List of the default languages understood eg. ' + + '"en / fr"') parser.add_argument('-a', '--addaccount', dest='addaccount', type=str, default=None, help='Adds a new account') @@ -1395,7 +1399,8 @@ if args.message: signing_priv_key_pem = None if args.secure_mode: signing_priv_key_pem = get_instance_actor_key(base_dir, domain) - languages_understood = [args.language] + if args.languages_understood: + languages_understood = [args.languages_understood] print('Sending post to ' + args.sendto) send_post_via_server(signing_priv_key_pem, __version__, diff --git a/inbox.py b/inbox.py index b4a97e296..72aef9df6 100644 --- a/inbox.py +++ b/inbox.py @@ -4542,7 +4542,7 @@ def run_inbox_queue(recent_posts_cache: {}, max_recent_posts: int, for handle, _ in recipients_dict.items(): destination = \ queue_json['destination'].replace(inbox_handle, handle) - languages_understood = [system_language] + languages_understood = [] _inbox_after_initial(recent_posts_cache, max_recent_posts, session, key_id, handle,