mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-23 00:24:09 +00:00
Extension:DataDump
#183 and linked Special:ManageWiki because the settings are readable by default
This commit is contained in:
parent
4061e1ce59
commit
0f9124d7d6
|
@ -474,6 +474,16 @@ def compact_formatter(action, change, parsed_comment, categories, recent_changes
|
||||||
author=author, author_url=author_url, wiki_name=change["logparams"].get("wiki", _("Unknown")),
|
author=author, author_url=author_url, wiki_name=change["logparams"].get("wiki", _("Unknown")),
|
||||||
comment=parsed_comment
|
comment=parsed_comment
|
||||||
)
|
)
|
||||||
|
elif action == "datadump/generate":
|
||||||
|
content = "🏅 " + _("[{author}]({author_url}) generated *{file}* dump{comment}").format(
|
||||||
|
author=author, author_url=author_url, file=change["logparams"]["filename"],
|
||||||
|
comment=parsed_comment
|
||||||
|
)
|
||||||
|
elif action == "datadump/delete":
|
||||||
|
content = "🏅 " + _("[{author}]({author_url}) deleted *{file}* dump{comment}").format(
|
||||||
|
author=author, author_url=author_url, file=change["logparams"]["filename"],
|
||||||
|
comment=parsed_comment
|
||||||
|
)
|
||||||
elif action == "pagetranslation/mark":
|
elif action == "pagetranslation/mark":
|
||||||
link = create_article_path(change["title"])
|
link = create_article_path(change["title"])
|
||||||
if "?" in link:
|
if "?" in link:
|
||||||
|
@ -1095,35 +1105,41 @@ def embed_formatter(action, change, parsed_comment, categories, recent_changes):
|
||||||
link = create_article_path("Special:Tags")
|
link = create_article_path("Special:Tags")
|
||||||
embed["title"] = _("Deactivated a tag \"{tag}\"").format(tag=change["logparams"]["tag"])
|
embed["title"] = _("Deactivated a tag \"{tag}\"").format(tag=change["logparams"]["tag"])
|
||||||
elif action == "managewiki/settings": # Miraheze's ManageWiki extension https://github.com/miraheze/ManageWiki
|
elif action == "managewiki/settings": # Miraheze's ManageWiki extension https://github.com/miraheze/ManageWiki
|
||||||
link = create_article_path("")
|
link = create_article_path(change["title"])
|
||||||
embed["title"] = _("Changed wiki settings")
|
embed["title"] = _("Changed wiki settings")
|
||||||
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", _("Unknown")))
|
embed["title"] = _("Deleted a \"{wiki}\" wiki").format(wiki=change["logparams"].get("wiki", _("Unknown")))
|
||||||
link = create_article_path("")
|
link = create_article_path(change["title"])
|
||||||
elif action == "managewiki/lock":
|
elif action == "managewiki/lock":
|
||||||
embed["title"] = _("Locked a \"{wiki}\" wiki").format(wiki=change["logparams"].get("wiki", _("Unknown")))
|
embed["title"] = _("Locked a \"{wiki}\" wiki").format(wiki=change["logparams"].get("wiki", _("Unknown")))
|
||||||
link = create_article_path("")
|
link = create_article_path(change["title"])
|
||||||
elif action == "managewiki/namespaces":
|
elif action == "managewiki/namespaces":
|
||||||
embed["title"] = _("Modified a \"{namespace_name}\" namespace").format(namespace_name=change["logparams"].get("namespace", _("Unknown")))
|
embed["title"] = _("Modified a \"{namespace_name}\" namespace").format(namespace_name=change["logparams"].get("namespace", _("Unknown")))
|
||||||
link = create_article_path("")
|
link = create_article_path(change["title"])
|
||||||
embed.add_field(_('Wiki'), change["logparams"].get("wiki", _("Unknown")))
|
embed.add_field(_('Wiki'), change["logparams"].get("wiki", _("Unknown")))
|
||||||
elif action == "managewiki/namespaces-delete":
|
elif action == "managewiki/namespaces-delete":
|
||||||
embed["title"] = _("Deleted a \"{namespace_name}\" namespace").format(
|
embed["title"] = _("Deleted a \"{namespace_name}\" namespace").format(
|
||||||
namespace_name=change["logparams"].get("namespace", _("Unknown")))
|
namespace_name=change["logparams"].get("namespace", _("Unknown")))
|
||||||
link = create_article_path("")
|
link = create_article_path(change["title"])
|
||||||
embed.add_field(_('Wiki'), change["logparams"].get("wiki", _("Unknown")))
|
embed.add_field(_('Wiki'), change["logparams"].get("wiki", _("Unknown")))
|
||||||
elif action == "managewiki/rights":
|
elif action == "managewiki/rights":
|
||||||
group_name = change["title"].split("/permissions/", 1)[1]
|
group_name = change["title"].split("/permissions/", 1)[1]
|
||||||
embed["title"] = _("Modified \"{usergroup_name}\" usergroup").format(usergroup_name=group_name)
|
embed["title"] = _("Modified \"{usergroup_name}\" usergroup").format(usergroup_name=group_name)
|
||||||
link = create_article_path("")
|
link = create_article_path(change["title"])
|
||||||
elif action == "managewiki/undelete":
|
elif action == "managewiki/undelete":
|
||||||
embed["title"] = _("Restored a \"{wiki}\" wiki").format(wiki=change["logparams"].get("wiki", _("Unknown")))
|
embed["title"] = _("Restored a \"{wiki}\" wiki").format(wiki=change["logparams"].get("wiki", _("Unknown")))
|
||||||
link = create_article_path("")
|
link = create_article_path(change["title"])
|
||||||
elif action == "managewiki/unlock":
|
elif action == "managewiki/unlock":
|
||||||
embed["title"] = _("Unlocked a \"{wiki}\" wiki").format(wiki=change["logparams"].get("wiki", _("Unknown")))
|
embed["title"] = _("Unlocked a \"{wiki}\" wiki").format(wiki=change["logparams"].get("wiki", _("Unknown")))
|
||||||
link = create_article_path("")
|
link = create_article_path(change["title"])
|
||||||
|
elif action == "datadump/generate":
|
||||||
|
embed["title"] = _("Generated {file} dump").format(file=change["logparams"]["filename"])
|
||||||
|
link = create_article_path(change["title"])
|
||||||
|
elif action == "datadump/delete":
|
||||||
|
embed["title"] = _("Deleted {file} dump").format(file=change["logparams"]["filename"])
|
||||||
|
link = create_article_path(change["title"])
|
||||||
elif action == "pagetranslation/mark":
|
elif action == "pagetranslation/mark":
|
||||||
link = create_article_path(change["title"])
|
link = create_article_path(change["title"])
|
||||||
if "?" in link:
|
if "?" in link:
|
||||||
|
|
Loading…
Reference in a new issue