From 203ed8984789d1268a0f906a9e155910345be8d8 Mon Sep 17 00:00:00 2001 From: Markus-Rost Date: Thu, 5 Nov 2020 22:46:04 +0100 Subject: [PATCH] fix compact protect message --- src/formatters/rc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/formatters/rc.py b/src/formatters/rc.py index 81b6176..60eafd2 100644 --- a/src/formatters/rc.py +++ b/src/formatters/rc.py @@ -214,7 +214,7 @@ async def compact_formatter(action, change, parsed_comment, categories, recent_c link = link_formatter(create_article_path(change["title"], WIKI_ARTICLE_PATH)) content = "🔒 "+_("[{author}]({author_url}) protected [{article}]({article_url}) with the following settings: {settings}{comment}").format(author=author, author_url=author_url, article=change["title"], article_url=link, - settings=change["logparams"]["description"]+_(" [cascading]") if "cascade" in change["logparams"] else "", + settings=change["logparams"]["description"]+(_(" [cascading]") if "cascade" in change["logparams"] else ""), comment=parsed_comment) elif action == "protect/modify": link = link_formatter(create_article_path(change["title"], WIKI_ARTICLE_PATH)) @@ -222,7 +222,7 @@ async def compact_formatter(action, change, parsed_comment, categories, recent_c "[{author}]({author_url}) modified protection settings of [{article}]({article_url}) to: {settings}{comment}").format( author=author, author_url=author_url, article=change["title"], article_url=link, - settings=change["logparams"]["description"] + _(" [cascading]") if "cascade" in change["logparams"] else "", + settings=change["logparams"]["description"] + (_(" [cascading]") if "cascade" in change["logparams"] else ""), comment=parsed_comment) elif action == "protect/unprotect": link = link_formatter(create_article_path(change["title"], WIKI_ARTICLE_PATH))