From 62702229e79b2fbaef019056dd89be5b9594a9ff Mon Sep 17 00:00:00 2001 From: Frisk Date: Mon, 10 Aug 2020 02:21:16 +0200 Subject: [PATCH] Fix for translations of discussion_formatters.py --- src/discussion_formatters.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/discussion_formatters.py b/src/discussion_formatters.py index 69b5f6f..a3c5d53 100644 --- a/src/discussion_formatters.py +++ b/src/discussion_formatters.py @@ -28,14 +28,14 @@ def compact_formatter(post_type, post): if post_type == "FORUM": if not post["isReply"]: thread_funnel = post.get("funnel") - msg_text = "[{author}]({author_url}) created [{title}](<{url}f/p/{threadId}>) in {forumName}" + msg_text = _("[{author}]({author_url}) created [{title}](<{url}f/p/{threadId}>) in {forumName}") if thread_funnel == "POLL": - msg_text = "[{author}]({author_url}) created a poll [{title}](<{url}f/p/{threadId}>) in {forumName}" + msg_text = _("[{author}]({author_url}) created a poll [{title}](<{url}f/p/{threadId}>) in {forumName}") elif thread_funnel == "QUIZ": - msg_text = "[{author}]({author_url}) created a quiz [{title}](<{url}f/p/{threadId}>) in {forumName}" + msg_text = _("[{author}]({author_url}) created a quiz [{title}](<{url}f/p/{threadId}>) in {forumName}") elif thread_funnel != "TEXT": discussion_logger.warning("The type of {} is an unknown discussion post type. Please post an issue on the project page to have it added https://gitlab.com/piotrex43/RcGcDw/-/issues.".format(thread_funnel)) - message = _(msg_text).format(author=author, author_url=author_url, title=post["title"], url=settings["fandom_discussions"]["wiki_url"], threadId=post["threadId"], forumName=post["forumName"]) + message = msg_text.format(author=author, author_url=author_url, title=post["title"], url=settings["fandom_discussions"]["wiki_url"], threadId=post["threadId"], forumName=post["forumName"]) else: message = _("[{author}]({author_url}) created a [reply](<{url}f/p/{threadId}/r/{postId}>) to [{title}](<{url}f/p/{threadId}>) in {forumName}").format(author=author, author_url=author_url, url=settings["fandom_discussions"]["wiki_url"], threadId=post["threadId"], postId=post["id"], title=post["_embedded"]["thread"][0]["title"], forumName=post["forumName"]) elif post_type == "WALL":