diff --git a/daemon.py b/daemon.py index 67863bdb..24205b16 100644 --- a/daemon.py +++ b/daemon.py @@ -1822,7 +1822,8 @@ class PubServer(BaseHTTPRequestHandler): pageNumber, chooserNickname, domain, - domainFull).encode('utf-8') + domainFull, + self.server.defaultTimeline).encode('utf-8') self._set_headers('text/html', len(msg), cookie, callingDomain) self._write(msg) @@ -1887,7 +1888,8 @@ class PubServer(BaseHTTPRequestHandler): postUrl, pageNumber, chooserNickname, domain, - domainFull).encode('utf-8') + domainFull, + self.server.defaultTimeline).encode('utf-8') self._set_headers('text/html', len(msg), cookie, callingDomain) self._write(msg) @@ -8415,7 +8417,8 @@ class PubServer(BaseHTTPRequestHandler): shareDescription, replyPageNumber, nickname, domain, - domainFull).encode('utf-8') + domainFull, + self.server.defaultTimeline).encode('utf-8') if not msg: print('Error replying to ' + inReplyToUrl) self._404() diff --git a/webinterface.py b/webinterface.py index 8ddea8f6..b7ee576e 100644 --- a/webinterface.py +++ b/webinterface.py @@ -2352,7 +2352,8 @@ def htmlNewPost(mediaInstance: bool, translate: {}, mentions: [], reportUrl: str, pageNumber: int, nickname: str, domain: str, - domainFull: str) -> str: + domainFull: str, + defaultTimeline: str) -> str: """New post screen """ iconsDir = getIconsDir(baseDir) @@ -2490,7 +2491,10 @@ def htmlNewPost(mediaInstance: bool, translate: {}, if path.endswith('/newblog'): placeholderSubject = translate['Title'] scopeIcon = 'scope_blog.png' - scopeDescription = translate['Blog'] + if defaultTimeline != 'tlnews': + scopeDescription = translate['Blog'] + else: + scopeDescription = translate['Article'] endpoint = 'newblog' elif path.endswith('/newunlisted'): scopeIcon = 'scope_unlisted.png' @@ -2803,12 +2807,20 @@ def htmlNewPost(mediaInstance: bool, translate: {}, iconsDir + '/scope_public.png"/>' + \ translate['Public'] + '
' + \ translate['Visible to anyone'] + '\n' - dropDownContent += " " \ - '
  • ' + \ - translate['Blog'] + '
    ' + \ - translate['Publicly visible post'] + '
  • \n' + if defaultTimeline != 'tlnews': + dropDownContent += " " \ + '
  • ' + \ + translate['Article'] + '
    ' + \ + translate['Create an article'] + '
  • \n' + else: + dropDownContent += " " \ + '
  • ' + \ + translate['Blog'] + '
    ' + \ + translate['Publicly visible post'] + '
  • \n' dropDownContent += " " \ '
  • \n' else: tlStr += \ @@ -6034,10 +6046,13 @@ def getTimelineButtonHeader(defaultTimeline: str, # but may change if this is a blogging oriented instance if defaultTimeline != 'tlblogs': if not minimal or defaultTimeline == 'tlnews': + titleStr = translate['Blogs'] + if defaultTimeline == 'tlnews': + titleStr = translate['Article'] tlStr += \ ' \n' else: if not minimal: