mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Detect all indef block durations
This commit is contained in:
parent
2f42f65a8c
commit
44d38c4cd1
|
@ -98,7 +98,7 @@ async def compact_formatter(action, change, parsed_comment, categories, recent_c
|
|||
link = link_formatter(create_article_path("Special:Contributions/{user}".format(user=user), WIKI_ARTICLE_PATH))
|
||||
except ValueError:
|
||||
link = link_formatter(create_article_path(change["title"], WIKI_ARTICLE_PATH))
|
||||
if change["logparams"]["duration"] in ["infinite", "infinity"]:
|
||||
if change["logparams"]["duration"] in ["infinite", "indefinite", "infinity", "never"]:
|
||||
block_time = _("for infinity and beyond")
|
||||
else:
|
||||
english_length = re.sub(r"(\d+)", "", change["logparams"][
|
||||
|
@ -481,7 +481,7 @@ async def embed_formatter(action, change, parsed_comment, categories, recent_cha
|
|||
link = create_article_path("Special:Contributions/{user}".format(user=user), WIKI_ARTICLE_PATH)
|
||||
except ValueError:
|
||||
link = create_article_path(change["title"], WIKI_ARTICLE_PATH)
|
||||
if change["logparams"]["duration"] in ["infinite", "infinity"]:
|
||||
if change["logparams"]["duration"] in ["infinite", "indefinite", "infinity", "never"]:
|
||||
block_time = _("for infinity and beyond")
|
||||
else:
|
||||
english_length = re.sub(r"(\d+)", "", change["logparams"]["duration"]) # note that translation won't work for millenia and century yet
|
||||
|
|
Loading…
Reference in a new issue