From 1aa2df4e2f53781e445fd863c982365ac1e76a2f Mon Sep 17 00:00:00 2001 From: Frisk Date: Wed, 27 Jun 2018 16:43:13 +0200 Subject: [PATCH 01/18] Still not working Discord error handling --- rcgcdw.py | 60 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/rcgcdw.py b/rcgcdw.py index e0635f7..2f00e6d 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -41,10 +41,7 @@ else: _ = lambda s: s def send(message, name, avatar): - try: - req = requests.post(settings["webhookURL"], data={"content": message, "avatar_url": avatar, "username": name}, timeout=10) - except: - pass + recent_changes.discord_message_query.append({"content": message, "avatar_url": avatar, "username": name}) def safe_read(request, *keys): if request is None: @@ -318,28 +315,25 @@ def webhook_formatter(action, STATIC, **params): data["embeds"].append(dict(embed)) data['avatar_url'] = settings["avatars"]["embed"] formatted_embed = json.dumps(data, indent=4) - headers = {'Content-Type': 'application/json'} - #logging.debug(data) - result = requests.post(settings["webhookURL"], data=formatted_embed, headers=headers) - if result.status_code != requests.codes.ok: - handle_discord_http(result.status_code, formatted_embed, headers) + recent_changes.discord_message_query.append(formatted_embed) -def handle_discord_http(code, formatted_embed, headers): - if code == 204: #message went through - return +def handle_discord_http(code, formatted_embed): + if 300 > code > 199: #message went through + return 0 elif code == 400: #HTTP BAD REQUEST logging.error("Following message has been rejected by Discord, please submit a bug on our bugtracker adding it:") logging.error(formatted_embed) + return 0 elif code == 401: #HTTP UNAUTHORIZED - logging.error("Webhook URL is invalid or no longer in use, please replace it with proper one.") + logging.critical("Webhook URL is invalid or no longer in use, please replace it with proper one. Use Ctrl-C to leave the script.") + sys.exit(1) elif code == 429: logging.error("We are sending too many requests to the Discord, slowing down...") - time.sleep(20.0) - result = requests.post(settings["webhookURL"], data=formatted_embed, headers=headers) #TODO Replace this solution with less obscure one - elif code > 500 and code < 600: + time.sleep(15.0) + return 1 + elif 600 > code > 499: logging.error("Discord have trouble processing the event, and because the HTTP code returned is 500> it means we blame them.") - time.sleep(20.0) - result = requests.post(settings["webhookURL"], data=formatted_embed, headers=headers) + return 2 def first_pass(change): #I've decided to split the embed formatter and change handler, maybe it's more messy this way, I don't know parsedcomment = (BeautifulSoup(change["parsedcomment"], "lxml")).get_text() @@ -356,11 +350,10 @@ def first_pass(change): #I've decided to split the embed formatter and change ha combination = "{logtype}/{logaction}".format(logtype=logtype, logaction=logaction) logging.debug("combination is {}".format(combination)) try: - settings["appearance"][combination] + STATIC_VARS = {**STATIC_VARS ,**{"color": settings["appearance"][combination]["color"], "icon": settings["appearance"][combination]["icon"]}} except KeyError: STATIC_VARS = {**STATIC_VARS ,**{"color": "", "icon": ""}} logging.error("No value in the settings has been given for {}".format(combination)) - STATIC_VARS = {**STATIC_VARS ,**{"color": settings["appearance"][combination]["color"], "icon": settings["appearance"][combination]["icon"]}} if logtype=="protect" and logaction=="protect": webhook_formatter(2, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, settings=change["logparams"]["description"]) elif logtype=="protect" and logaction=="modify": @@ -550,9 +543,8 @@ def day_overview(): #time.strftime('%Y-%m-%dT%H:%M:%S.000Z', time.gmtime(time.ti data = {} data["embeds"] = [dict(embed)] formatted_embed = json.dumps(data, indent=4) - headers = {'Content-Type': 'application/json'} logging.debug(formatted_embed) - result = requests.post(settings["webhookURL"], data=formatted_embed, headers=headers) + recent_changes.discord_message_query.append(formatted_embed) else: logging.debug("function requesting changes for day overview returned with error code") @@ -565,6 +557,7 @@ class recent_changes_class(object): last_downtime = 0 clock = 0 tags = {} + discord_message_query = [] if settings["limitrefetch"] != -1: with open("lastchange.txt", "r") as record: file_content = record.read().strip() @@ -576,6 +569,27 @@ class recent_changes_class(object): file_id = 999999999 else: file_id = 999999999 #such value won't cause trouble, and it will make sure no refetch happens + def send_from_query(self): + for num, item in enumerate(self.discord_message_query): + try: + result = requests.post(settings["webhookURL"], data=item, headers={**{'Content-Type': 'application/json'}, **settings["header"]}, timeout=10) + except requests.exceptions.Timeout: + logging.warning("Timeouted while sending data to the webhook.") + break + except requests.exceptions.ConnectionError: + logging.warning("Connection error while sending the data to a webhook") + break + else: + code = handle_discord_http(result.status_code, item) + if code == 0: + pass + elif code == 1: + self.send_from_query() + break + elif code == 2: + break + time.sleep(3.0) #sadly, the time here needs to be quite high, otherwise we are being rate-limited by the Discord, especially during re-fetch + self.discord_message_query = self.discord_message_query[num:] def add_cache(self, change): self.ids.append(change["rcid"]) #self.recent_id = change["rcid"] @@ -619,7 +633,6 @@ class recent_changes_class(object): logging.debug("Rejected {val}".format(val=change["rcid"])) continue first_pass(change) - time.sleep(3.0) #sadly, the time here needs to be quite high, otherwise we are being rate-limited by the Discord, especially during re-fetch return change["rcid"] def safe_request(self, url): try: @@ -689,3 +702,4 @@ schedule.every().day.at("00:00").do(recent_changes.clear_cache) while 1: time.sleep(1.0) schedule.run_pending() + recent_changes.send_from_query() From df38f13c31e038fcc542444bd727552c731dfc83 Mon Sep 17 00:00:00 2001 From: Frisk Date: Tue, 3 Jul 2018 22:16:39 +0200 Subject: [PATCH 02/18] Even more commas --- rcgcdw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rcgcdw.py b/rcgcdw.py index acad31c..08e8ba8 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -406,7 +406,7 @@ def first_pass(change): #I've decided to split the embed formatter and change ha elif logtype=="block": webhook_formatter(19, STATIC_VARS, user=change["user"], blocked_user=change["title"], desc=parsedcomment) elif logtype=="rights": - webhook_formatter(20, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, old_groups=' '.join(change["logparams"]["oldgroups"]), new_groups=' '.join(change["logparams"]["newgroups"])) + webhook_formatter(20, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, old_groups=', '.join(change["logparams"]["oldgroups"]), new_groups=', '.join(change["logparams"]["newgroups"])) elif logtype=="abusefilter": webhook_formatter(21, STATIC_VARS, user=change["user"], desc=parsedcomment, filternr=change["logparams"]['1']) elif logtype=="interwiki" and logaction=="iw_add": From 5e4719226b4f36572740cd3f2322a36af87883e5 Mon Sep 17 00:00:00 2001 From: Frisk Date: Wed, 4 Jul 2018 20:47:55 +0200 Subject: [PATCH 03/18] Updated readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0b112fc..0e397dd 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ Translators: Script seem to use about 10-17MB of RAM and negligible amount of CPU when fetching changes. Script does not log bot actions by default. "I GoT "Unable to process the event" mESSage!!! WHaT HApND?" - it means there is some kind of action that does not have a template in the script, please [create a ticket](https://gitlab.com/piotrex43/RcGcDw/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=) with information on what wiki this error ocurred and when. -[Here](https://framapic.org/rVFQD0NQVcok/Ue1SVHHM0e4V.png) is a screenshot of how few embeds look like. +[Here](https://imgur.com/a/ACOMyak) are screenshots of how few embeds look like. ### License ### Everything except the locale directory is under GNU Affero General Public License v3.0 license. The translations are used with allowance of translators, and all rights to them are owned by their respective authors. From b41a9fd3558cb43063005f5d56a0c969f4f2d34b Mon Sep 17 00:00:00 2001 From: Frisk Date: Wed, 4 Jul 2018 23:57:06 +0200 Subject: [PATCH 04/18] New approach --- rcgcdw.py | 176 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 101 insertions(+), 75 deletions(-) diff --git a/rcgcdw.py b/rcgcdw.py index 2f00e6d..cdba079 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -41,7 +41,10 @@ else: _ = lambda s: s def send(message, name, avatar): - recent_changes.discord_message_query.append({"content": message, "avatar_url": avatar, "username": name}) + try: + req = requests.post(settings["webhookURL"], data={"content": message, "avatar_url": avatar, "username": name}, timeout=10) + except: + pass def safe_read(request, *keys): if request is None: @@ -57,7 +60,33 @@ def safe_read(request, *keys): logging.warning("Failure while extracting data from request in {change}".format(change=request)) return None return request + +def send_to_discord_webhook(data): + try: + result = requests.post(settings["webhookURL"], data=data, headers={'Content-Type': 'application/json'}, timeout=10) + except requests.exceptions.Timeout: + logging.warning("Timeouted while sending data to the webhook.") + return 3 + except requests.exceptions.ConnectionError: + logging.warning("Connection error while sending the data to a webhook") + return 3 + else: + return handle_discord_http(result.status_code, data) +def send_to_discord(data): + if recent_changes.unsent_messages: + recent_changes.unsent_messages.append(data) + else: + code = send_to_discord_webhook(data) + if code == 3: + recent_changes.unsent_messages.append(data) + elif code == 2: + time.sleep(5.0) + recent_changes.unsent_messages.append(data) + elif code < 2: + time.sleep(2.5) + pass + def webhook_formatter(action, STATIC, **params): logging.debug("Received things: {thing}".format(thing=params)) colornumber = None if isinstance(STATIC["color"], str) else STATIC["color"] @@ -99,43 +128,50 @@ def webhook_formatter(action, STATIC, **params): link = "https://{wiki}.gamepedia.com/index.php?title={article}&curid={pageid}&diff={diff}&oldid={oldrev}".format(wiki=settings["wiki"], pageid=params["pageid"], diff=params["diff"], oldrev=params["oldrev"], article=article_encoded) embed["title"] = "{article} ({new}{minor}{editsize})".format(article=params["title"], editsize="+"+str(editsize) if editsize>0 else editsize, new= _("(N!) ") if action == 37 else "", minor=_("m ") if action == 1 and params["minor"] else "") elif action == 5: #sending files + license = None urls = safe_read(recent_changes.safe_request("https://{wiki}.gamepedia.com/api.php?action=query&format=json&prop=imageinfo&list=&meta=&titles={filename}&iiprop=timestamp%7Curl&iilimit=2".format(wiki=settings["wiki"], filename=params["title"])), "query", "pages") undolink = "" link ="https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) + additional_info_retrieved = False if urls is not None: - img_info = next(iter(urls.values()))["imageinfo"] - embed["image"]["url"] = img_info[0]["url"] + if "-1" not in urls: #oage removed before we asked for it + img_info = next(iter(urls.values()))["imageinfo"] + embed["image"]["url"] = img_info[0]["url"] + additional_info_retrieved = True else: - return + pass if params["overwrite"]: - img_timestamp = [x for x in img_info[1]["timestamp"] if x.isdigit()] - undolink = "https://{wiki}.gamepedia.com/index.php?title={filename}&action=revert&oldimage={timestamp}%21{filenamewon}".format(wiki=settings["wiki"], filename=article_encoded, timestamp="".join(img_timestamp), filenamewon = article_encoded[5:]) + if additional_info_retrieved: + img_timestamp = [x for x in img_info[1]["timestamp"] if x.isdigit()] + undolink = "https://{wiki}.gamepedia.com/index.php?title={filename}&action=revert&oldimage={timestamp}%21{filenamewon}".format(wiki=settings["wiki"], filename=article_encoded, timestamp="".join(img_timestamp), filenamewon = article_encoded[5:]) + embed["fields"] = [{"name": _("Options"), "value": _("([preview]({link}) | [undo]({undolink}))").format(link=embed["image"]["url"], undolink=undolink)}] embed["title"] = _("Uploaded a new version of {name}").format(name=params["title"]) - embed["fields"] = [{"name": _("Options"), "value": _("([preview]({link}) | [undo]({undolink}))").format(link=embed["image"]["url"], undolink=undolink)}] else: embed["title"] = _("Uploaded {name}").format(name=params["title"]) article_content = safe_read(recent_changes.safe_request("https://{wiki}.gamepedia.com/api.php?action=query&format=json&prop=revisions&titles={article}&rvprop=content".format(wiki=settings["wiki"], article=quote_plus(params["title"], safe=''))), "query", "pages") if article_content is None: logging.warning("Something went wrong when getting license for the image") return 0 - content = list(article_content.values())[0]['revisions'][0]['*'] - try: - matches = re.search(re.compile(settings["license_regex"], re.IGNORECASE), content) - if matches is not None: - license = matches.group("license") - else: - if re.search(re.compile(settings["license_regex_detect"], re.IGNORECASE), content) is None: - license = _("**No license!**") + if "-1" not in article_content: + content = list(article_content.values())[0]['revisions'][0]['*'] + try: + matches = re.search(re.compile(settings["license_regex"], re.IGNORECASE), content) + if matches is not None: + license = matches.group("license") else: - license = "?" - except IndexError: - logging.error("Given regex for the license detection is incorrect. It does not have a capturing group called \"license\" specified. Please fix license_regex value in the config!") - license = "?" - except re.error: - logging.error("Given regex for the license detection is incorrect. Please fix license_regex or license_regex_detect values in the config!") - license = "?" - embed["fields"] = [{"name": _("Options"), "value": _("([preview]({link}))").format(link=embed["image"]["url"])}] - params["desc"] = _("{desc}\nLicense: {license}").format(desc=params["desc"], license=license) + if re.search(re.compile(settings["license_regex_detect"], re.IGNORECASE), content) is None: + license = _("**No license!**") + else: + license = "?" + except IndexError: + logging.error("Given regex for the license detection is incorrect. It does not have a capturing group called \"license\" specified. Please fix license_regex value in the config!") + license = "?" + except re.error: + logging.error("Given regex for the license detection is incorrect. Please fix license_regex or license_regex_detect values in the config!") + license = "?" + if additional_info_retrieved: + embed["fields"] = [{"name": _("Options"), "value": _("([preview]({link}))").format(link=embed["image"]["url"])}] + params["desc"] = _("{desc}\nLicense: {license}").format(desc=params["desc"], license=license if license is not None else "?") elif action == 6: link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) embed["title"] = _("Deleted page {article}").format(article=params["title"]) @@ -210,8 +246,8 @@ def webhook_formatter(action, STATIC, **params): #link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)')) embed["title"] = _("Deleted a comment on {target}'s profile").format(target=params["target"]) elif action == 20: - link = "https://{wiki}.gamepedia.com/"+params["user"].replace(" ", "_").replace(')', '\)') - embed["title"] = _("Changed group membership for {target}").format(target=params["user"]) + link = "https://{wiki}.gamepedia.com/User:".format(wiki=settings["wiki"])+params["title"].split(":")[1] + embed["title"] = _("Changed group membership for {target}").format(target=params["title"].split(":")[1]) if params["old_groups"].count(' ') < params["new_groups"].count(' '): embed["thumbnail"]["url"] = "https://i.imgur.com/WnGhF5g.gif" if len(params["old_groups"]) < 4: @@ -221,24 +257,24 @@ def webhook_formatter(action, STATIC, **params): reason = "| {desc}".format(desc=params["desc"]) if params["desc"]!=_("No description provided") else "" params["desc"] = _("Groups changed from {old_groups} to {new_groups} {reason}").format(old_groups=params["old_groups"], new_groups=params["new_groups"], reason=reason) elif action == 2: - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) embed["title"] = _("Protected {target}").format(target=params["title"]) params["desc"] = params["settings"] + " | " + params["desc"] elif action == 3: - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) embed["title"] = _("Changed protection level for {article}").format(article=params["title"]) params["desc"] = params["settings"] + " | " + params["desc"] elif action == 4: - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) embed["title"] = _("Removed protection from {article}").format(article=params["title"]) elif action == 9: - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) embed["title"] = _("Changed visibility of revision(s) on page {article} ").format(article=params["title"]) elif action == 11: - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) embed["title"] = _("Imported {article} with {count} revision(s)").format(article=params["title"], count=params["amount"]) elif action == 8: - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) embed["title"] = _("Restored {article}").format(article=params["title"]) elif action == 10: link = "https://{wiki}.gamepedia.com/Special:RecentChanges".format(wiki=settings["wiki"]) @@ -250,7 +286,7 @@ def webhook_formatter(action, STATIC, **params): link = "https://{wiki}.gamepedia.com/Special:RecentChanges".format(wiki=settings["wiki"]) embed["title"] = _("Edited abuse filter number {number}").format(number=params["filternr"]) elif action == 13: - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) embed["title"] = _("Merged revision histories of {article} into {dest}").format(article=params["title"], dest=params["destination"]) elif action == 22: link = "https://{wiki}.gamepedia.com/Special:Interwiki".format(wiki=settings["wiki"]) @@ -265,31 +301,31 @@ def webhook_formatter(action, STATIC, **params): embed["title"] = _("Deleted an entry in interwiki table") params["desc"] =_("Prefix: {prefix} | {desc}").format(desc=params["desc"], prefix=params["prefix"]) elif action == 30: - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) embed["title"] = _("Changed the content model of the page {article}").format(article=params["title"]) params["desc"] = _("Model changed from {old} to {new}: {reason}").format(old=params["oldmodel"], new=params["newmodel"], reason=params["desc"]) elif action == 31: - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) embed["title"] = _("Edited the sprite for {article}").format(article=params["title"]) elif action == 32: - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) embed["title"] = _("Created the sprite sheet for {article}").format(article=params["title"]) elif action == 33: - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) embed["title"] = _("Edited the slice for {article}").format(article=params["title"]) elif action == 34: - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) + link = "https://{wiki}.gamepedia.com/Special:Tags" embed["title"] = _("Created a tag \"{tag}\"").format(tag=params["additional"]["tag"]) recent_changes.update_tags() elif action == 35: - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) + link = "https://{wiki}.gamepedia.com/Special:Tags" embed["title"] = _("Deleted a tag \"{tag}\"").format(tag=params["additional"]["tag"]) recent_changes.update_tags() elif action == 36: - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) + link = "https://{wiki}.gamepedia.com/Special:Tags" embed["title"] = _("Activated a tag \"{tag}\"").format(tag=params["additional"]["tag"]) elif action == 38: - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) + link = "https://{wiki}.gamepedia.com/Special:Tags" embed["title"] = _("Deactivated a tag \"{tag}\"").format(tag=params["additional"]["tag"]) else: logging.warning("No entry for {event} with params: {params}".format(event=action, params=params)) @@ -315,25 +351,31 @@ def webhook_formatter(action, STATIC, **params): data["embeds"].append(dict(embed)) data['avatar_url'] = settings["avatars"]["embed"] formatted_embed = json.dumps(data, indent=4) - recent_changes.discord_message_query.append(formatted_embed) + headers = {'Content-Type': 'application/json'} + #logging.debug(data) + result = requests.post(settings["webhookURL"], data=formatted_embed, headers=headers) + if result.status_code != requests.codes.ok: + handle_discord_http(result.status_code, formatted_embed, headers) def handle_discord_http(code, formatted_embed): - if 300 > code > 199: #message went through + if code <300 and code > 199: #message went through return 0 elif code == 400: #HTTP BAD REQUEST logging.error("Following message has been rejected by Discord, please submit a bug on our bugtracker adding it:") logging.error(formatted_embed) - return 0 + return 1 elif code == 401: #HTTP UNAUTHORIZED - logging.critical("Webhook URL is invalid or no longer in use, please replace it with proper one. Use Ctrl-C to leave the script.") + logging.error("Webhook URL is invalid or no longer in use, please replace it with proper one.") sys.exit(1) + return 1 elif code == 429: logging.error("We are sending too many requests to the Discord, slowing down...") - time.sleep(15.0) - return 1 - elif 600 > code > 499: - logging.error("Discord have trouble processing the event, and because the HTTP code returned is 500> it means we blame them.") + time.sleep(20.0) return 2 + elif code > 500 and code < 600: + logging.error("Discord have trouble processing the event, and because the HTTP code returned is 500> it means we blame them.") + time.sleep(20.0) + return 3 def first_pass(change): #I've decided to split the embed formatter and change handler, maybe it's more messy this way, I don't know parsedcomment = (BeautifulSoup(change["parsedcomment"], "lxml")).get_text() @@ -393,7 +435,7 @@ def first_pass(change): #I've decided to split the embed formatter and change ha elif logtype=="block": webhook_formatter(19, STATIC_VARS, user=change["user"], blocked_user=change["title"], desc=parsedcomment) elif logtype=="rights": - webhook_formatter(20, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, old_groups=' '.join(change["logparams"]["oldgroups"]), new_groups=' '.join(change["logparams"]["newgroups"])) + webhook_formatter(20, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, old_groups=', '.join(change["logparams"]["oldgroups"]), new_groups=', '.join(change["logparams"]["newgroups"])) elif logtype=="abusefilter": webhook_formatter(21, STATIC_VARS, user=change["user"], desc=parsedcomment, filternr=change["logparams"]['1']) elif logtype=="interwiki" and logaction=="iw_add": @@ -543,8 +585,7 @@ def day_overview(): #time.strftime('%Y-%m-%dT%H:%M:%S.000Z', time.gmtime(time.ti data = {} data["embeds"] = [dict(embed)] formatted_embed = json.dumps(data, indent=4) - logging.debug(formatted_embed) - recent_changes.discord_message_query.append(formatted_embed) + send_to_discord(formatted_embed) else: logging.debug("function requesting changes for day overview returned with error code") @@ -557,7 +598,7 @@ class recent_changes_class(object): last_downtime = 0 clock = 0 tags = {} - discord_message_query = [] + unsent_messages = [] if settings["limitrefetch"] != -1: with open("lastchange.txt", "r") as record: file_content = record.read().strip() @@ -569,33 +610,19 @@ class recent_changes_class(object): file_id = 999999999 else: file_id = 999999999 #such value won't cause trouble, and it will make sure no refetch happens - def send_from_query(self): - for num, item in enumerate(self.discord_message_query): - try: - result = requests.post(settings["webhookURL"], data=item, headers={**{'Content-Type': 'application/json'}, **settings["header"]}, timeout=10) - except requests.exceptions.Timeout: - logging.warning("Timeouted while sending data to the webhook.") - break - except requests.exceptions.ConnectionError: - logging.warning("Connection error while sending the data to a webhook") - break - else: - code = handle_discord_http(result.status_code, item) - if code == 0: - pass - elif code == 1: - self.send_from_query() - break - elif code == 2: - break - time.sleep(3.0) #sadly, the time here needs to be quite high, otherwise we are being rate-limited by the Discord, especially during re-fetch - self.discord_message_query = self.discord_message_query[num:] def add_cache(self, change): self.ids.append(change["rcid"]) #self.recent_id = change["rcid"] if len(self.ids) > settings["limit"]+5: self.ids.pop(0) def fetch(self, amount=settings["limit"]): + if self.unsent_messages: + for num, item in enumerate(self.unsent_messages): + if send_to_discord_webhook(item) < 2: + pass + else: + break + self.unsent_messages = self.unsent_messages[num-1:] last_check = self.fetch_changes(amount=amount) self.recent_id = last_check if last_check is not None else self.recent_id if settings["limitrefetch"] != -1 and self.recent_id != self.file_id: @@ -702,4 +729,3 @@ schedule.every().day.at("00:00").do(recent_changes.clear_cache) while 1: time.sleep(1.0) schedule.run_pending() - recent_changes.send_from_query() From b21098b7ab0bc9af2840fdcbfbc335a3c719fc87 Mon Sep 17 00:00:00 2001 From: Frisk Date: Thu, 5 Jul 2018 00:05:26 +0200 Subject: [PATCH 05/18] More work on the #17 --- rcgcdw.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/rcgcdw.py b/rcgcdw.py index cdba079..1bc4989 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -41,10 +41,7 @@ else: _ = lambda s: s def send(message, name, avatar): - try: - req = requests.post(settings["webhookURL"], data={"content": message, "avatar_url": avatar, "username": name}, timeout=10) - except: - pass + send_to_discord({"content": message, "avatar_url": avatar, "username": name}) def safe_read(request, *keys): if request is None: @@ -351,11 +348,7 @@ def webhook_formatter(action, STATIC, **params): data["embeds"].append(dict(embed)) data['avatar_url'] = settings["avatars"]["embed"] formatted_embed = json.dumps(data, indent=4) - headers = {'Content-Type': 'application/json'} - #logging.debug(data) - result = requests.post(settings["webhookURL"], data=formatted_embed, headers=headers) - if result.status_code != requests.codes.ok: - handle_discord_http(result.status_code, formatted_embed, headers) + send_to_discord(formatted_embed) def handle_discord_http(code, formatted_embed): if code <300 and code > 199: #message went through @@ -619,7 +612,7 @@ class recent_changes_class(object): if self.unsent_messages: for num, item in enumerate(self.unsent_messages): if send_to_discord_webhook(item) < 2: - pass + time.sleep(2.5) else: break self.unsent_messages = self.unsent_messages[num-1:] From 23d166023f1baf2212e5c2f6b1f8b2388afe3ca3 Mon Sep 17 00:00:00 2001 From: Frisk Date: Thu, 5 Jul 2018 11:55:34 +0200 Subject: [PATCH 06/18] Fixed critical bug --- rcgcdw.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rcgcdw.py b/rcgcdw.py index 1bc4989..47b1332 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -610,12 +610,19 @@ class recent_changes_class(object): self.ids.pop(0) def fetch(self, amount=settings["limit"]): if self.unsent_messages: + logging.debug(self.unsent_messages) for num, item in enumerate(self.unsent_messages): + sent = False + logging.debug(str(num) + str(item)) if send_to_discord_webhook(item) < 2: + sent = True time.sleep(2.5) else: break - self.unsent_messages = self.unsent_messages[num-1:] + if len(self.unsent_messages)-1 == num and sent: + self.unsent_messages = [] + self.unsent_messages = self.unsent_messages[num:] + logging.debug(self.unsent_messages) last_check = self.fetch_changes(amount=amount) self.recent_id = last_check if last_check is not None else self.recent_id if settings["limitrefetch"] != -1 and self.recent_id != self.file_id: From d9a3ec753a7173783cb262ee27d09087e6ef50d6 Mon Sep 17 00:00:00 2001 From: Frisk Date: Thu, 5 Jul 2018 13:35:36 +0200 Subject: [PATCH 07/18] Simplified --- rcgcdw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rcgcdw.py b/rcgcdw.py index 47b1332..ea4f555 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -619,7 +619,7 @@ class recent_changes_class(object): time.sleep(2.5) else: break - if len(self.unsent_messages)-1 == num and sent: + else: self.unsent_messages = [] self.unsent_messages = self.unsent_messages[num:] logging.debug(self.unsent_messages) From 64bf3b7e9e8fb16e19e7e204c3c672822353f65a Mon Sep 17 00:00:00 2001 From: Frisk Date: Thu, 5 Jul 2018 13:45:01 +0200 Subject: [PATCH 08/18] Mode debug messages --- rcgcdw.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/rcgcdw.py b/rcgcdw.py index ea4f555..bce3b23 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -603,24 +603,27 @@ class recent_changes_class(object): file_id = 999999999 else: file_id = 999999999 #such value won't cause trouble, and it will make sure no refetch happens + def add_cache(self, change): self.ids.append(change["rcid"]) #self.recent_id = change["rcid"] if len(self.ids) > settings["limit"]+5: self.ids.pop(0) + def fetch(self, amount=settings["limit"]): if self.unsent_messages: - logging.debug(self.unsent_messages) + logging.info("{} messages waiting to be delivered to Discord due to Discord throwing errors/no connection to Discord servers.".format(len(self.unsent_messages))) for num, item in enumerate(self.unsent_messages): - sent = False - logging.debug(str(num) + str(item)) + logging.debug("Trying to send a message to Discord from the queue with id of {} and content {}".format(str(num), str(item))) if send_to_discord_webhook(item) < 2: - sent = True + logging.debug("Sending message succeeded") time.sleep(2.5) else: + logging.debug("Sending message failed") break else: self.unsent_messages = [] + logging.debug("Queue emptied, all messages delivered") self.unsent_messages = self.unsent_messages[num:] logging.debug(self.unsent_messages) last_check = self.fetch_changes(amount=amount) @@ -630,6 +633,7 @@ class recent_changes_class(object): with open("lastchange.txt", "w") as record: record.write(str(self.file_id)) logging.debug("Most recent rcid is: {}".format(self.recent_id)) + def fetch_changes(self, amount, clean=False): if len(self.ids) == 0: logging.debug("ids is empty, triggering clean fetch") @@ -661,6 +665,7 @@ class recent_changes_class(object): continue first_pass(change) return change["rcid"] + def safe_request(self, url): try: request = requests.get(url, timeout=10, headers=settings["header"]) @@ -674,6 +679,7 @@ class recent_changes_class(object): return None else: return request + def check_connection(self, looped=False): online = 0 for website in ["https://google.com", "https://instagram.com", "https://steamcommunity.com"]: @@ -694,6 +700,7 @@ class recent_changes_class(object): time.sleep(10) return False return True + def downtime_controller(self): if settings["show_updown_messages"] == False: return @@ -703,8 +710,10 @@ class recent_changes_class(object): if(time.time() - self.last_downtime)>1800 and self.check_connection(): #check if last downtime happened within 30 minutes, if yes, don't send a message send(_("{wiki} seems to be down or unreachable.").format(wiki=settings["wikiname"]), _("Connection status"), settings["avatars"]["connection_failed"]) self.last_downtime = time.time() + def clear_cache(self): self.map_ips = {} + def update_tags(self): tags_read = safe_read(self.safe_request("https://{wiki}.gamepedia.com/api.php?action=query&format=json&list=tags&tgprop=name%7Cdisplayname".format(wiki=settings["wiki"])), "query", "tags") if tags_read: From 36126f63be17a2f0b6f9a2e93eb45c30481a9d85 Mon Sep 17 00:00:00 2001 From: Frisk Date: Thu, 5 Jul 2018 14:12:23 +0200 Subject: [PATCH 09/18] Small improvements --- rcgcdw.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/rcgcdw.py b/rcgcdw.py index bce3b23..329ad24 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -60,7 +60,7 @@ def safe_read(request, *keys): def send_to_discord_webhook(data): try: - result = requests.post(settings["webhookURL"], data=data, headers={'Content-Type': 'application/json'}, timeout=10) + result = requests.post(settings["webhookURL"], data=data, headers={**{'Content-Type': 'application/json'}, **settings["header"]}, timeout=10) except requests.exceptions.Timeout: logging.warning("Timeouted while sending data to the webhook.") return 3 @@ -107,7 +107,7 @@ def webhook_formatter(action, STATIC, **params): params["user"] = "{author} ({amount})".format(author=params["user"], amount=recent_changes.map_ips[params["user"]]) else: author_url = "https://{wiki}.gamepedia.com/User:{user}".format(wiki=settings["wiki"], user=params["user"].replace(" ", "_")) - if action in [1, 37]: #edit or new page + if action in (1, 37): #edit or new page editsize = params["size"] print (editsize) if editsize > 0: @@ -357,17 +357,15 @@ def handle_discord_http(code, formatted_embed): logging.error("Following message has been rejected by Discord, please submit a bug on our bugtracker adding it:") logging.error(formatted_embed) return 1 - elif code == 401: #HTTP UNAUTHORIZED + elif code == 401 or code == 404: #HTTP UNAUTHORIZED AND NOT FOUND logging.error("Webhook URL is invalid or no longer in use, please replace it with proper one.") sys.exit(1) return 1 elif code == 429: logging.error("We are sending too many requests to the Discord, slowing down...") - time.sleep(20.0) return 2 elif code > 500 and code < 600: - logging.error("Discord have trouble processing the event, and because the HTTP code returned is 500> it means we blame them.") - time.sleep(20.0) + logging.error("Discord have trouble processing the event, and because the HTTP code returned is {} it means we blame them.".format(code)) return 3 def first_pass(change): #I've decided to split the embed formatter and change handler, maybe it's more messy this way, I don't know From bfe484f750a76bb6bac173864f3f3e070f428ead Mon Sep 17 00:00:00 2001 From: Frisk Date: Thu, 5 Jul 2018 14:13:04 +0200 Subject: [PATCH 10/18] Added #19 --- rcgcdw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rcgcdw.py b/rcgcdw.py index 329ad24..818d3aa 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -252,7 +252,7 @@ def webhook_formatter(action, STATIC, **params): if len(params["new_groups"]) < 4: params["new_groups"] = _("none") reason = "| {desc}".format(desc=params["desc"]) if params["desc"]!=_("No description provided") else "" - params["desc"] = _("Groups changed from {old_groups} to {new_groups} {reason}").format(old_groups=params["old_groups"], new_groups=params["new_groups"], reason=reason) + params["desc"] = _("Groups changed from {old_groups} to {new_groups}{is_reason} {reason}").format(old_groups=params["old_groups"], new_groups=params["new_groups"], is_reason = ":" if reason else "", reason=reason) elif action == 2: link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) embed["title"] = _("Protected {target}").format(target=params["title"]) From 006bd17360115d34e2b1c653c0ba48af3818ed6a Mon Sep 17 00:00:00 2001 From: Frisk Date: Thu, 5 Jul 2018 18:38:42 +0200 Subject: [PATCH 11/18] Fixes, added #6 --- README.md | 2 + locale/de/LC_MESSAGES/rcgcdw.mo | Bin 6858 -> 6982 bytes locale/de/LC_MESSAGES/rcgcdw.po | 188 ++++++++++++++++--------------- locale/fr/LC_MESSAGES/rcgcdw.mo | Bin 6900 -> 6921 bytes locale/fr/LC_MESSAGES/rcgcdw.po | 191 ++++++++++++++++---------------- locale/pl/LC_MESSAGES/rcgcdw.mo | Bin 6892 -> 7019 bytes locale/pl/LC_MESSAGES/rcgcdw.po | 188 ++++++++++++++++--------------- rcgcdw.pot | 184 +++++++++++++++--------------- rcgcdw.py | 13 ++- settings.json.example | 3 +- 10 files changed, 398 insertions(+), 371 deletions(-) diff --git a/README.md b/README.md index 0e397dd..b1ea2c9 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,9 @@ Everything except the locale directory is under GNU Affero General Public Licens ### Currently running on ### There are several Discord server, the script is already running on, you can join them and see it working. +[Conan Exiles](https://discord.gg/5252dZh) [Minecraft Wiki English](https://discord.gg/fGdE5ZE) [Minecraft Wiki (DE)](https://discord.gg/F75vfpd) (on a hidden channel) [Minecraft Wiki Polska](https://discord.gg/9ZCcTnT) +[Minecraft Wiki FR](https://discord.gg/PSK48k7) (temporarily) diff --git a/locale/de/LC_MESSAGES/rcgcdw.mo b/locale/de/LC_MESSAGES/rcgcdw.mo index 0fc7338af7db3143ee11457ce7ebda42b6e54834..d8b36b56428a9788d83cd068e0a78aa1cd1643db 100644 GIT binary patch delta 2059 zcmY+^U2GIp7{>9_T3G0!g_eR=CzwEWoRnhri;JIE-Vk zki%pw#%Hh&)!s&&uCBIG(Sv*4jl)>Rc^~S5AuPqeu@a|`HOAtrSc@^#z)s*i{2B}K zF6y~qd;&{yjiG94@F`q?vozJURP?|HSb_&|5`KkccmdVWeRtmmjhVsuQY^+TI1N8S zHGCZTs~JSi^c?at*ElT2JD87i#u+nLOTCcFO!SdSntfP<2lWR$i<;q|&M~w)pYtMo z8du?L+=l$cBvCUxidy-S~}4IR;oKjVy#3aWk?#x0UaW~pfBin*XvbRtV?m+U= z>_&C?F>2uZ(c>jc^B_-a&&!d?m{xb*hV)@RMEW#I)Yg28m3Rd;pa8Sb7FD9Iug3=5m7t=I&!CcR z2rWKDCEYYervWbKpgrAyN>UGNuosnl{m$!1pJo{AF^|j+VH4`P9#qmEb0!9t`194IkgG3L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oHa;>iyfi-Iq~#@~RL=-jIpsBVf%0%Dvw&tr azzGCsMz&|R4~zWF3CG9PMSAjXCHw}}(3_h8 diff --git a/locale/de/LC_MESSAGES/rcgcdw.po b/locale/de/LC_MESSAGES/rcgcdw.po index c6195db..ec9b659 100644 --- a/locale/de/LC_MESSAGES/rcgcdw.po +++ b/locale/de/LC_MESSAGES/rcgcdw.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2018-06-25 18:01+0200\n" -"PO-Revision-Date: 2018-06-30 00:01+0200\n" +"POT-Creation-Date: 2018-07-05 14:52+0200\n" +"PO-Revision-Date: 2018-07-05 15:06+0200\n" "Last-Translator: MarkusRost\n" "Language-Team: \n" "Language: de\n" @@ -16,39 +16,39 @@ msgstr "" "Generated-By: pygettext.py 1.5\n" "X-Generator: Poedit 2.0.8\n" -#: rcgcdw.py:103 +#: rcgcdw.py:126 msgid "(N!) " msgstr "(N!) " -#: rcgcdw.py:103 +#: rcgcdw.py:126 msgid "m " msgstr "K " -#: rcgcdw.py:116 -msgid "Uploaded a new version of {name}" -msgstr "Neue Dateiversion {name}" - -#: rcgcdw.py:117 +#: rcgcdw.py:144 msgid "([preview]({link}) | [undo]({undolink}))" msgstr "([Vorschau]({link}) | [zurücksetzen]({undolink}))" -#: rcgcdw.py:117 rcgcdw.py:140 +#: rcgcdw.py:144 rcgcdw.py:170 msgid "Options" msgstr "Optionen" -#: rcgcdw.py:119 +#: rcgcdw.py:145 +msgid "Uploaded a new version of {name}" +msgstr "Neue Dateiversion {name}" + +#: rcgcdw.py:147 msgid "Uploaded {name}" msgstr "Neue Datei {name}" -#: rcgcdw.py:131 +#: rcgcdw.py:160 msgid "**No license!**" msgstr "**Keine Lizenz!**" -#: rcgcdw.py:140 +#: rcgcdw.py:170 msgid "([preview]({link}))" msgstr "([Vorschau]({link}))" -#: rcgcdw.py:141 +#: rcgcdw.py:171 msgid "" "{desc}\n" "License: {license}" @@ -56,306 +56,310 @@ msgstr "" "{desc}\n" "Lizenz: {license}" -#: rcgcdw.py:144 +#: rcgcdw.py:174 msgid "Deleted page {article}" msgstr "Löschte {article}" -#: rcgcdw.py:147 +#: rcgcdw.py:177 msgid "Deleted redirect {article} by overwriting" msgstr "Löschte die Weiterleitung {article} um Platz zu machen" -#: rcgcdw.py:150 +#: rcgcdw.py:180 msgid "A redirect has been made" msgstr "Eine Weiterleitung wurde erstellt" -#: rcgcdw.py:150 +#: rcgcdw.py:180 msgid "No redirect has been made" msgstr "Die Erstellung einer Weiterleitung wurde unterdrückt" -#: rcgcdw.py:151 +#: rcgcdw.py:181 msgid "Moved {article} to {target}" msgstr "Verschob {article} nach {target}" -#: rcgcdw.py:154 +#: rcgcdw.py:184 msgid "Moved {article} to {title} over redirect" msgstr "Verschob {article} nach {title} und überschrieb eine Weiterleitung" -#: rcgcdw.py:157 +#: rcgcdw.py:187 msgid "Moved protection settings from {article} to {title}" msgstr "Verschob die Schutzeinstellungen von {article} nach {title}" -#: rcgcdw.py:161 +#: rcgcdw.py:191 msgid "infinity and beyond" msgstr "alle Ewigkeit" -#: rcgcdw.py:162 +#: rcgcdw.py:192 msgid "Blocked {blocked_user} for {time}" msgstr "Sperrte {blocked_user} für {time}" -#: rcgcdw.py:166 +#: rcgcdw.py:196 msgid "Changed block settings for {blocked_user}" msgstr "Änderte die Sperreinstellungen für {blocked_user}" -#: rcgcdw.py:170 +#: rcgcdw.py:200 msgid "Unblocked {blocked_user}" msgstr "Hob die Sperre von {blocked_user} auf" -#: rcgcdw.py:174 +#: rcgcdw.py:204 msgid "Left a comment on {target}'s profile" msgstr "Hinterließ ein Kommentar auf dem Profil von {target}" -#: rcgcdw.py:178 +#: rcgcdw.py:208 msgid "Replied to a comment on {target}'s profile" msgstr "Antwortete auf ein Kommentar auf dem Profil von {target}" -#: rcgcdw.py:182 +#: rcgcdw.py:212 msgid "Edited a comment on {target}'s profile" msgstr "Bearbeitete ein Kommentar auf dem Profil von {target}" -#: rcgcdw.py:186 +#: rcgcdw.py:216 msgid "Location" msgstr "Wohnort" -#: rcgcdw.py:188 +#: rcgcdw.py:218 msgid "About me" msgstr "\"Über mich\"-Abschnitt" -#: rcgcdw.py:190 +#: rcgcdw.py:220 msgid "Google link" msgstr "Google-Konto" -#: rcgcdw.py:192 +#: rcgcdw.py:222 msgid "Facebook link" msgstr "Facebook-Seite" -#: rcgcdw.py:194 +#: rcgcdw.py:224 msgid "Twitter link" msgstr "Twitter-Benutzernamen" -#: rcgcdw.py:196 +#: rcgcdw.py:226 msgid "Reddit link" msgstr "Reddit-Benutzernamen" -#: rcgcdw.py:198 +#: rcgcdw.py:228 msgid "Twitch link" msgstr "Twitch-Account" -#: rcgcdw.py:200 +#: rcgcdw.py:230 msgid "PSN link" msgstr "PSN-Account" -#: rcgcdw.py:202 +#: rcgcdw.py:232 msgid "VK link" msgstr "VK-Account" -#: rcgcdw.py:204 +#: rcgcdw.py:234 msgid "XVL link" msgstr "Xbox-Live-Tag" -#: rcgcdw.py:206 +#: rcgcdw.py:236 msgid "Steam link" msgstr "Steam-Account" -#: rcgcdw.py:208 +#: rcgcdw.py:238 msgid "Unknown" msgstr "Unbekannt" -#: rcgcdw.py:209 +#: rcgcdw.py:239 msgid "Edited {target}'s profile" msgstr "Bearbeitete das Profil von {target}" -#: rcgcdw.py:210 +#: rcgcdw.py:240 msgid "{field} field changed to: {desc}" msgstr "{field} geändert zu: {desc}" -#: rcgcdw.py:214 +#: rcgcdw.py:244 msgid "Deleted a comment on {target}'s profile" msgstr "Löschte ein Kommentar auf dem Profil von {target}" -#: rcgcdw.py:217 +#: rcgcdw.py:247 msgid "Changed group membership for {target}" msgstr "Änderte die Gruppenzugehörigkeit von {target}" -#: rcgcdw.py:221 rcgcdw.py:223 +#: rcgcdw.py:251 rcgcdw.py:253 msgid "none" msgstr "keine" -#: rcgcdw.py:224 rcgcdw.py:349 +#: rcgcdw.py:254 rcgcdw.py:376 msgid "No description provided" msgstr "Keine Zusammenfassung angegeben" -#: rcgcdw.py:225 -msgid "Groups changed from {old_groups} to {new_groups} {reason}" -msgstr "Änderte die Gruppenzugehörigkeit von {old_groups} auf {new_groups}: {reason}" +#: rcgcdw.py:255 +msgid "Groups changed from {old_groups} to {new_groups}{is_reason} {reason}" +msgstr "Änderte die Gruppenzugehörigkeit von {old_groups} auf {new_groups}{is_reason} {reason}" -#: rcgcdw.py:228 +#: rcgcdw.py:258 msgid "Protected {target}" msgstr "Schützte {target}" -#: rcgcdw.py:232 +#: rcgcdw.py:262 msgid "Changed protection level for {article}" msgstr "Änderte den Schutzstatus von {article}" -#: rcgcdw.py:236 +#: rcgcdw.py:266 msgid "Removed protection from {article}" msgstr "Entfernte den Schutz von {article}" -#: rcgcdw.py:239 +#: rcgcdw.py:269 msgid "Changed visibility of revision(s) on page {article} " msgstr "Änderte die Sichtbarkeit einiger Versionen von {article}" -#: rcgcdw.py:242 +#: rcgcdw.py:272 msgid "Imported {article} with {count} revision(s)" msgstr "Importierte {article} mit {count} Versionen" -#: rcgcdw.py:245 +#: rcgcdw.py:275 msgid "Restored {article}" msgstr "Stellte {article} wieder her" -#: rcgcdw.py:248 +#: rcgcdw.py:278 msgid "Changed visibility of log events" msgstr "Änderte die Sichtbarkeit eines Logbucheintrags" -#: rcgcdw.py:251 +#: rcgcdw.py:281 msgid "Imported interwiki" msgstr "Importierte Interwiki" -#: rcgcdw.py:254 +#: rcgcdw.py:284 msgid "Edited abuse filter number {number}" msgstr "Änderte Missbrauchsfilter {number}" -#: rcgcdw.py:257 +#: rcgcdw.py:287 msgid "Merged revision histories of {article} into {dest}" msgstr "Vereinigte Versionsgeschichten von {article} in {dest}" -#: rcgcdw.py:260 +#: rcgcdw.py:290 msgid "Added an entry to the interwiki table" msgstr "Fügte ein Interwiki-Präfix hinzu" -#: rcgcdw.py:261 rcgcdw.py:265 +#: rcgcdw.py:291 rcgcdw.py:295 msgid "Prefix: {prefix}, website: {website} | {desc}" msgstr "Präfix: {prefix}, URL: {website} | {desc}" -#: rcgcdw.py:264 +#: rcgcdw.py:294 msgid "Edited an entry in interwiki table" msgstr "Änderte ein Interwiki-Präfix" -#: rcgcdw.py:268 +#: rcgcdw.py:298 msgid "Deleted an entry in interwiki table" msgstr "Entfernte ein Interwiki-Präfix" -#: rcgcdw.py:269 +#: rcgcdw.py:299 msgid "Prefix: {prefix} | {desc}" msgstr "Präfix: {prefix} | {desc}" -#: rcgcdw.py:272 +#: rcgcdw.py:302 msgid "Changed the content model of the page {article}" msgstr "Änderte das Inhaltsmodell von {article}" -#: rcgcdw.py:273 +#: rcgcdw.py:303 msgid "Model changed from {old} to {new}: {reason}" msgstr "Modell geändert von {old} zu {new}: {reason}" -#: rcgcdw.py:276 +#: rcgcdw.py:306 msgid "Edited the sprite for {article}" msgstr "Edited the sprite for {article}" -#: rcgcdw.py:279 +#: rcgcdw.py:309 msgid "Created the sprite sheet for {article}" msgstr "Created the sprite sheet for {article}" -#: rcgcdw.py:282 +#: rcgcdw.py:312 msgid "Edited the slice for {article}" msgstr "Edited the slice for {article}" -#: rcgcdw.py:285 +#: rcgcdw.py:315 msgid "Created a tag \"{tag}\"" msgstr "Erstellte die Markierung \"{tag}\"" -#: rcgcdw.py:289 +#: rcgcdw.py:319 msgid "Deleted a tag \"{tag}\"" msgstr "Löschte die Markierung \"{tag}\"" -#: rcgcdw.py:293 +#: rcgcdw.py:323 msgid "Activated a tag \"{tag}\"" msgstr "Aktivierte die Markierung \"{tag}\"" -#: rcgcdw.py:296 +#: rcgcdw.py:326 msgid "Deactivated a tag \"{tag}\"" msgstr "Deaktivierte die Markierung \"{tag}\"" -#: rcgcdw.py:317 +#: rcgcdw.py:347 msgid "Tags" msgstr "Markierungen" -#: rcgcdw.py:443 +#: rcgcdw.py:469 msgid "Unable to process the event" msgstr "Ereignis kann nicht verabreitet werden" -#: rcgcdw.py:443 +#: rcgcdw.py:469 msgid "error" msgstr "Fehler" -#: rcgcdw.py:523 +#: rcgcdw.py:549 msgid "Daily overview" msgstr "Tägliche Übersicht" -#: rcgcdw.py:539 +#: rcgcdw.py:565 msgid " ({} actions)" msgstr " ({} Aktionen)" -#: rcgcdw.py:540 +#: rcgcdw.py:566 msgid " UTC ({} actions)" msgstr " UTC ({} Aktionen)" -#: rcgcdw.py:542 rcgcdw.py:543 +#: rcgcdw.py:568 rcgcdw.py:569 msgid "But nobody came" msgstr "Keine Aktivität" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Admin actions" msgstr "Admin-Aktionen" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Bytes changed" msgstr "Bytes geändert" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Day score" msgstr "Tageswert" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Edits made" msgstr "Bearbeitungen" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Most active hours" msgstr "Aktivste Stunden" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Most active users" msgstr "Aktivste Benutzer" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "New articles" msgstr "Neue Artikel" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "New files" msgstr "Neue Dateien" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Unique contributors" msgstr "Einzelne Autoren" -#: rcgcdw.py:664 +#: rcgcdw.py:662 +msgid "Connection to {wiki} seems to be stable now." +msgstr "{wiki} scheint wieder erreichbar zu sein." + +#: rcgcdw.py:662 rcgcdw.py:715 msgid "Connection status" msgstr "Verbindungsstatus" -#: rcgcdw.py:664 +#: rcgcdw.py:715 msgid "{wiki} seems to be down or unreachable." msgstr "Das {wiki} scheint unerreichbar zu sein." -#: rcgcdw.py:683 +#: rcgcdw.py:737 msgid "{wiki} is back up!" msgstr "Das {wiki} ist wieder erreichbar." diff --git a/locale/fr/LC_MESSAGES/rcgcdw.mo b/locale/fr/LC_MESSAGES/rcgcdw.mo index 719a1f574b9a5a5264b848ce35fa07dc0263b917..9cff0dbee843aa56f15b2cb648743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LC_MESSAGES/rcgcdw.po +++ b/locale/fr/LC_MESSAGES/rcgcdw.po @@ -5,9 +5,9 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2018-06-25 18:01+0200\n" -"PO-Revision-Date: 2018-06-25 18:03+0200\n" -"Last-Translator: JSBM\n" +"POT-Creation-Date: 2018-07-05 14:52+0200\n" +"PO-Revision-Date: 2018-07-05 18:37+0200\n" +"Last-Translator: Frisk \n" "Language-Team: \n" "Language: fr\n" "MIME-Version: 1.0\n" @@ -19,39 +19,39 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Poedit-SearchPath-0: rcgcdw.pot\n" -#: rcgcdw.py:103 +#: rcgcdw.py:126 msgid "(N!) " msgstr "(N!) " -#: rcgcdw.py:103 +#: rcgcdw.py:126 msgid "m " msgstr "m " -#: rcgcdw.py:116 -msgid "Uploaded a new version of {name}" -msgstr "Téléversement d'une nouvelle version de {name}" - -#: rcgcdw.py:117 +#: rcgcdw.py:144 msgid "([preview]({link}) | [undo]({undolink}))" msgstr "([Aperçu]({link}) | [Annuler]({undolink}))" -#: rcgcdw.py:117 rcgcdw.py:140 +#: rcgcdw.py:144 rcgcdw.py:170 msgid "Options" msgstr "Options" -#: rcgcdw.py:119 +#: rcgcdw.py:145 +msgid "Uploaded a new version of {name}" +msgstr "Téléversement d'une nouvelle version de {name}" + +#: rcgcdw.py:147 msgid "Uploaded {name}" msgstr "Téléversement de {name}" -#: rcgcdw.py:131 +#: rcgcdw.py:160 msgid "**No license!**" msgstr "**Aucune license!**" -#: rcgcdw.py:140 +#: rcgcdw.py:170 msgid "([preview]({link}))" msgstr "([Aperçu]({link}))" -#: rcgcdw.py:141 +#: rcgcdw.py:171 msgid "" "{desc}\n" "License: {license}" @@ -59,306 +59,311 @@ msgstr "" "{desc}\n" "License: {license}" -#: rcgcdw.py:144 +#: rcgcdw.py:174 msgid "Deleted page {article}" msgstr "Suppression de la page {article}" -#: rcgcdw.py:147 +#: rcgcdw.py:177 msgid "Deleted redirect {article} by overwriting" msgstr "Suppression par écrasement de la redirection {article}" -#: rcgcdw.py:150 +#: rcgcdw.py:180 msgid "A redirect has been made" msgstr "Une redirection a été créée" -#: rcgcdw.py:150 +#: rcgcdw.py:180 msgid "No redirect has been made" msgstr "Aucune redirection créée" -#: rcgcdw.py:151 +#: rcgcdw.py:181 msgid "Moved {article} to {target}" msgstr "Déplacement de {article} vers {target}" -#: rcgcdw.py:154 +#: rcgcdw.py:184 msgid "Moved {article} to {title} over redirect" msgstr "Déplacement de {article} vers {title} par redirection" -#: rcgcdw.py:157 +#: rcgcdw.py:187 msgid "Moved protection settings from {article} to {title}" msgstr "Transfert des paramètres de protection de {article} vers {title}" -#: rcgcdw.py:161 +#: rcgcdw.py:191 msgid "infinity and beyond" msgstr "toujours" -#: rcgcdw.py:162 +#: rcgcdw.py:192 msgid "Blocked {blocked_user} for {time}" msgstr "{blocked user} a été bloqué pour {time}" -#: rcgcdw.py:166 +#: rcgcdw.py:196 msgid "Changed block settings for {blocked_user}" msgstr "Modification des paramètres de blocage pour {blocked_user}" -#: rcgcdw.py:170 +#: rcgcdw.py:200 msgid "Unblocked {blocked_user}" msgstr "{blocked_user} a été débloqué" -#: rcgcdw.py:174 +#: rcgcdw.py:204 msgid "Left a comment on {target}'s profile" msgstr "Ajout d'un commentaire sur le profil de {target}" -#: rcgcdw.py:178 +#: rcgcdw.py:208 msgid "Replied to a comment on {target}'s profile" msgstr "Réponse à un commentaire sur le profil de {target}" -#: rcgcdw.py:182 +#: rcgcdw.py:212 msgid "Edited a comment on {target}'s profile" msgstr "Édition d'un commentaire sur le profil de {target}" -#: rcgcdw.py:186 +#: rcgcdw.py:216 msgid "Location" msgstr "Emplacement" -#: rcgcdw.py:188 +#: rcgcdw.py:218 msgid "About me" msgstr "À propos de moi" -#: rcgcdw.py:190 +#: rcgcdw.py:220 msgid "Google link" msgstr "Lien Google" -#: rcgcdw.py:192 +#: rcgcdw.py:222 msgid "Facebook link" msgstr "Lien Facebook" -#: rcgcdw.py:194 +#: rcgcdw.py:224 msgid "Twitter link" msgstr "Lien Twitter" -#: rcgcdw.py:196 +#: rcgcdw.py:226 msgid "Reddit link" msgstr "Lien Reddit" -#: rcgcdw.py:198 +#: rcgcdw.py:228 msgid "Twitch link" msgstr "Lien Twitch" -#: rcgcdw.py:200 +#: rcgcdw.py:230 msgid "PSN link" msgstr "Lien PSN" -#: rcgcdw.py:202 +#: rcgcdw.py:232 msgid "VK link" msgstr "Lien VK" -#: rcgcdw.py:204 +#: rcgcdw.py:234 msgid "XVL link" msgstr "Lien XVL" -#: rcgcdw.py:206 +#: rcgcdw.py:236 msgid "Steam link" msgstr "Lien Steam" -#: rcgcdw.py:208 +#: rcgcdw.py:238 msgid "Unknown" msgstr "Inconnu" -#: rcgcdw.py:209 +#: rcgcdw.py:239 msgid "Edited {target}'s profile" msgstr "Modification du profil de {target}" -#: rcgcdw.py:210 +#: rcgcdw.py:240 msgid "{field} field changed to: {desc}" msgstr "{field} modifié pour: {desc}" -#: rcgcdw.py:214 +#: rcgcdw.py:244 msgid "Deleted a comment on {target}'s profile" msgstr "Retrait d'un commentaire sur le profil de {target}" -#: rcgcdw.py:217 +#: rcgcdw.py:247 msgid "Changed group membership for {target}" msgstr "Modification des groupes pour {target}" -#: rcgcdw.py:221 rcgcdw.py:223 +#: rcgcdw.py:251 rcgcdw.py:253 msgid "none" msgstr "aucun" -#: rcgcdw.py:224 rcgcdw.py:349 +#: rcgcdw.py:254 rcgcdw.py:376 msgid "No description provided" msgstr "Aucune description" -#: rcgcdw.py:225 -msgid "Groups changed from {old_groups} to {new_groups} {reason}" -msgstr "Groupe modifié de {old_groups} vers {new_groups}: {reason}" +#: rcgcdw.py:255 +msgid "Groups changed from {old_groups} to {new_groups}{is_reason} {reason}" +msgstr "Groupe modifié de {old_groups} vers {new_groups}{is_reason} {reason}" -#: rcgcdw.py:228 +#: rcgcdw.py:258 msgid "Protected {target}" msgstr "Protection de {target}" -#: rcgcdw.py:232 +#: rcgcdw.py:262 msgid "Changed protection level for {article}" msgstr "Modification du niveau de protection de {article}" -#: rcgcdw.py:236 +#: rcgcdw.py:266 msgid "Removed protection from {article}" msgstr "Retrait de la protection de {article}" -#: rcgcdw.py:239 +#: rcgcdw.py:269 msgid "Changed visibility of revision(s) on page {article} " msgstr "Modification de la visibilité de révision(s) sur la page {article} " -#: rcgcdw.py:242 +#: rcgcdw.py:272 msgid "Imported {article} with {count} revision(s)" msgstr "Article {article} importé avec {count} révision(s)" -#: rcgcdw.py:245 +#: rcgcdw.py:275 msgid "Restored {article}" msgstr "Restauration de {article}" -#: rcgcdw.py:248 +#: rcgcdw.py:278 msgid "Changed visibility of log events" msgstr "Modification de la visibilité d'évènements des journaux" -#: rcgcdw.py:251 +#: rcgcdw.py:281 msgid "Imported interwiki" msgstr "Importation d'interwiki" -#: rcgcdw.py:254 +#: rcgcdw.py:284 msgid "Edited abuse filter number {number}" msgstr "Édition de la règle {number} du filtre anti-abus" -#: rcgcdw.py:257 +#: rcgcdw.py:287 msgid "Merged revision histories of {article} into {dest}" msgstr "Fusion de l'historique de {article} vers {dest}" -#: rcgcdw.py:260 +#: rcgcdw.py:290 msgid "Added an entry to the interwiki table" msgstr "Ajout d'une entrée à la table interwiki" -#: rcgcdw.py:261 rcgcdw.py:265 +#: rcgcdw.py:291 rcgcdw.py:295 msgid "Prefix: {prefix}, website: {website} | {desc}" msgstr "Préfixe: {prefix}, site: {website} | {desc}" -#: rcgcdw.py:264 +#: rcgcdw.py:294 msgid "Edited an entry in interwiki table" msgstr "Modification d'une entrée de la table interwiki" -#: rcgcdw.py:268 +#: rcgcdw.py:298 msgid "Deleted an entry in interwiki table" msgstr "Retrait d'une entrée de la table interwiki" -#: rcgcdw.py:269 +#: rcgcdw.py:299 msgid "Prefix: {prefix} | {desc}" msgstr "Préfixe: {prefix} | {desc}" -#: rcgcdw.py:272 +#: rcgcdw.py:302 msgid "Changed the content model of the page {article}" msgstr "Modification du modèle de contenu de l'article {article}" -#: rcgcdw.py:273 +#: rcgcdw.py:303 msgid "Model changed from {old} to {new}: {reason}" msgstr "Modèle changé de {old} à {new}: {reason}" -#: rcgcdw.py:276 +#: rcgcdw.py:306 msgid "Edited the sprite for {article}" msgstr "Édition du sprite de {article}" -#: rcgcdw.py:279 +#: rcgcdw.py:309 msgid "Created the sprite sheet for {article}" msgstr "Création d'une feuille de sprite pour {article}" -#: rcgcdw.py:282 +#: rcgcdw.py:312 msgid "Edited the slice for {article}" msgstr "" -#: rcgcdw.py:285 +#: rcgcdw.py:315 msgid "Created a tag \"{tag}\"" msgstr "Création du tag « {tag} »" -#: rcgcdw.py:289 +#: rcgcdw.py:319 msgid "Deleted a tag \"{tag}\"" msgstr "Suppression du tag « {tag} »" -#: rcgcdw.py:293 +#: rcgcdw.py:323 msgid "Activated a tag \"{tag}\"" msgstr "Activation du tag « {tag} »" -#: rcgcdw.py:296 +#: rcgcdw.py:326 msgid "Deactivated a tag \"{tag}\"" msgstr "Désactivation du tag « {tag} »" -#: rcgcdw.py:317 +#: rcgcdw.py:347 msgid "Tags" msgstr "Tags" -#: rcgcdw.py:443 +#: rcgcdw.py:469 msgid "Unable to process the event" msgstr "Impossible d'analyser l'évènement" -#: rcgcdw.py:443 +#: rcgcdw.py:469 msgid "error" msgstr "erreur" -#: rcgcdw.py:523 +#: rcgcdw.py:549 msgid "Daily overview" msgstr "Résumé de la journée" -#: rcgcdw.py:539 +#: rcgcdw.py:565 msgid " ({} actions)" msgstr " ({} actions)" -#: rcgcdw.py:540 +#: rcgcdw.py:566 msgid " UTC ({} actions)" msgstr " UTC ({} actions)" -#: rcgcdw.py:542 rcgcdw.py:543 +#: rcgcdw.py:568 rcgcdw.py:569 msgid "But nobody came" msgstr "Aucune activité" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Admin actions" msgstr "Actions d'administrateur" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Bytes changed" msgstr "Octets modifiés" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Day score" msgstr "Score du jour" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Edits made" msgstr "Modifications effectuées" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Most active hours" msgstr "Heures les plus actives" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Most active users" msgstr "Membres les plus actifs" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "New articles" msgstr "Nouveaux articles" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "New files" msgstr "Nouveaux fichiers" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Unique contributors" msgstr "Contributeurs uniques" -#: rcgcdw.py:664 +#: rcgcdw.py:662 +#, fuzzy +msgid "Connection to {wiki} seems to be stable now." +msgstr "Connection to {wiki} seems to be stable now." + +#: rcgcdw.py:662 rcgcdw.py:715 msgid "Connection status" msgstr "Statut de connexion" -#: rcgcdw.py:664 +#: rcgcdw.py:715 msgid "{wiki} seems to be down or unreachable." msgstr "{wiki} semble être down ou inatteignable." -#: rcgcdw.py:683 +#: rcgcdw.py:737 msgid "{wiki} is back up!" msgstr "{wiki} est de retour!" diff --git a/locale/pl/LC_MESSAGES/rcgcdw.mo b/locale/pl/LC_MESSAGES/rcgcdw.mo index f47d70a6c8666dd32a77386eb3827ce1c4699be3..5139e7ea00b7a79bac0654982e4ef58ef6acfcae 100644 GIT binary patch delta 2057 zcmY+^TWnNC9LMoLbzy0-6k3XkQceZ8(1p_5wiZEAi(I8#YDokoOFd~8*Ii*NjS$(y zgsP;H;A&_BiTWU7fsnA8NHA)&_<%7$Qd9y6CZZ4ElhTAs8os}?r$#0_=QHOvXJ-EY z*=v!j4e8&C10NV=4fP@FK%Q9|dq#4gyd5+v#CLE!?m^x945#A}EWux~2(RJ&cpFD! zDTn*83?IP;RDbKRT%X!VLofFDH}>HS&iha=3}6Uv;%qF>H*;_$*5hW>z&^#9cnnMN zPt<$2aV$4dLE5w7(*s$yRa7b=m9*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7g2B%rZvDa7>C3Hz{_50r5?73b zW-*&FgV1u!wI({+FIA5=T+Jf(64a1gU0^B+{zeBoLYMippIS1t###RRX3J*((XgH< zn|IaTOOEy4>Q$U;9y)r}wh{Y@Dq?=y{_h~nc%6fi!5Ejjbr(mf*-g&bQdCW9w~C!} zVhf>{NxQm{C?a+fYT98{4ezVHtJJdnAGjva<0=gbd|m7b3Rn?I!C~I){30u_q%1dY fusS-$Rbb`kmKAve$D{oV1EotZ2L;CChJ*hCH-?;U diff --git a/locale/pl/LC_MESSAGES/rcgcdw.po b/locale/pl/LC_MESSAGES/rcgcdw.po index 2b7135a..95dbe52 100644 --- a/locale/pl/LC_MESSAGES/rcgcdw.po +++ b/locale/pl/LC_MESSAGES/rcgcdw.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: RcGcDw\n" -"POT-Creation-Date: 2018-06-25 18:01+0200\n" -"PO-Revision-Date: 2018-07-03 20:56+0200\n" +"POT-Creation-Date: 2018-07-05 14:52+0200\n" +"PO-Revision-Date: 2018-07-05 14:55+0200\n" "Last-Translator: Frisk \n" "Language-Team: \n" "Language: pl\n" @@ -18,39 +18,39 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" -#: rcgcdw.py:103 +#: rcgcdw.py:126 msgid "(N!) " msgstr "(N!) " -#: rcgcdw.py:103 +#: rcgcdw.py:126 msgid "m " msgstr "d " -#: rcgcdw.py:116 -msgid "Uploaded a new version of {name}" -msgstr "Przesłał(a) nową wersję {name}" - -#: rcgcdw.py:117 +#: rcgcdw.py:144 msgid "([preview]({link}) | [undo]({undolink}))" msgstr "([podgląd]({link}) | [wycofaj]({undolink}))" -#: rcgcdw.py:117 rcgcdw.py:140 +#: rcgcdw.py:144 rcgcdw.py:170 msgid "Options" msgstr "Opcje" -#: rcgcdw.py:119 +#: rcgcdw.py:145 +msgid "Uploaded a new version of {name}" +msgstr "Przesłał(a) nową wersję {name}" + +#: rcgcdw.py:147 msgid "Uploaded {name}" msgstr "Przesłał(a) {name}" -#: rcgcdw.py:131 +#: rcgcdw.py:160 msgid "**No license!**" msgstr "**Brak licencji!**" -#: rcgcdw.py:140 +#: rcgcdw.py:170 msgid "([preview]({link}))" msgstr "([podgląd]({link}))" -#: rcgcdw.py:141 +#: rcgcdw.py:171 msgid "" "{desc}\n" "License: {license}" @@ -58,309 +58,313 @@ msgstr "" "{desc}\n" "Licencja: {license}" -#: rcgcdw.py:144 +#: rcgcdw.py:174 msgid "Deleted page {article}" msgstr "Usunął/usunęła {article}" -#: rcgcdw.py:147 +#: rcgcdw.py:177 msgid "Deleted redirect {article} by overwriting" msgstr "" "Usunął/usunęła przekierowanie ({article}) aby utworzyć miejsce dla " "przenoszonej strony" -#: rcgcdw.py:150 +#: rcgcdw.py:180 msgid "A redirect has been made" msgstr "Zostało utworzone przekierowanie" -#: rcgcdw.py:150 +#: rcgcdw.py:180 msgid "No redirect has been made" msgstr "Nie utworzono przekierowania" -#: rcgcdw.py:151 +#: rcgcdw.py:181 msgid "Moved {article} to {target}" msgstr "Przeniósł/przeniosła {article} do {target}" -#: rcgcdw.py:154 +#: rcgcdw.py:184 msgid "Moved {article} to {title} over redirect" msgstr "Przeniósł/przeniosła {article} do strony przekierowującej {target}" -#: rcgcdw.py:157 +#: rcgcdw.py:187 msgid "Moved protection settings from {article} to {title}" msgstr "Przeniesiono ustawienia zabezpieczeń z {article} do {title}" -#: rcgcdw.py:161 +#: rcgcdw.py:191 msgid "infinity and beyond" msgstr "wieczność" -#: rcgcdw.py:162 +#: rcgcdw.py:192 msgid "Blocked {blocked_user} for {time}" msgstr "Zablokowano {blocked_user} na {time}" -#: rcgcdw.py:166 +#: rcgcdw.py:196 msgid "Changed block settings for {blocked_user}" msgstr "Zmienił ustawienia blokady {blocked_user}" -#: rcgcdw.py:170 +#: rcgcdw.py:200 msgid "Unblocked {blocked_user}" msgstr "Odblokował {blocked_user}" -#: rcgcdw.py:174 +#: rcgcdw.py:204 msgid "Left a comment on {target}'s profile" msgstr "Pozostawiono komentarz na profilu użytkownika {target}" -#: rcgcdw.py:178 +#: rcgcdw.py:208 msgid "Replied to a comment on {target}'s profile" msgstr "Odpowiedziano na komentarz na profilu użytkownika {target}" -#: rcgcdw.py:182 +#: rcgcdw.py:212 msgid "Edited a comment on {target}'s profile" msgstr "Edytowano komentarz na profilu użytkownika {target}" -#: rcgcdw.py:186 +#: rcgcdw.py:216 msgid "Location" msgstr "Lokacja" -#: rcgcdw.py:188 +#: rcgcdw.py:218 msgid "About me" msgstr "O mnie" -#: rcgcdw.py:190 +#: rcgcdw.py:220 msgid "Google link" msgstr "link Google" -#: rcgcdw.py:192 +#: rcgcdw.py:222 msgid "Facebook link" msgstr "link Facebook" -#: rcgcdw.py:194 +#: rcgcdw.py:224 msgid "Twitter link" msgstr "link Twitter" -#: rcgcdw.py:196 +#: rcgcdw.py:226 msgid "Reddit link" msgstr "link Reddit" -#: rcgcdw.py:198 +#: rcgcdw.py:228 msgid "Twitch link" msgstr "link Twitch" -#: rcgcdw.py:200 +#: rcgcdw.py:230 msgid "PSN link" msgstr "link PSN" -#: rcgcdw.py:202 +#: rcgcdw.py:232 msgid "VK link" msgstr "link VK" -#: rcgcdw.py:204 +#: rcgcdw.py:234 msgid "XVL link" msgstr "link XVL" -#: rcgcdw.py:206 +#: rcgcdw.py:236 msgid "Steam link" msgstr "link Steam" -#: rcgcdw.py:208 +#: rcgcdw.py:238 msgid "Unknown" msgstr "Nieznana" -#: rcgcdw.py:209 +#: rcgcdw.py:239 msgid "Edited {target}'s profile" msgstr "Edytowano profil użytkownika {target}" -#: rcgcdw.py:210 +#: rcgcdw.py:240 msgid "{field} field changed to: {desc}" msgstr "pole {field} zostało zmienione na: {desc}" -#: rcgcdw.py:214 +#: rcgcdw.py:244 msgid "Deleted a comment on {target}'s profile" msgstr "Usunął komentarz na profilu użytkownika {target}" -#: rcgcdw.py:217 +#: rcgcdw.py:247 msgid "Changed group membership for {target}" msgstr "Zmieniono przynależność do grup dla {target}" -#: rcgcdw.py:221 rcgcdw.py:223 +#: rcgcdw.py:251 rcgcdw.py:253 msgid "none" msgstr "brak" -#: rcgcdw.py:224 rcgcdw.py:349 +#: rcgcdw.py:254 rcgcdw.py:376 msgid "No description provided" msgstr "Nie podano opisu zmian" -#: rcgcdw.py:225 -msgid "Groups changed from {old_groups} to {new_groups} {reason}" -msgstr "Grupy zmienione z {old_groups} do {new_groups} {reason}" +#: rcgcdw.py:255 +msgid "Groups changed from {old_groups} to {new_groups}{is_reason} {reason}" +msgstr "Grupy zmienione z {old_groups} do {new_groups}{is_reason} {reason}" -#: rcgcdw.py:228 +#: rcgcdw.py:258 msgid "Protected {target}" msgstr "Zabezpieczono {target}" -#: rcgcdw.py:232 +#: rcgcdw.py:262 msgid "Changed protection level for {article}" msgstr "Zmieniono poziom zabezpieczeń {article}" -#: rcgcdw.py:236 +#: rcgcdw.py:266 msgid "Removed protection from {article}" msgstr "Usunięto zabezpieczenie {article}" -#: rcgcdw.py:239 +#: rcgcdw.py:269 msgid "Changed visibility of revision(s) on page {article} " msgstr "Zmieniono widoczność wersji na stroni {article}" -#: rcgcdw.py:242 +#: rcgcdw.py:272 msgid "Imported {article} with {count} revision(s)" msgstr "Zaimportowano {article} z {count} wersjami" -#: rcgcdw.py:245 +#: rcgcdw.py:275 msgid "Restored {article}" msgstr "Przywrócono {article)" -#: rcgcdw.py:248 +#: rcgcdw.py:278 msgid "Changed visibility of log events" msgstr "Zmieniono widoczność logów" -#: rcgcdw.py:251 +#: rcgcdw.py:281 msgid "Imported interwiki" msgstr "Zaimportowano interwiki" -#: rcgcdw.py:254 +#: rcgcdw.py:284 msgid "Edited abuse filter number {number}" msgstr "Edytowano filtr nadużyć numer {number}" -#: rcgcdw.py:257 +#: rcgcdw.py:287 msgid "Merged revision histories of {article} into {dest}" msgstr "Połączono historie {article} z {dest}" -#: rcgcdw.py:260 +#: rcgcdw.py:290 msgid "Added an entry to the interwiki table" msgstr "Dodano wpis do tabeli interwiki" -#: rcgcdw.py:261 rcgcdw.py:265 +#: rcgcdw.py:291 rcgcdw.py:295 msgid "Prefix: {prefix}, website: {website} | {desc}" msgstr "Prefix: {prefix}, strona: {website} | desc" -#: rcgcdw.py:264 +#: rcgcdw.py:294 msgid "Edited an entry in interwiki table" msgstr "Edytowano wpis interwiki" -#: rcgcdw.py:268 +#: rcgcdw.py:298 msgid "Deleted an entry in interwiki table" msgstr "Usunięto wpis interwiki" -#: rcgcdw.py:269 +#: rcgcdw.py:299 msgid "Prefix: {prefix} | {desc}" msgstr "Prefix: {prefix} | {desc}" -#: rcgcdw.py:272 +#: rcgcdw.py:302 msgid "Changed the content model of the page {article}" msgstr "Zmieniono model zawartości {article}" -#: rcgcdw.py:273 +#: rcgcdw.py:303 msgid "Model changed from {old} to {new}: {reason}" msgstr "Model został zmieniony z {old} na {new}: {reason}" -#: rcgcdw.py:276 +#: rcgcdw.py:306 msgid "Edited the sprite for {article}" msgstr "Edytowano sprite dla {article}" -#: rcgcdw.py:279 +#: rcgcdw.py:309 msgid "Created the sprite sheet for {article}" msgstr "Utworzono sprite sheet dla {article}" -#: rcgcdw.py:282 +#: rcgcdw.py:312 msgid "Edited the slice for {article}" msgstr "Edytowano część sprite dla {article}" -#: rcgcdw.py:285 +#: rcgcdw.py:315 msgid "Created a tag \"{tag}\"" msgstr "Utworzono tag \"{tag}\"" -#: rcgcdw.py:289 +#: rcgcdw.py:319 msgid "Deleted a tag \"{tag}\"" msgstr "Usunięto tag \"{tag}\"" -#: rcgcdw.py:293 +#: rcgcdw.py:323 msgid "Activated a tag \"{tag}\"" msgstr "Aktywowano tag \"{tag}\"" -#: rcgcdw.py:296 +#: rcgcdw.py:326 msgid "Deactivated a tag \"{tag}\"" msgstr "Dezaktywowano tag \"{tag}\"" -#: rcgcdw.py:317 +#: rcgcdw.py:347 msgid "Tags" msgstr "Tagi" -#: rcgcdw.py:443 +#: rcgcdw.py:469 msgid "Unable to process the event" msgstr "Nie udało się odczytać wydarzenia" -#: rcgcdw.py:443 +#: rcgcdw.py:469 msgid "error" msgstr "błąd" -#: rcgcdw.py:523 +#: rcgcdw.py:549 msgid "Daily overview" msgstr "Podsumowanie dnia" -#: rcgcdw.py:539 +#: rcgcdw.py:565 msgid " ({} actions)" msgstr "({} akcji)" -#: rcgcdw.py:540 +#: rcgcdw.py:566 msgid " UTC ({} actions)" msgstr " UTC ({} akcji)" -#: rcgcdw.py:542 rcgcdw.py:543 +#: rcgcdw.py:568 rcgcdw.py:569 msgid "But nobody came" msgstr "Ale nikt nie przyszedł" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Admin actions" msgstr "Akcji administratorskich" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Bytes changed" msgstr "Zmienionych bajtów" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Day score" msgstr "Wynik dnia" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Edits made" msgstr "Zrobionych edycji" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Most active hours" msgstr "Najbardziej aktywne godziny" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Most active users" msgstr "Najbardziej aktywni użytkownicy" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "New articles" msgstr "Nowych artykułów" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "New files" msgstr "Nowych plików" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Unique contributors" msgstr "Unikalnych edytujących" -#: rcgcdw.py:664 +#: rcgcdw.py:662 +msgid "Connection to {wiki} seems to be stable now." +msgstr "Połączenie z {wiki} wygląda na stabilne." + +#: rcgcdw.py:662 rcgcdw.py:715 msgid "Connection status" msgstr "Problem z połączeniem" -#: rcgcdw.py:664 +#: rcgcdw.py:715 msgid "{wiki} seems to be down or unreachable." msgstr "{wiki} nie działa lub jest nieosiągalna." -#: rcgcdw.py:683 +#: rcgcdw.py:737 msgid "{wiki} is back up!" msgstr "{wiki} jest ponownie osiągalna!" diff --git a/rcgcdw.pot b/rcgcdw.pot index 3f97c65..a3a9d34 100644 --- a/rcgcdw.pot +++ b/rcgcdw.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2018-06-25 18:01+0200\n" +"POT-Creation-Date: 2018-07-05 14:52+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -15,345 +15,349 @@ msgstr "" "Generated-By: pygettext.py 1.5\n" -#: rcgcdw.py:103 +#: rcgcdw.py:126 msgid "(N!) " msgstr "" -#: rcgcdw.py:103 +#: rcgcdw.py:126 msgid "m " msgstr "" -#: rcgcdw.py:116 -msgid "Uploaded a new version of {name}" -msgstr "" - -#: rcgcdw.py:117 +#: rcgcdw.py:144 msgid "([preview]({link}) | [undo]({undolink}))" msgstr "" -#: rcgcdw.py:117 rcgcdw.py:140 +#: rcgcdw.py:144 rcgcdw.py:170 msgid "Options" msgstr "" -#: rcgcdw.py:119 +#: rcgcdw.py:145 +msgid "Uploaded a new version of {name}" +msgstr "" + +#: rcgcdw.py:147 msgid "Uploaded {name}" msgstr "" -#: rcgcdw.py:131 +#: rcgcdw.py:160 msgid "**No license!**" msgstr "" -#: rcgcdw.py:140 +#: rcgcdw.py:170 msgid "([preview]({link}))" msgstr "" -#: rcgcdw.py:141 +#: rcgcdw.py:171 msgid "" "{desc}\n" "License: {license}" msgstr "" -#: rcgcdw.py:144 +#: rcgcdw.py:174 msgid "Deleted page {article}" msgstr "" -#: rcgcdw.py:147 +#: rcgcdw.py:177 msgid "Deleted redirect {article} by overwriting" msgstr "" -#: rcgcdw.py:150 +#: rcgcdw.py:180 msgid "A redirect has been made" msgstr "" -#: rcgcdw.py:150 +#: rcgcdw.py:180 msgid "No redirect has been made" msgstr "" -#: rcgcdw.py:151 +#: rcgcdw.py:181 msgid "Moved {article} to {target}" msgstr "" -#: rcgcdw.py:154 +#: rcgcdw.py:184 msgid "Moved {article} to {title} over redirect" msgstr "" -#: rcgcdw.py:157 +#: rcgcdw.py:187 msgid "Moved protection settings from {article} to {title}" msgstr "" -#: rcgcdw.py:161 +#: rcgcdw.py:191 msgid "infinity and beyond" msgstr "" -#: rcgcdw.py:162 +#: rcgcdw.py:192 msgid "Blocked {blocked_user} for {time}" msgstr "" -#: rcgcdw.py:166 +#: rcgcdw.py:196 msgid "Changed block settings for {blocked_user}" msgstr "" -#: rcgcdw.py:170 +#: rcgcdw.py:200 msgid "Unblocked {blocked_user}" msgstr "" -#: rcgcdw.py:174 +#: rcgcdw.py:204 msgid "Left a comment on {target}'s profile" msgstr "" -#: rcgcdw.py:178 +#: rcgcdw.py:208 msgid "Replied to a comment on {target}'s profile" msgstr "" -#: rcgcdw.py:182 +#: rcgcdw.py:212 msgid "Edited a comment on {target}'s profile" msgstr "" -#: rcgcdw.py:186 +#: rcgcdw.py:216 msgid "Location" msgstr "" -#: rcgcdw.py:188 +#: rcgcdw.py:218 msgid "About me" msgstr "" -#: rcgcdw.py:190 +#: rcgcdw.py:220 msgid "Google link" msgstr "" -#: rcgcdw.py:192 +#: rcgcdw.py:222 msgid "Facebook link" msgstr "" -#: rcgcdw.py:194 +#: rcgcdw.py:224 msgid "Twitter link" msgstr "" -#: rcgcdw.py:196 +#: rcgcdw.py:226 msgid "Reddit link" msgstr "" -#: rcgcdw.py:198 +#: rcgcdw.py:228 msgid "Twitch link" msgstr "" -#: rcgcdw.py:200 +#: rcgcdw.py:230 msgid "PSN link" msgstr "" -#: rcgcdw.py:202 +#: rcgcdw.py:232 msgid "VK link" msgstr "" -#: rcgcdw.py:204 +#: rcgcdw.py:234 msgid "XVL link" msgstr "" -#: rcgcdw.py:206 +#: rcgcdw.py:236 msgid "Steam link" msgstr "" -#: rcgcdw.py:208 +#: rcgcdw.py:238 msgid "Unknown" msgstr "" -#: rcgcdw.py:209 +#: rcgcdw.py:239 msgid "Edited {target}'s profile" msgstr "" -#: rcgcdw.py:210 +#: rcgcdw.py:240 msgid "{field} field changed to: {desc}" msgstr "" -#: rcgcdw.py:214 +#: rcgcdw.py:244 msgid "Deleted a comment on {target}'s profile" msgstr "" -#: rcgcdw.py:217 +#: rcgcdw.py:247 msgid "Changed group membership for {target}" msgstr "" -#: rcgcdw.py:221 rcgcdw.py:223 +#: rcgcdw.py:251 rcgcdw.py:253 msgid "none" msgstr "" -#: rcgcdw.py:224 rcgcdw.py:349 +#: rcgcdw.py:254 rcgcdw.py:376 msgid "No description provided" msgstr "" -#: rcgcdw.py:225 -msgid "Groups changed from {old_groups} to {new_groups} {reason}" +#: rcgcdw.py:255 +msgid "Groups changed from {old_groups} to {new_groups}{is_reason} {reason}" msgstr "" -#: rcgcdw.py:228 +#: rcgcdw.py:258 msgid "Protected {target}" msgstr "" -#: rcgcdw.py:232 +#: rcgcdw.py:262 msgid "Changed protection level for {article}" msgstr "" -#: rcgcdw.py:236 +#: rcgcdw.py:266 msgid "Removed protection from {article}" msgstr "" -#: rcgcdw.py:239 +#: rcgcdw.py:269 msgid "Changed visibility of revision(s) on page {article} " msgstr "" -#: rcgcdw.py:242 +#: rcgcdw.py:272 msgid "Imported {article} with {count} revision(s)" msgstr "" -#: rcgcdw.py:245 +#: rcgcdw.py:275 msgid "Restored {article}" msgstr "" -#: rcgcdw.py:248 +#: rcgcdw.py:278 msgid "Changed visibility of log events" msgstr "" -#: rcgcdw.py:251 +#: rcgcdw.py:281 msgid "Imported interwiki" msgstr "" -#: rcgcdw.py:254 +#: rcgcdw.py:284 msgid "Edited abuse filter number {number}" msgstr "" -#: rcgcdw.py:257 +#: rcgcdw.py:287 msgid "Merged revision histories of {article} into {dest}" msgstr "" -#: rcgcdw.py:260 +#: rcgcdw.py:290 msgid "Added an entry to the interwiki table" msgstr "" -#: rcgcdw.py:261 rcgcdw.py:265 +#: rcgcdw.py:291 rcgcdw.py:295 msgid "Prefix: {prefix}, website: {website} | {desc}" msgstr "" -#: rcgcdw.py:264 +#: rcgcdw.py:294 msgid "Edited an entry in interwiki table" msgstr "" -#: rcgcdw.py:268 +#: rcgcdw.py:298 msgid "Deleted an entry in interwiki table" msgstr "" -#: rcgcdw.py:269 +#: rcgcdw.py:299 msgid "Prefix: {prefix} | {desc}" msgstr "" -#: rcgcdw.py:272 +#: rcgcdw.py:302 msgid "Changed the content model of the page {article}" msgstr "" -#: rcgcdw.py:273 +#: rcgcdw.py:303 msgid "Model changed from {old} to {new}: {reason}" msgstr "" -#: rcgcdw.py:276 +#: rcgcdw.py:306 msgid "Edited the sprite for {article}" msgstr "" -#: rcgcdw.py:279 +#: rcgcdw.py:309 msgid "Created the sprite sheet for {article}" msgstr "" -#: rcgcdw.py:282 +#: rcgcdw.py:312 msgid "Edited the slice for {article}" msgstr "" -#: rcgcdw.py:285 +#: rcgcdw.py:315 msgid "Created a tag \"{tag}\"" msgstr "" -#: rcgcdw.py:289 +#: rcgcdw.py:319 msgid "Deleted a tag \"{tag}\"" msgstr "" -#: rcgcdw.py:293 +#: rcgcdw.py:323 msgid "Activated a tag \"{tag}\"" msgstr "" -#: rcgcdw.py:296 +#: rcgcdw.py:326 msgid "Deactivated a tag \"{tag}\"" msgstr "" -#: rcgcdw.py:317 +#: rcgcdw.py:347 msgid "Tags" msgstr "" -#: rcgcdw.py:443 +#: rcgcdw.py:469 msgid "Unable to process the event" msgstr "" -#: rcgcdw.py:443 +#: rcgcdw.py:469 msgid "error" msgstr "" -#: rcgcdw.py:523 +#: rcgcdw.py:549 msgid "Daily overview" msgstr "" -#: rcgcdw.py:539 +#: rcgcdw.py:565 msgid " ({} actions)" msgstr "" -#: rcgcdw.py:540 +#: rcgcdw.py:566 msgid " UTC ({} actions)" msgstr "" -#: rcgcdw.py:542 rcgcdw.py:543 +#: rcgcdw.py:568 rcgcdw.py:569 msgid "But nobody came" msgstr "" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Admin actions" msgstr "" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Bytes changed" msgstr "" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Day score" msgstr "" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Edits made" msgstr "" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Most active hours" msgstr "" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Most active users" msgstr "" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "New articles" msgstr "" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "New files" msgstr "" -#: rcgcdw.py:547 +#: rcgcdw.py:573 msgid "Unique contributors" msgstr "" -#: rcgcdw.py:664 +#: rcgcdw.py:662 +msgid "Connection to {wiki} seems to be stable now." +msgstr "" + +#: rcgcdw.py:662 rcgcdw.py:715 msgid "Connection status" msgstr "" -#: rcgcdw.py:664 +#: rcgcdw.py:715 msgid "{wiki} seems to be down or unreachable." msgstr "" -#: rcgcdw.py:683 +#: rcgcdw.py:737 msgid "{wiki} is back up!" msgstr "" diff --git a/rcgcdw.py b/rcgcdw.py index 818d3aa..3607617 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -122,13 +122,13 @@ def webhook_formatter(action, STATIC, **params): colornumber = 9175040 + (math.floor((editsize*-1)/(52)))*65536 elif editsize == 0: colornumber = 8750469 - link = "https://{wiki}.gamepedia.com/index.php?title={article}&curid={pageid}&diff={diff}&oldid={oldrev}".format(wiki=settings["wiki"], pageid=params["pageid"], diff=params["diff"], oldrev=params["oldrev"], article=article_encoded) + link = "https://{wiki}.gamepedia.com/index.php?title={article}&curid={pageid}&diff={diff}&oldid={oldrev}".format(wiki=settings["wiki"], pageid=params["pageid"], diff=params["diff"], oldrev=params["oldrev"], article=params["title"].replace(" ", "_")) embed["title"] = "{article} ({new}{minor}{editsize})".format(article=params["title"], editsize="+"+str(editsize) if editsize>0 else editsize, new= _("(N!) ") if action == 37 else "", minor=_("m ") if action == 1 and params["minor"] else "") elif action == 5: #sending files license = None urls = safe_read(recent_changes.safe_request("https://{wiki}.gamepedia.com/api.php?action=query&format=json&prop=imageinfo&list=&meta=&titles={filename}&iiprop=timestamp%7Curl&iilimit=2".format(wiki=settings["wiki"], filename=params["title"])), "query", "pages") undolink = "" - link ="https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) + link ="https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) additional_info_retrieved = False if urls is not None: if "-1" not in urls: #oage removed before we asked for it @@ -183,7 +183,7 @@ def webhook_formatter(action, STATIC, **params): link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["target"].replace(" ", "_")) embed["title"] = _("Moved {article} to {title} over redirect").format(article=params["title"], title=params["target"]) elif action == 16: - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) embed["title"] = _("Moved protection settings from {article} to {title}").format(article=params["title"], title=params["target"]) elif action == 17: link = "https://{wiki}.gamepedia.com/{user}".format(wiki=settings["wiki"], user=params["blocked_user"].replace(" ", "_").replace(')', '\)')) @@ -590,6 +590,7 @@ class recent_changes_class(object): clock = 0 tags = {} unsent_messages = [] + streak = -1 if settings["limitrefetch"] != -1: with open("lastchange.txt", "r") as record: file_content = record.read().strip() @@ -654,6 +655,11 @@ class recent_changes_class(object): else: if self.downtimecredibility > 0: self.downtimecredibility -= 1 + if self.streak > -1: + self.streak+=1 + if self.streak > 8: + self.streak = -1 + send(_("Connection to {wiki} seems to be stable now.").format(wiki=settings["wikiname"]), _("Connection status"), settings["avatars"]["connection_restored"]) for change in changes: if change["rcid"] in self.ids: continue @@ -708,6 +714,7 @@ class recent_changes_class(object): if(time.time() - self.last_downtime)>1800 and self.check_connection(): #check if last downtime happened within 30 minutes, if yes, don't send a message send(_("{wiki} seems to be down or unreachable.").format(wiki=settings["wikiname"]), _("Connection status"), settings["avatars"]["connection_failed"]) self.last_downtime = time.time() + self.streak = 0 def clear_cache(self): self.map_ips = {} diff --git a/settings.json.example b/settings.json.example index 2a6724f..8e447d7 100644 --- a/settings.json.example +++ b/settings.json.example @@ -10,7 +10,8 @@ "limitrefetch": 28, "wikiname": "Minecraft Wiki", "avatars": { - "connection_failed": "https://i.imgur.com/2jWQEt1.png", + "connection_failed": "https://i.imgur.com/2jWQEt1.png", + "connection_restored": "", "no_event": "", "embed": "" }, From b25052e7f966bb95f92db58ffde7b53b7913de4e Mon Sep 17 00:00:00 2001 From: Frisk Date: Thu, 5 Jul 2018 19:48:42 +0200 Subject: [PATCH 12/18] Updated fr translation --- locale/fr/LC_MESSAGES/rcgcdw.mo | Bin 6921 -> 7089 bytes locale/fr/LC_MESSAGES/rcgcdw.po | 5 ++--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/locale/fr/LC_MESSAGES/rcgcdw.mo b/locale/fr/LC_MESSAGES/rcgcdw.mo index 9cff0dbee843aa56f15b2cb648743e0de578ae56..238c119f8ace35b3d74be6d58907893a53b5b686 100644 GIT binary patch delta 2049 zcmY+^TWn2P9LMoLj@GrORXU2%?a~{)&C%Ow8A`P-WkwAW5}ejaG^3~Ji4x^JxD3fi zNK=zRDjpD^Br${?HWRgSO>Bjb{6%X3*PlB7|Z9ve>60+1meWxEFIY!%fu;Ii@LuVwZc8oAZxPygwM?l4jT6~DzfKM<3CIx{%XACg7$I%qb1`c{1J;$IZ%&UQ9CLk zov7!odEUcH&Yz-kWjuragmW>7ZCHWbI2U`7p9Nwg<9l9%`uw(G5gtbE;ce7Po}jkm z4F=Fp#*W9?s1=3K!2?)^=WrT6M?F7=jMlh|Pz&9OO5#`-4TbbN>O~Jxd-@VJ(+{YL zRB|ZBrKo}Sp`N>hg?I}!kq^kvCJ-(e#422Z+M*6D#mh+0WA-lIFdwrZdX|P`Fc*~@ z)u`O4LnYTT%)?E{+^h>VkqelK*HIIFf&6S7gDG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 zR7BCHWvF&{R74wy9qvABXq9eX1*@j?t5{W#`eV}asJ2)+CzD`J+UWgCRkUrTqZ9`S zrA}$q8f*Qli1kDR5pBEZXf4U8^I6uS)_f14#z*Be{uZo)&?nbMv=ZA0zw`0ZDJ8Uq uTAvV6PDGokU4^HnN>)>aXAYk6mBtKyj63M{gvx_ugW;rj&tR87\n" "Language-Team: \n" "Language: fr\n" @@ -352,9 +352,8 @@ msgid "Unique contributors" msgstr "Contributeurs uniques" #: rcgcdw.py:662 -#, fuzzy msgid "Connection to {wiki} seems to be stable now." -msgstr "Connection to {wiki} seems to be stable now." +msgstr "La connexion avec {wiki} semble stable maintenant." #: rcgcdw.py:662 rcgcdw.py:715 msgid "Connection status" From abf3670392f65a9721a57e056fab9d6c69e00c6b Mon Sep 17 00:00:00 2001 From: Frisk Date: Thu, 5 Jul 2018 20:03:41 +0200 Subject: [PATCH 13/18] ... I'm a stupid idiot. --- rcgcdw.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rcgcdw.py b/rcgcdw.py index 3607617..5b4cf5e 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -251,8 +251,8 @@ def webhook_formatter(action, STATIC, **params): params["old_groups"] = _("none") if len(params["new_groups"]) < 4: params["new_groups"] = _("none") - reason = "| {desc}".format(desc=params["desc"]) if params["desc"]!=_("No description provided") else "" - params["desc"] = _("Groups changed from {old_groups} to {new_groups}{is_reason} {reason}").format(old_groups=params["old_groups"], new_groups=params["new_groups"], is_reason = ":" if reason else "", reason=reason) + reason = ": {desc}".format(desc=params["desc"]) if params["desc"]!=_("No description provided") else "" + params["desc"] = _("Groups changed from {old_groups} to {new_groups} {reason}").format(old_groups=params["old_groups"], new_groups=params["new_groups"], reason=reason) elif action == 2: link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) embed["title"] = _("Protected {target}").format(target=params["title"]) From a50ebceb5512bb314ed8c94e7eae07f2ee2a3bf6 Mon Sep 17 00:00:00 2001 From: Frisk Date: Thu, 5 Jul 2018 20:25:29 +0200 Subject: [PATCH 14/18] Fixxxeesss --- locale/de/LC_MESSAGES/rcgcdw.mo | Bin 6982 -> 6958 bytes locale/de/LC_MESSAGES/rcgcdw.po | 9 +++++---- locale/fr/LC_MESSAGES/rcgcdw.mo | Bin 7089 -> 7065 bytes locale/fr/LC_MESSAGES/rcgcdw.po | 10 +++++----- locale/pl/LC_MESSAGES/rcgcdw.mo | Bin 7019 -> 6995 bytes locale/pl/LC_MESSAGES/rcgcdw.po | 8 ++++---- rcgcdw.pot | 4 ++-- rcgcdw.py | 2 +- 8 files changed, 17 insertions(+), 16 deletions(-) diff --git a/locale/de/LC_MESSAGES/rcgcdw.mo b/locale/de/LC_MESSAGES/rcgcdw.mo index d8b36b56428a9788d83cd068e0a78aa1cd1643db..a1bfff21a67eadf64fefcfb85ff1069d9ba61361 100644 GIT binary patch delta 1149 zcmXZbUr3W-6vy%N+WwU3oSB*?I=5Cii*)Jy*G1~0AS+@JMAS_ZAwo#tRW*#zi=Zyn z>?#Wq^rl!$q>B)O7=Z-q57cc)5J6CRsZihFddK#Dp67kG=bZCCXNAP`L~h(k_nO(a z?Pfc$xx%a+J8=(Q#I1N6<9OFyU%_hTKU_EQF!MmA*=`)d{dfskvKicl53nBRumP7V zEp2`VMQ$k27kA++9%R0ON~|qlMvis_Tk!19e2{2<2#D1pDv?vbQZ`8@|O5{=vOiLv~8ApNr1)3`X!g#_=Y$V9vFO#Ij%5 zgIj9Nx^V#cUD_rXG;<^Cx`f)`LVhBIrFs`El_0TagiAwA&D!>G)Hx^LMmcvGTg=)^v zsLIP|42ri})Dgw77f)dm@ok!cDtw9x^a54s3aYYqs7JqsQ7k8lD(FBR!5|XLPNI%( z6!mYIMD06;KD_VFXHm^Nk9}&s1qRyS88%@7)pTp9Ch_v$ad3#w0X}*qGmpHNo%W35 x%Q)vUS>H9sGG2d+b2=aO|Muj=6%8J5yrVzfnK>Galtx|otHGErK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,9 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2018-07-05 14:52+0200\n" -"PO-Revision-Date: 2018-07-05 19:09+0200\n" -"Last-Translator: Frisk \n" +"POT-Creation-Date: 2018-07-05 20:21+0200\n" +"PO-Revision-Date: 2018-07-05 20:22+0200\n" +"Last-Translator: JSBM\n" "Language-Team: \n" "Language: fr\n" "MIME-Version: 1.0\n" @@ -188,8 +188,8 @@ msgid "No description provided" msgstr "Aucune description" #: rcgcdw.py:255 -msgid "Groups changed from {old_groups} to {new_groups}{is_reason} {reason}" -msgstr "Groupe modifié de {old_groups} vers {new_groups}{is_reason} {reason}" +msgid "Groups changed from {old_groups} to {new_groups}{reason}" +msgstr "Groupe modifié de {old_groups} vers {new_groups}{reason}" #: rcgcdw.py:258 msgid "Protected {target}" diff --git a/locale/pl/LC_MESSAGES/rcgcdw.mo b/locale/pl/LC_MESSAGES/rcgcdw.mo index 5139e7ea00b7a79bac0654982e4ef58ef6acfcae..f64f3b8bba6bbb068c5dbbd1a76088802f5bb92d 100644 GIT binary patch delta 1149 zcmXZaOK1~O6vpv0C7JkWn_9JMs!bY=R%_8rCE6NXv=SeSf+&KNilBlNsh~RrCkoYt zE`%|li&jMtH)3hP7gZ>_(N!fbluAKFp*|=Iu8iRS3kk{m?qhQAx#ynmnNnu#q~mWh zvo8zH8nLC;tR2(11_y8+UPKSCROesdBKqH|ma&t5eVth|_Fx+xMyBjC&d2Mx3`cPV zKB_a{A~dEL&_?g86Q8hy{$EsJ>+8*k(X!ZzyKw^!qUH;@0PkZ6i>UXXpaOV>3hXT| z$Dg=;AJH!aj`Sany;1QCBvKO7Tlnpwp;K z&EY1DF{rEAiz)Qa&{##|CZ_Q*YJpi)EjUE86gyBG^dhm@3Dil>qE0@Hop=lNehC%W zEUv^F2KzCNTksqbh;L&w^x_9ps(xb&#yI9$>_TmL1StnQjk?=BX7DOjPK-L~G;T$g zL0#bv)VewJa0pckcQC>J_MAqRff-cMH4{w^_aIrbYe>D=U1V(=N1f<3>gv9tYUBqh z6Ms;FMCs`LZdAbgFo^@W9rK!Jf19A8RF+W1G=uuXXH@mhp;BMQ7`E~tR?DI`K7f^l zk!)KYb@D=WegsuJ_fYFTKo##(?9zr4H2B&i4@LeF6Br>+>bD`qYd!o_r26a(M#4v( y_P}ui=U`B9PdOHZBXOs%n2P)g6_d5`P}tkt?WKcU!|F=QD-Jara*L&=8=?QOgm#?( delta 1173 zcmY+?Pe@cz6vy%NV*Y44I+Ga1jv_H&@V~iCJcKMU4~y|CF2G@2 zgik}}T9D2-6FTU7;lWQ_!#G%$4=jnqXxniac48wA6rNwhxs30j51*jcKSu@d1{K(6 zT!?>hK30^w96~2rZWh6{$lp3>G~a~^>>&E_2eHmL9$lBtQaaZ$hR;wNOrdHaL^M^HLLJb7#AwG+DIY}Ld#>$eeZn+q-@O>eK~ya~zzFBtdpaALm_`*{f@rp3HPFvCpKcaa zBRD1|tjVXo68T$-hFGl= zb#O1{Hb$~-8Pv^h7oOio)y`wozAsS4`xa9=aEuOr`$(h6|6l~`$dksKk>bszTSc1t zc~|`Voi@)2cuu=_G0^9vJ%6yyY0B0IfB8y!`n!%D=\n" "Language-Team: \n" "Language: pl\n" @@ -189,8 +189,8 @@ msgid "No description provided" msgstr "Nie podano opisu zmian" #: rcgcdw.py:255 -msgid "Groups changed from {old_groups} to {new_groups}{is_reason} {reason}" -msgstr "Grupy zmienione z {old_groups} do {new_groups}{is_reason} {reason}" +msgid "Groups changed from {old_groups} to {new_groups}{reason}" +msgstr "Grupy zmienione z {old_groups} do {new_groups}{reason}" #: rcgcdw.py:258 msgid "Protected {target}" diff --git a/rcgcdw.pot b/rcgcdw.pot index a3a9d34..a13b3ee 100644 --- a/rcgcdw.pot +++ b/rcgcdw.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2018-07-05 14:52+0200\n" +"POT-Creation-Date: 2018-07-05 20:21+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -182,7 +182,7 @@ msgid "No description provided" msgstr "" #: rcgcdw.py:255 -msgid "Groups changed from {old_groups} to {new_groups}{is_reason} {reason}" +msgid "Groups changed from {old_groups} to {new_groups}{reason}" msgstr "" #: rcgcdw.py:258 diff --git a/rcgcdw.py b/rcgcdw.py index 5b4cf5e..6097e15 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -252,7 +252,7 @@ def webhook_formatter(action, STATIC, **params): if len(params["new_groups"]) < 4: params["new_groups"] = _("none") reason = ": {desc}".format(desc=params["desc"]) if params["desc"]!=_("No description provided") else "" - params["desc"] = _("Groups changed from {old_groups} to {new_groups} {reason}").format(old_groups=params["old_groups"], new_groups=params["new_groups"], reason=reason) + params["desc"] = _("Groups changed from {old_groups} to {new_groups}{reason}").format(old_groups=params["old_groups"], new_groups=params["new_groups"], reason=reason) elif action == 2: link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) embed["title"] = _("Protected {target}").format(target=params["title"]) From 2ddf3eba1bf316fd6675a8502d1963cac26580c3 Mon Sep 17 00:00:00 2001 From: Frisk Date: Fri, 6 Jul 2018 12:35:46 +0200 Subject: [PATCH 15/18] Fixed FR translation --- locale/fr/LC_MESSAGES/rcgcdw.mo | Bin 7065 -> 7065 bytes locale/fr/LC_MESSAGES/rcgcdw.po | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/fr/LC_MESSAGES/rcgcdw.mo b/locale/fr/LC_MESSAGES/rcgcdw.mo index 6082905d93ef1255da307f73c9fef29067f74833..785353c5e541d0dba167a991f8ae4844626545f4 100644 GIT binary patch delta 27 icmbPfKGS@IngF|*f}w$xiOFVNffOdj_|21q*f{}f9tQ*f delta 25 hcmbPfKGS@In!x0L{A`Ryn{@?Jm>3l{PZDD11ORQj2R;A* diff --git a/locale/fr/LC_MESSAGES/rcgcdw.po b/locale/fr/LC_MESSAGES/rcgcdw.po index fde6cb3..77c0ae9 100644 --- a/locale/fr/LC_MESSAGES/rcgcdw.po +++ b/locale/fr/LC_MESSAGES/rcgcdw.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "POT-Creation-Date: 2018-07-05 20:21+0200\n" -"PO-Revision-Date: 2018-07-05 20:22+0200\n" +"PO-Revision-Date: 2018-07-06 10:44+0200\n" "Last-Translator: JSBM\n" "Language-Team: \n" "Language: fr\n" @@ -93,7 +93,7 @@ msgstr "toujours" #: rcgcdw.py:192 msgid "Blocked {blocked_user} for {time}" -msgstr "{blocked user} a été bloqué pour {time}" +msgstr "{blocked_user} a été bloqué pour {time}" #: rcgcdw.py:196 msgid "Changed block settings for {blocked_user}" From 1485757ebd63f85a7c8fbf5cdea01c1df7cdab1c Mon Sep 17 00:00:00 2001 From: Frisk Date: Fri, 6 Jul 2018 16:45:30 +0200 Subject: [PATCH 16/18] Small improvements, fixed streak resetting --- locale/fr/LC_MESSAGES/rcgcdw.po | 2 +- rcgcdw.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/locale/fr/LC_MESSAGES/rcgcdw.po b/locale/fr/LC_MESSAGES/rcgcdw.po index 77c0ae9..c556bb8 100644 --- a/locale/fr/LC_MESSAGES/rcgcdw.po +++ b/locale/fr/LC_MESSAGES/rcgcdw.po @@ -269,7 +269,7 @@ msgstr "Création d'une feuille de sprite pour {article}" #: rcgcdw.py:312 msgid "Edited the slice for {article}" -msgstr "" +msgstr "Edited the slice for {article}" #: rcgcdw.py:315 msgid "Created a tag \"{tag}\"" diff --git a/rcgcdw.py b/rcgcdw.py index 6097e15..3d47ff1 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -351,7 +351,7 @@ def webhook_formatter(action, STATIC, **params): send_to_discord(formatted_embed) def handle_discord_http(code, formatted_embed): - if code <300 and code > 199: #message went through + if 300 > code > 199: #message went through return 0 elif code == 400: #HTTP BAD REQUEST logging.error("Following message has been rejected by Discord, please submit a bug on our bugtracker adding it:") @@ -360,11 +360,10 @@ def handle_discord_http(code, formatted_embed): elif code == 401 or code == 404: #HTTP UNAUTHORIZED AND NOT FOUND logging.error("Webhook URL is invalid or no longer in use, please replace it with proper one.") sys.exit(1) - return 1 elif code == 429: logging.error("We are sending too many requests to the Discord, slowing down...") return 2 - elif code > 500 and code < 600: + elif 499 < code < 600: logging.error("Discord have trouble processing the event, and because the HTTP code returned is {} it means we blame them.".format(code)) return 3 @@ -708,6 +707,8 @@ class recent_changes_class(object): def downtime_controller(self): if settings["show_updown_messages"] == False: return + if self.streak > -1: #reset the streak of successful connections when bad one happens + self.streak = 0 if self.downtimecredibility<60: self.downtimecredibility+=15 else: From 13d8dd171dadbb918bd13759c0c73266ed22948c Mon Sep 17 00:00:00 2001 From: Frisk Date: Sun, 8 Jul 2018 13:46:21 +0200 Subject: [PATCH 17/18] add more bad code --- rcgcdw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rcgcdw.py b/rcgcdw.py index 3d47ff1..58f8cad 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -245,7 +245,7 @@ def webhook_formatter(action, STATIC, **params): elif action == 20: link = "https://{wiki}.gamepedia.com/User:".format(wiki=settings["wiki"])+params["title"].split(":")[1] embed["title"] = _("Changed group membership for {target}").format(target=params["title"].split(":")[1]) - if params["old_groups"].count(' ') < params["new_groups"].count(' '): + if params["old_groups"].count(' ') < params["new_groups"].count(' ') or params["old_groups"] == "none": #TODO Hardcoded value, depends on translation embed["thumbnail"]["url"] = "https://i.imgur.com/WnGhF5g.gif" if len(params["old_groups"]) < 4: params["old_groups"] = _("none") From 61b5a218cfd1f3dfd408ac3aeb1627280daf23eb Mon Sep 17 00:00:00 2001 From: Frisk Date: Sun, 8 Jul 2018 13:49:02 +0200 Subject: [PATCH 18/18] Bump version to 1.2 --- settings.json.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.json.example b/settings.json.example index 8e447d7..d5d6766 100644 --- a/settings.json.example +++ b/settings.json.example @@ -3,7 +3,7 @@ "wiki": "minecraft", "lang": "en", "header": { - "user-agent": "FrisksRcGcDw/1.1" + "user-agent": "FrisksRcGcDw/1.2" }, "limit": 11, "webhookURL": "https://discordapp.com/api/webhooks/111111111111111111/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",