From fdeb35f39ba9a002165143567b2842cdfbfb3c4c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 6 Nov 2020 10:40:07 +0000 Subject: [PATCH] Translated submit buttons --- daemon.py | 6 ++++-- webinterface.py | 10 ++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/daemon.py b/daemon.py index 769c554f..8073a51f 100644 --- a/daemon.py +++ b/daemon.py @@ -10885,7 +10885,8 @@ class PubServer(BaseHTTPRequestHandler): # was the citations button pressed on the newblog screen? citationsButtonPress = False if postType == 'newblog' and fields.get('submitCitations'): - if fields['submitCitations'] == 'Submit': + if fields['submitCitations'] == \ + self.server.translate['Citations']: citationsButtonPress = True if not citationsButtonPress: @@ -10894,7 +10895,8 @@ class PubServer(BaseHTTPRequestHandler): not fields.get('imageDescription'): return -1 if fields.get('submitPost'): - if fields['submitPost'] != 'Submit': + if fields['submitPost'] != \ + self.server.translate['Submit']: return -1 else: return 2 diff --git a/webinterface.py b/webinterface.py index e02a8bd4..8b62782b 100644 --- a/webinterface.py +++ b/webinterface.py @@ -2998,11 +2998,12 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {}, # for a new blog if newswire items exist then add a citations button if newswire and path.endswith('/newblog'): newPostForm += \ - ' \n' + ' \n' newPostForm += \ - ' \n' + ' \n' newPostForm += ' \n' @@ -5907,7 +5908,8 @@ def htmlCitations(baseDir: str, nickname: str, domain: str, ' \n' htmlStr += \ - ' \n' + ' \n' htmlStr += ' \n' # list of newswire items