fix indef blocks, enable newusers, minor fixes

This commit is contained in:
Markus-Rost 2020-08-02 13:37:25 +02:00
parent c37fd141cb
commit 65fe19d9aa
4 changed files with 5 additions and 4 deletions

1
.gitignore vendored
View file

@ -9,3 +9,4 @@ lastchange.txt
/venv/
/lokalize-scripts/
/venvv/
__pycache__

View file

@ -172,7 +172,7 @@ def set_webhook():
settings["webhookURL"] = option
return True
else:
print("The webhook URL should start with https://discord.com/api/webhooks/, are you sure it's the right URL?")
print("A Discord webhook URL should start with https://discord.com/api/webhooks/, are you sure it's the right URL?")
return False
def set_wikiname():

View file

@ -17,7 +17,7 @@
"embed": "",
"compact": ""
},
"ignored": ["external", "newusers/create", "newusers/autocreate", "newusers/create2", "newusers/byemail", "newusers/newusers"],
"ignored": ["external"],
"show_updown_messages": true,
"overview": false,
"overview_time": "00:00",

View file

@ -86,7 +86,7 @@ def compact_formatter(action, change, parsed_comment, categories, recent_changes
link = link_formatter(create_article_path("Special:Contributions/{user}".format(user=user)))
except ValueError:
link = link_formatter(create_article_path(change["title"]))
if change["logparams"]["duration"] == "infinite":
if change["logparams"]["duration"] in ["infinite", "infinity"]:
block_time = _("for infinity and beyond")
else:
english_length = re.sub(r"(\d+)", "", change["logparams"][
@ -507,7 +507,7 @@ def embed_formatter(action, change, parsed_comment, categories, recent_changes):
link = create_article_path("Special:Contributions/{user}".format(user=user))
except ValueError:
link = create_article_path(change["title"].replace(" ", "_").replace(')', '\)'))
if change["logparams"]["duration"] == "infinite":
if change["logparams"]["duration"] in ["infinite", "infinity"]:
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