diff --git a/daemon.py b/daemon.py index 74469d140..a30c25be2 100644 --- a/daemon.py +++ b/daemon.py @@ -9569,13 +9569,13 @@ class PubServer(BaseHTTPRequestHandler): path: str, httpPrefix: str, nickname: str, domain: str, - domainFull: str): + domainFull: str, systemLanguage: str): """Returns the featured posts collections in actor/collections/featured """ featuredCollection = \ jsonPinPost(baseDir, httpPrefix, - nickname, domain, domainFull) + nickname, domain, domainFull, systemLanguage) msg = json.dumps(featuredCollection, ensure_ascii=False).encode('utf-8') msglen = len(msg) @@ -10795,7 +10795,8 @@ class PubServer(BaseHTTPRequestHandler): getPinnedPostAsJson(self.server.baseDir, self.server.httpPrefix, nickname, self.server.domain, - self.server.domainFull) + self.server.domainFull, + self.server.systemLanguage) messageJson = {} if pinnedPostJson: postId = pinnedPostJson['id'] @@ -10827,7 +10828,8 @@ class PubServer(BaseHTTPRequestHandler): self.path, self.server.httpPrefix, nickname, self.server.domain, - self.server.domainFull) + self.server.domainFull, + self.server.systemLanguage) return if not htmlGET and \ diff --git a/posts.py b/posts.py index 5d8b645fb..8f1f886fe 100644 --- a/posts.py +++ b/posts.py @@ -1342,7 +1342,7 @@ def undoPinnedPost(baseDir: str, nickname: str, domain: str) -> None: def getPinnedPostAsJson(baseDir: str, httpPrefix: str, nickname: str, domain: str, - domainFull: str) -> {}: + domainFull: str, systemLanguage: str) -> {}: """Returns the pinned profile post as json """ accountDir = acctDir(baseDir, nickname, domain) @@ -1363,7 +1363,7 @@ def getPinnedPostAsJson(baseDir: str, httpPrefix: str, ], 'content': pinnedContent, 'contentMap': { - 'en': pinnedContent + systemLanguage: pinnedContent }, 'id': actor + '/pinned', 'inReplyTo': None, @@ -1382,13 +1382,13 @@ def getPinnedPostAsJson(baseDir: str, httpPrefix: str, def jsonPinPost(baseDir: str, httpPrefix: str, nickname: str, domain: str, - domainFull: str) -> {}: + domainFull: str, systemLanguage: str) -> {}: """Returns a pinned post as json """ pinnedPostJson = \ getPinnedPostAsJson(baseDir, httpPrefix, nickname, domain, - domainFull) + domainFull, systemLanguage) itemsList = [] if pinnedPostJson: itemsList = [pinnedPostJson]