fix compact protect message

This commit is contained in:
Markus-Rost 2020-11-05 22:46:04 +01:00
parent 7a91cd2d88
commit 203ed89847

View file

@ -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)) 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, 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, 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) comment=parsed_comment)
elif action == "protect/modify": elif action == "protect/modify":
link = link_formatter(create_article_path(change["title"], WIKI_ARTICLE_PATH)) 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_url}) modified protection settings of [{article}]({article_url}) to: {settings}{comment}").format(
author=author, author_url=author_url, author=author, author_url=author_url,
article=change["title"], article_url=link, 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) comment=parsed_comment)
elif action == "protect/unprotect": elif action == "protect/unprotect":
link = link_formatter(create_article_path(change["title"], WIKI_ARTICLE_PATH)) link = link_formatter(create_article_path(change["title"], WIKI_ARTICLE_PATH))