mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-24 00:34:10 +00:00
fix ManageWiki to not break stuff
This commit is contained in:
parent
8a296488d3
commit
801c8be2a4
|
@ -366,31 +366,31 @@ def compact_formatter(action, change, parsed_comment, categories, recent_changes
|
||||||
content = "⚙️ "+_("[{author}]({author_url}) changed wiki settings ({reason})".format(author=author, author_url=author_url, reason=parsed_comment))
|
content = "⚙️ "+_("[{author}]({author_url}) changed wiki settings ({reason})".format(author=author, author_url=author_url, reason=parsed_comment))
|
||||||
elif action == "managewiki/delete":
|
elif action == "managewiki/delete":
|
||||||
content = "🗑️ "+_("[{author}]({author_url}) deleted a wiki *{wiki_name}* ({comment})").format(author=author, author_url=author_url,
|
content = "🗑️ "+_("[{author}]({author_url}) deleted a wiki *{wiki_name}* ({comment})").format(author=author, author_url=author_url,
|
||||||
wiki_name=change["logparams"].get("wiki", {"wiki": _("Unknown")}), comment=parsed_comment)
|
wiki_name=change["logparams"].get("wiki", _("Unknown")), comment=parsed_comment)
|
||||||
elif action == "managewiki/lock":
|
elif action == "managewiki/lock":
|
||||||
content = "🔒 "+_("[{author}]({author_url}) locked a wiki *{wiki_name}* ({comment})").format(
|
content = "🔒 "+_("[{author}]({author_url}) locked a wiki *{wiki_name}* ({comment})").format(
|
||||||
author=author, author_url=author_url, wiki_name=change["logparams"].get("wiki", {"wiki": _("Unknown")}), comment=parsed_comment)
|
author=author, author_url=author_url, wiki_name=change["logparams"].get("wiki", _("Unknown")), comment=parsed_comment)
|
||||||
elif action == "managewiki/namespaces":
|
elif action == "managewiki/namespaces":
|
||||||
content = "📦 "+_("[{author}]({author_url}) modified a namespace *{namespace_name}* on *{wiki_name}* ({comment})").format(
|
content = "📦 "+_("[{author}]({author_url}) modified a namespace *{namespace_name}* on *{wiki_name}* ({comment})").format(
|
||||||
author=author, author_url=author_url, namespace_name=change["logparams"].get("namespace", {"namespace": _("Unknown")}),
|
author=author, author_url=author_url, namespace_name=change["logparams"].get("namespace", _("Unknown")),
|
||||||
wiki_name=change["logparams"].get("wiki", {"wiki": _("Unknown")}), comment=parsed_comment)
|
wiki_name=change["logparams"].get("wiki", _("Unknown")), comment=parsed_comment)
|
||||||
elif action == "managewiki/namespaces-delete":
|
elif action == "managewiki/namespaces-delete":
|
||||||
content = "🗑️ " + _(
|
content = "🗑️ " + _(
|
||||||
"[{author}]({author_url}) deleted a namespace *{namespace_name}* on *{wiki_name}* ({comment})").format(
|
"[{author}]({author_url}) deleted a namespace *{namespace_name}* on *{wiki_name}* ({comment})").format(
|
||||||
author=author, author_url=author_url,
|
author=author, author_url=author_url,
|
||||||
namespace_name=change["logparams"].get("namespace", {"namespace": _("Unknown")}),
|
namespace_name=change["logparams"].get("namespace", _("Unknown")),
|
||||||
wiki_name=change["logparams"].get("wiki", {"wiki": _("Unknown")}), comment=parsed_comment)
|
wiki_name=change["logparams"].get("wiki", _("Unknown")), comment=parsed_comment)
|
||||||
elif action == "managewiki/rights":
|
elif action == "managewiki/rights":
|
||||||
content = "🏅 " + _("[{author}]({author_url}) modified user group *{group_name}* ({comment})").format(
|
content = "🏅 " + _("[{author}]({author_url}) modified user group *{group_name}* ({comment})").format(
|
||||||
author=author, author_url=author_url, group_name=change["title"][32:], comment=parsed_comment
|
author=author, author_url=author_url, group_name=change["title"][32:], comment=parsed_comment
|
||||||
)
|
)
|
||||||
elif action == "managewiki/undelete":
|
elif action == "managewiki/undelete":
|
||||||
content = "🏅 " + _("[{author}]({author_url}) restored a wiki *{wiki_name}* ({comment})").format(
|
content = "🏅 " + _("[{author}]({author_url}) restored a wiki *{wiki_name}* ({comment})").format(
|
||||||
author=author, author_url=author_url, wiki_name=change["logparams"].get("wiki", {"wiki": _("Unknown")}), comment=parsed_comment
|
author=author, author_url=author_url, wiki_name=change["logparams"].get("wiki", _("Unknown")), comment=parsed_comment
|
||||||
)
|
)
|
||||||
elif action == "managewiki/unlock":
|
elif action == "managewiki/unlock":
|
||||||
content = "🏅 " + _("[{author}]({author_url}) unlocked a wiki *{wiki_name}* ({comment})").format(
|
content = "🏅 " + _("[{author}]({author_url}) unlocked a wiki *{wiki_name}* ({comment})").format(
|
||||||
author=author, author_url=author_url, wiki_name=change["logparams"].get("wiki", {"wiki": _("Unknown")}),
|
author=author, author_url=author_url, wiki_name=change["logparams"].get("wiki", _("Unknown")),
|
||||||
comment=parsed_comment
|
comment=parsed_comment
|
||||||
)
|
)
|
||||||
elif action == "suppressed":
|
elif action == "suppressed":
|
||||||
|
@ -821,34 +821,28 @@ def embed_formatter(action, change, parsed_comment, categories, recent_changes):
|
||||||
if change["logparams"].get("changes", ""):
|
if change["logparams"].get("changes", ""):
|
||||||
embed.add_field("Setting", change["logparams"].get("changes"))
|
embed.add_field("Setting", change["logparams"].get("changes"))
|
||||||
elif action == "managewiki/delete":
|
elif action == "managewiki/delete":
|
||||||
embed["title"] = _("Deleted a \"{wiki}\" wiki".format(wiki=change["logparams"].get("wiki", {"wiki": _("Unknown")})))
|
embed["title"] = _("Deleted a \"{wiki}\" wiki").format(wiki=change["logparams"].get("wiki", _("Unknown")))
|
||||||
link = create_article_path("")
|
link = create_article_path("")
|
||||||
elif action == "managewiki/lock":
|
elif action == "managewiki/lock":
|
||||||
embed["title"] = _(
|
embed["title"] = _("Locked a \"{wiki}\" wiki").format(wiki=change["logparams"].get("wiki", _("Unknown")))
|
||||||
"Locked a \"{wiki}\" wiki".format(wiki=change["logparams"].get("wiki", {"wiki": _("Unknown")})))
|
|
||||||
link = create_article_path("")
|
link = create_article_path("")
|
||||||
elif action == "managewiki/namespaces":
|
elif action == "managewiki/namespaces":
|
||||||
embed["title"] = _(
|
embed["title"] = _("Modified a \"{namespace_name}\" namespace").format(namespace_name=change["logparams"].get("namespace", _("Unknown")))
|
||||||
"Modified a \"{namespace_name}\" namespace".format(namespace_name=change["logparams"].get("namespace", {"namespace": _("Unknown")})))
|
|
||||||
link = create_article_path("")
|
link = create_article_path("")
|
||||||
embed.add_field(_('Wiki'), change["logparams"].get("wiki", {"wiki": _("Unknown")}))
|
embed.add_field(_('Wiki'), change["logparams"].get("wiki", _("Unknown")))
|
||||||
elif action == "managewiki/namespaces-delete":
|
elif action == "managewiki/namespaces-delete":
|
||||||
embed["title"] = _(
|
embed["title"] = _("Deleted a \"{namespace_name}\" namespace").format(
|
||||||
"Deleted a \"{namespace_name}\" namespace".format(
|
namespace_name=change["logparams"].get("namespace", _("Unknown")))
|
||||||
namespace_name=change["logparams"].get("namespace", {"namespace": _("Unknown")})))
|
|
||||||
link = create_article_path("")
|
link = create_article_path("")
|
||||||
embed.add_field(_('Wiki'), change["logparams"].get("wiki", {"wiki": _("Unknown")}))
|
embed.add_field(_('Wiki'), change["logparams"].get("wiki", _("Unknown")))
|
||||||
elif action == "managewiki/rights":
|
elif action == "managewiki/rights":
|
||||||
embed["title"] = _(
|
embed["title"] = _("Modified \"{usergroup_name}\" usergroup").format(usergroup_name=change["title"][32:])
|
||||||
"Modified \"{usergroup_name}\" usergroup".format(usergroup_name=change["title"][32:]))
|
|
||||||
link = create_article_path("")
|
link = create_article_path("")
|
||||||
elif action == "managewiki/undelete":
|
elif action == "managewiki/undelete":
|
||||||
embed["title"] = _(
|
embed["title"] = _("Restored a \"{wiki}\" wiki").format(wiki=change["logparams"].get("wiki", _("Unknown")))
|
||||||
"Restored a \"{wiki}\" wiki".format(wiki=change["logparams"].get("wiki", {"wiki": _("Unknown")})))
|
|
||||||
link = create_article_path("")
|
link = create_article_path("")
|
||||||
elif action == "managewiki/unlock":
|
elif action == "managewiki/unlock":
|
||||||
embed["title"] = _(
|
embed["title"] = _("Unlocked a \"{wiki}\" wiki").format(wiki=change["logparams"].get("wiki", _("Unknown")))
|
||||||
"Unlocked a \"{wiki}\" wiki".format(wiki=change["logparams"].get("wiki", {"wiki": _("Unknown")})))
|
|
||||||
link = create_article_path("")
|
link = create_article_path("")
|
||||||
elif action == "suppressed":
|
elif action == "suppressed":
|
||||||
link = create_article_path("")
|
link = create_article_path("")
|
||||||
|
|
Loading…
Reference in a new issue