Fixes, new translations, updated docs

This commit is contained in:
Frisk 2018-06-18 17:26:03 +02:00
parent dfdd4c1110
commit d3f1646804
No known key found for this signature in database
GPG key ID: 0E9A7D3C0A01586C
8 changed files with 127 additions and 236 deletions

View file

@ -24,13 +24,19 @@ Explanation for settings:
`limitrefetch` limit of how many changes can be retrieved when refetch happens, cannot be lower than limit. -1 if you want to disable auto-refetch `limitrefetch` limit of how many changes can be retrieved when refetch happens, cannot be lower than limit. -1 if you want to disable auto-refetch
`wikiname` a name of the wiki the bot will work on, required in some messages `wikiname` a name of the wiki the bot will work on, required in some messages
`avatars` this section makes specific types of messages overwrite the default webhook avatar `avatars` this section makes specific types of messages overwrite the default webhook avatar
`connection_failed` message printed when script fails connection with the wiki several times * `connection_failed` message printed when script fails connection with the wiki several times
`no_event` error message when the event couldn't be recognized by the script * `no_event` error message when the event couldn't be recognized by the script
`embed` every embed message showing changes * `embed` every embed message showing changes
`verbose_level` a number (min 0, max 50) identifying the type of messages that will be written into the console. (CRITICAL 50, ERROR 40, WARNING 30, INFO 20, DEBUG 10)
`show_updown_messages` bool value, depending on this settings the messages whenever the wiki goes up and down will be sent to the channel
### How to use ### ### How to use ###
Make sure you have installed all of dependencies and filled settings.json properly. Make sure you have installed all of dependencies and filled settings.json properly.
When you are sure, use `python rcgcdw.py` command to run the script. When you are sure, use `python rcgcdw.py` command to run the script.
### Credits ###
Translators:
* MarkusRost for German translation
### Other ### ### Other ###
Script seem to use about 17MB of RAM and negligible amount of CPU when fetching changes. Script seem to use about 17MB of RAM and negligible amount of CPU when fetching changes.

Binary file not shown.

View file

@ -5,9 +5,9 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"POT-Creation-Date: 2018-06-18 11:12+0200\n" "POT-Creation-Date: 2018-06-18 16:13+0200\n"
"PO-Revision-Date: 2018-06-18 13:49+0200\n" "PO-Revision-Date: 2018-06-18 16:27+0200\n"
"Last-Translator: \n" "Last-Translator: MarkusRost\n"
"Language-Team: \n" "Language-Team: \n"
"Language: de\n" "Language: de\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -16,39 +16,30 @@ msgstr ""
"Generated-By: pygettext.py 1.5\n" "Generated-By: pygettext.py 1.5\n"
"X-Generator: Poedit 2.0.8\n" "X-Generator: Poedit 2.0.8\n"
#: rcgcdw.py:84
msgid "(N!) " msgid "(N!) "
msgstr "(N!) " msgstr "(N!) "
#: rcgcdw.py:84
msgid "m " msgid "m "
msgstr "K " msgstr "K "
#: rcgcdw.py:98
msgid "Uploaded a new version of {name}" msgid "Uploaded a new version of {name}"
msgstr "Neue Dateiversion {name}" msgstr "Neue Dateiversion {name}"
#: rcgcdw.py:99
msgid "([preview]({link}) | [undo]({undolink}))" msgid "([preview]({link}) | [undo]({undolink}))"
msgstr "([Vorschau]({link}) | [zurücksetzen]({undolink}))" msgstr "([Vorschau]({link}) | [zurücksetzen]({undolink}))"
#: rcgcdw.py:99 rcgcdw.py:115
msgid "Options" msgid "Options"
msgstr "Optionen" msgstr "Optionen"
#: rcgcdw.py:101
msgid "Uploaded {name}" msgid "Uploaded {name}"
msgstr "Neue Datei {name}" msgstr "Neue Datei {name}"
#: rcgcdw.py:108
msgid "**No license!**" msgid "**No license!**"
msgstr "**Keine Lizenz!**" msgstr "**Keine Lizenz!**"
#: rcgcdw.py:115
msgid "([preview]({link}))" msgid "([preview]({link}))"
msgstr "([Vorschau]({link}))" msgstr "([Vorschau]({link}))"
#: rcgcdw.py:116
msgid "" msgid ""
"{desc}\n" "{desc}\n"
"License: {license}" "License: {license}"
@ -56,246 +47,214 @@ msgstr ""
"{desc}\n" "{desc}\n"
"Lizenz: {license}" "Lizenz: {license}"
#: rcgcdw.py:121
msgid "Deleted page {article}" msgid "Deleted page {article}"
msgstr "Löschte {article}" msgstr "Löschte {article}"
#: rcgcdw.py:126
msgid "Deleted redirect {article} by overwriting" msgid "Deleted redirect {article} by overwriting"
msgstr "Löschte die Weiterleitung {article} um Platz zu machen" msgstr "Löschte die Weiterleitung {article} um Platz zu machen"
#: rcgcdw.py:130
msgid "A redirect has been made" msgid "A redirect has been made"
msgstr "Eine Weiterleitung wurde erstellt" msgstr "Eine Weiterleitung wurde erstellt"
#: rcgcdw.py:130
msgid "No redirect has been made" msgid "No redirect has been made"
msgstr "Die Erstellung einer Weiterleitung wurde unterdrückt" msgstr "Die Erstellung einer Weiterleitung wurde unterdrückt"
#: rcgcdw.py:131
msgid "Moved {article} to {target}" msgid "Moved {article} to {target}"
msgstr "Verschob {article} nach {target}" msgstr "Verschob {article} nach {target}"
#: rcgcdw.py:134
msgid "Moved {article} to {title} over redirect" msgid "Moved {article} to {title} over redirect"
msgstr "Verschob {article} nach {target} und überschrieb eine Weiterleitung\"" msgstr "Verschob {article} nach {target} und überschrieb eine Weiterleitung\""
#: rcgcdw.py:138
msgid "Moved protection settings from {article} to {title}" msgid "Moved protection settings from {article} to {title}"
msgstr "Verschob die Schutzeinstellungen von {article} nach {title}" msgstr "Verschob die Schutzeinstellungen von {article} nach {title}"
#: rcgcdw.py:143
msgid "infinity and beyond" msgid "infinity and beyond"
msgstr "alle Ewigkeit" msgstr "alle Ewigkeit"
#: rcgcdw.py:144
msgid "Blocked {blocked_user} for {time}" msgid "Blocked {blocked_user} for {time}"
msgstr "Sperrte {blocked_user} für {time}" msgstr "Sperrte {blocked_user} für {time}"
#: rcgcdw.py:150
msgid "Changed block settings for {blocked_user}" msgid "Changed block settings for {blocked_user}"
msgstr "Änderte die Sperreinstellungen für {blocked_user}" msgstr "Änderte die Sperreinstellungen für {blocked_user}"
#: rcgcdw.py:156
msgid "Unblocked {blocked_user}" msgid "Unblocked {blocked_user}"
msgstr "Hob die Sperre von {blocked_user} auf" msgstr "Hob die Sperre von {blocked_user} auf"
#: rcgcdw.py:161
msgid "Left a comment on {target}'s profile" msgid "Left a comment on {target}'s profile"
msgstr "Hinterließ ein Kommentar auf dem Profil von {target}" msgstr "Hinterließ ein Kommentar auf dem Profil von {target}"
#: rcgcdw.py:164
msgid "Replied to a comment on {target}'s profile" msgid "Replied to a comment on {target}'s profile"
msgstr "Antwortete auf ein Kommentar auf dem Profil von {target}" msgstr "Antwortete auf ein Kommentar auf dem Profil von {target}"
#: rcgcdw.py:167
msgid "Edited a comment on {target}'s profile" msgid "Edited a comment on {target}'s profile"
msgstr "Bearbeitete ein Kommentar auf dem Profil von {target}" msgstr "Bearbeitete ein Kommentar auf dem Profil von {target}"
#: rcgcdw.py:171
msgid "Location" msgid "Location"
msgstr "Wohnort" msgstr "Wohnort"
#: rcgcdw.py:173
msgid "About me" msgid "About me"
msgstr "\"Über mich\"-Abschnitt" msgstr "\"Über mich\"-Abschnitt"
#: rcgcdw.py:175
msgid "Google link" msgid "Google link"
msgstr "Google-Konto" msgstr "Google-Konto"
#: rcgcdw.py:177
msgid "Facebook link" msgid "Facebook link"
msgstr "Facebook-Seite" msgstr "Facebook-Seite"
#: rcgcdw.py:179
msgid "Twitter link" msgid "Twitter link"
msgstr "Twitter-Benutzernamen" msgstr "Twitter-Benutzernamen"
#: rcgcdw.py:181
msgid "Reddit link" msgid "Reddit link"
msgstr "Reddit-Benutzernamen" msgstr "Reddit-Benutzernamen"
#: rcgcdw.py:183
msgid "Twitch link" msgid "Twitch link"
msgstr "Twitch-Account" msgstr "Twitch-Account"
#: rcgcdw.py:185
msgid "PSN link" msgid "PSN link"
msgstr "PSN-Account" msgstr "PSN-Account"
#: rcgcdw.py:187
msgid "VK link" msgid "VK link"
msgstr "VK-Account" msgstr "VK-Account"
#: rcgcdw.py:189
msgid "XVL link" msgid "XVL link"
msgstr "Xbox-Live-Tag" msgstr "Xbox-Live-Tag"
#: rcgcdw.py:191
msgid "Steam link" msgid "Steam link"
msgstr "Steam-Account" msgstr "Steam-Account"
#: rcgcdw.py:193
msgid "Unknown" msgid "Unknown"
msgstr "Unbekannt" msgstr "Unbekannt"
#: rcgcdw.py:194
msgid "Edited {target}'s profile" msgid "Edited {target}'s profile"
msgstr "Bearbeitete das Profil von {target}" msgstr "Bearbeitete das Profil von {target}"
#: rcgcdw.py:195
msgid "{field} field changed to: {desc}" msgid "{field} field changed to: {desc}"
msgstr "{field} geändert zu: {desc}" msgstr "{field} geändert zu: {desc}"
#: rcgcdw.py:198
msgid "Deleted a comment on {target}'s profile" msgid "Deleted a comment on {target}'s profile"
msgstr "Löschte ein Kommentar auf dem Profil von {target}" msgstr "Löschte ein Kommentar auf dem Profil von {target}"
#: rcgcdw.py:201
msgid "Changed group membership for {target}" msgid "Changed group membership for {target}"
msgstr "Änderte die Gruppenzugehörigkeit von {target}" msgstr "Änderte die Gruppenzugehörigkeit von {target}"
#: rcgcdw.py:205 rcgcdw.py:207
msgid "none" msgid "none"
msgstr "keine" msgstr "keine"
#: rcgcdw.py:208 rcgcdw.py:302
msgid "No description provided" msgid "No description provided"
msgstr "Keine Zusammenfassung angegeben" msgstr "Keine Zusammenfassung angegeben"
#: rcgcdw.py:209
msgid "Groups changed from {old_groups} to {new_groups} {reason}" msgid "Groups changed from {old_groups} to {new_groups} {reason}"
msgstr "Änderte die Gruppenzugehörigkeit von {old_groups} auf {new_groups}: {reason}" msgstr "Änderte die Gruppenzugehörigkeit von {old_groups} auf {new_groups}: {reason}"
#: rcgcdw.py:212
msgid "Protected {target}" msgid "Protected {target}"
msgstr "Schützte {target}" msgstr "Schützte {target}"
#: rcgcdw.py:217
msgid "Changed protection level for {article}" msgid "Changed protection level for {article}"
msgstr "Änderte den Schutzstatus von {article}" msgstr "Änderte den Schutzstatus von {article}"
#: rcgcdw.py:222
msgid "Removed protection from {article}" msgid "Removed protection from {article}"
msgstr "Entfernte den Schutz von {article}" msgstr "Entfernte den Schutz von {article}"
#: rcgcdw.py:226
msgid "Changed visibility of revision(s) on page {article} " msgid "Changed visibility of revision(s) on page {article} "
msgstr "Änderte die Sichtbarkeit einiger Versionen von {article}" msgstr "Änderte die Sichtbarkeit einiger Versionen von {article}"
#: rcgcdw.py:229
msgid "Imported {article} with {count} revision(s)" msgid "Imported {article} with {count} revision(s)"
msgstr "Importierte {article} mit {count} Versionen" msgstr "Importierte {article} mit {count} Versionen"
#: rcgcdw.py:232
msgid "Restored {article}" msgid "Restored {article}"
msgstr "Stellte {article} wieder her" msgstr "Stellte {article} wieder her"
#: rcgcdw.py:235
msgid "Changed visibility of log events" msgid "Changed visibility of log events"
msgstr "Änderte die Sichtbarkeit eines Logbucheintrags" msgstr "Änderte die Sichtbarkeit eines Logbucheintrags"
#: rcgcdw.py:238
msgid "Imported interwiki" msgid "Imported interwiki"
msgstr "Importierte Interwiki" msgstr "Importierte Interwiki"
#: rcgcdw.py:241
msgid "Edited abuse filter number {number}" msgid "Edited abuse filter number {number}"
msgstr "Änderte Missbrauchsfilter {number}" msgstr "Änderte Missbrauchsfilter {number}"
#: rcgcdw.py:244
msgid "Merged revision histories of {article} into {dest}" msgid "Merged revision histories of {article} into {dest}"
msgstr "Vereinigte Versionsgeschichten von {article} in {dest}" msgstr "Vereinigte Versionsgeschichten von {article} in {dest}"
#: rcgcdw.py:247
msgid "Added an entry to the interwiki table" msgid "Added an entry to the interwiki table"
msgstr "Fügte ein Interwiki-Präfix hinzu" msgstr "Fügte ein Interwiki-Präfix hinzu"
#: rcgcdw.py:248 rcgcdw.py:252
msgid "Prefix: {prefix}, website: {website} | {desc}" msgid "Prefix: {prefix}, website: {website} | {desc}"
msgstr "Präfix: {prefix}, URL: {website} | {desc}" msgstr "Präfix: {prefix}, URL: {website} | {desc}"
#: rcgcdw.py:251
msgid "Edited an entry in interwiki table" msgid "Edited an entry in interwiki table"
msgstr "Änderte ein Interwiki-Präfix" msgstr "Änderte ein Interwiki-Präfix"
#: rcgcdw.py:255
msgid "Deleted an entry in interwiki table" msgid "Deleted an entry in interwiki table"
msgstr "Entfernte ein Interwiki-Präfix" msgstr "Entfernte ein Interwiki-Präfix"
#: rcgcdw.py:256
msgid "Prefix: {prefix} | {desc}" msgid "Prefix: {prefix} | {desc}"
msgstr "Präfix: {prefix} | {desc}" msgstr "Präfix: {prefix} | {desc}"
#: rcgcdw.py:259
msgid "Changed the content model of the page {article}" msgid "Changed the content model of the page {article}"
msgstr "Änderte das Inhaltsmodell von {article}" msgstr "Änderte das Inhaltsmodell von {article}"
#: rcgcdw.py:260
msgid "Model changed from {old} to {new}: {reason}" msgid "Model changed from {old} to {new}: {reason}"
msgstr "Modell geändert von {old} zu {new}: {reason}" msgstr "Modell geändert von {old} zu {new}: {reason}"
#: rcgcdw.py:263
msgid "Edited the sprite for {article}" msgid "Edited the sprite for {article}"
msgstr "Edited the sprite for {article}" msgstr "Edited the sprite for {article}"
#: rcgcdw.py:266
msgid "Created the sprite sheet for {article}" msgid "Created the sprite sheet for {article}"
msgstr "Created the sprite sheet for {article}" msgstr "Created the sprite sheet for {article}"
#: rcgcdw.py:269
msgid "Edited the slice for {article}" msgid "Edited the slice for {article}"
msgstr "Edited the slice for {article}" msgstr "Edited the slice for {article}"
#: rcgcdw.py:272
msgid "Created a tag \"{tag}\"" msgid "Created a tag \"{tag}\""
msgstr "Erstellte die Markierung \"{tag}\"" msgstr "Erstellte die Markierung \"{tag}\""
#: rcgcdw.py:275
msgid "Deleted a tag \"{tag}\"" msgid "Deleted a tag \"{tag}\""
msgstr "Löschte die Markierung \"{tag}\"" msgstr "Löschte die Markierung \"{tag}\""
#: rcgcdw.py:278
msgid "Activated a tag \"{tag}\"" msgid "Activated a tag \"{tag}\""
msgstr "Aktivierte die Markierung \"{tag}\"" msgstr "Aktivierte die Markierung \"{tag}\""
#: rcgcdw.py:281
msgid "Deactivated a tag \"{tag}\"" msgid "Deactivated a tag \"{tag}\""
msgstr "Deaktivierte die Markierung \"{tag}\"" msgstr "Deaktivierte die Markierung \"{tag}\""
#: rcgcdw.py:387
msgid "Unable to process the event" msgid "Unable to process the event"
msgstr "Ereignis kann nicht verabreitet werden" msgstr "Ereignis kann nicht verabreitet werden"
#: rcgcdw.py:387
msgid "error" msgid "error"
msgstr "Fehler" msgstr "Fehler"
#: rcgcdw.py:485
msgid "Connection status" msgid "Connection status"
msgstr "Verbindungsstatus" msgstr "Verbindungsstatus"
#: rcgcdw.py:485
msgid "{wiki} seems to be down or unreachable." msgid "{wiki} seems to be down or unreachable."
msgstr "Das {wiki} scheint unerreichbar zu sein." msgstr "Das {wiki} scheint unerreichbar zu sein."
msgid "Admin actions"
msgstr "Adminaktionen"
msgid "Bytes changed"
msgstr "Bytes geändert"
msgid "Day score"
msgstr "Tageswert"
msgid "Edits made"
msgstr "Bearbeitungen"
msgid "Most active user"
msgstr "Aktivster Benutzer"
#, fuzzy
#| msgid "Restored {article}"
msgid "New articles"
msgstr "Stellte {article} wieder her"
msgid "New files"
msgstr "Neue Dateien"
msgid "Unique contributors"
msgstr "Einzelne Autoren"
msgid "{wiki} is back up!"
msgstr "Das {wiki} ist wieder erreichbar."

Binary file not shown.

View file

@ -5,8 +5,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: RcGcDw\n" "Project-Id-Version: RcGcDw\n"
"POT-Creation-Date: 2018-06-18 11:12+0200\n" "POT-Creation-Date: 2018-06-18 16:13+0200\n"
"PO-Revision-Date: 2018-06-18 11:15+0200\n" "PO-Revision-Date: 2018-06-18 17:24+0200\n"
"Last-Translator: Frisk <piotrex43@protonmail.ch>\n" "Last-Translator: Frisk <piotrex43@protonmail.ch>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: pl\n" "Language: pl\n"
@ -18,39 +18,30 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2);\n" "|| n%100>=20) ? 1 : 2);\n"
#: rcgcdw.py:84
msgid "(N!) " msgid "(N!) "
msgstr "(N!) " msgstr "(N!) "
#: rcgcdw.py:84
msgid "m " msgid "m "
msgstr "d " msgstr "d "
#: rcgcdw.py:98
msgid "Uploaded a new version of {name}" msgid "Uploaded a new version of {name}"
msgstr "Przesłał(a) nową wersję {name}" msgstr "Przesłał(a) nową wersję {name}"
#: rcgcdw.py:99
msgid "([preview]({link}) | [undo]({undolink}))" msgid "([preview]({link}) | [undo]({undolink}))"
msgstr "([podgląd]({link}) | [wycofaj]({undolink}))" msgstr "([podgląd]({link}) | [wycofaj]({undolink}))"
#: rcgcdw.py:99 rcgcdw.py:115
msgid "Options" msgid "Options"
msgstr "Opcje" msgstr "Opcje"
#: rcgcdw.py:101
msgid "Uploaded {name}" msgid "Uploaded {name}"
msgstr "Przesłał(a) {name}" msgstr "Przesłał(a) {name}"
#: rcgcdw.py:108
msgid "**No license!**" msgid "**No license!**"
msgstr "**Brak licencji!**" msgstr "**Brak licencji!**"
#: rcgcdw.py:115
msgid "([preview]({link}))" msgid "([preview]({link}))"
msgstr "([podgląd]({link})" msgstr "([podgląd]({link})"
#: rcgcdw.py:116
msgid "" msgid ""
"{desc}\n" "{desc}\n"
"License: {license}" "License: {license}"
@ -58,252 +49,218 @@ msgstr ""
"{desc}\n" "{desc}\n"
"Licencja: {license}" "Licencja: {license}"
#: rcgcdw.py:121
msgid "Deleted page {article}" msgid "Deleted page {article}"
msgstr "Usunął/usunęła {article}" msgstr "Usunął/usunęła {article}"
#: rcgcdw.py:126
msgid "Deleted redirect {article} by overwriting" msgid "Deleted redirect {article} by overwriting"
msgstr "" msgstr ""
"Usunął/usunęła przekierowanie ({article}) aby utworzyć miejsce dla " "Usunął/usunęła przekierowanie ({article}) aby utworzyć miejsce dla "
"przenoszonej strony" "przenoszonej strony"
#: rcgcdw.py:130
msgid "A redirect has been made" msgid "A redirect has been made"
msgstr "Zostało utworzone przekierowanie" msgstr "Zostało utworzone przekierowanie"
#: rcgcdw.py:130
msgid "No redirect has been made" msgid "No redirect has been made"
msgstr "Nie utworzono przekierowania" msgstr "Nie utworzono przekierowania"
#: rcgcdw.py:131
msgid "Moved {article} to {target}" msgid "Moved {article} to {target}"
msgstr "Przeniósł/przeniosła {article} do {target}" msgstr "Przeniósł/przeniosła {article} do {target}"
#: rcgcdw.py:134
msgid "Moved {article} to {title} over redirect" msgid "Moved {article} to {title} over redirect"
msgstr "Przeniósł/przeniosła {article} do strony przekierowującej {target}" msgstr "Przeniósł/przeniosła {article} do strony przekierowującej {target}"
#: rcgcdw.py:138
msgid "Moved protection settings from {article} to {title}" msgid "Moved protection settings from {article} to {title}"
msgstr "Przeniesiono ustawienia zabezpieczeń z {article} do {title}" msgstr "Przeniesiono ustawienia zabezpieczeń z {article} do {title}"
#: rcgcdw.py:143
msgid "infinity and beyond" msgid "infinity and beyond"
msgstr "wieczność" msgstr "wieczność"
#: rcgcdw.py:144
msgid "Blocked {blocked_user} for {time}" msgid "Blocked {blocked_user} for {time}"
msgstr "Zablokowano {blocked_user} na {time}" msgstr "Zablokowano {blocked_user} na {time}"
#: rcgcdw.py:150
msgid "Changed block settings for {blocked_user}" msgid "Changed block settings for {blocked_user}"
msgstr "Zmienił ustawienia blokady {blocked_user}" msgstr "Zmienił ustawienia blokady {blocked_user}"
#: rcgcdw.py:156
msgid "Unblocked {blocked_user}" msgid "Unblocked {blocked_user}"
msgstr "Zablokował {blocked_user} na {time}" msgstr "Zablokował {blocked_user} na {time}"
#: rcgcdw.py:161
msgid "Left a comment on {target}'s profile" msgid "Left a comment on {target}'s profile"
msgstr "Pozostawiono komentarz na profilu użytkownika {target}" msgstr "Pozostawiono komentarz na profilu użytkownika {target}"
#: rcgcdw.py:164
msgid "Replied to a comment on {target}'s profile" msgid "Replied to a comment on {target}'s profile"
msgstr "Odpowiedziano na komentarz na profilu użytkownika {target}" msgstr "Odpowiedziano na komentarz na profilu użytkownika {target}"
#: rcgcdw.py:167
msgid "Edited a comment on {target}'s profile" msgid "Edited a comment on {target}'s profile"
msgstr "Edytowano komentarz na profilu użytkownika {target}" msgstr "Edytowano komentarz na profilu użytkownika {target}"
#: rcgcdw.py:171
msgid "Location" msgid "Location"
msgstr "Lokacja" msgstr "Lokacja"
#: rcgcdw.py:173
msgid "About me" msgid "About me"
msgstr "O mnie" msgstr "O mnie"
#: rcgcdw.py:175
msgid "Google link" msgid "Google link"
msgstr "link Google" msgstr "link Google"
#: rcgcdw.py:177
msgid "Facebook link" msgid "Facebook link"
msgstr "link Facebook" msgstr "link Facebook"
#: rcgcdw.py:179
msgid "Twitter link" msgid "Twitter link"
msgstr "link Twitter" msgstr "link Twitter"
#: rcgcdw.py:181
msgid "Reddit link" msgid "Reddit link"
msgstr "link Reddit" msgstr "link Reddit"
#: rcgcdw.py:183
msgid "Twitch link" msgid "Twitch link"
msgstr "link Twitch" msgstr "link Twitch"
#: rcgcdw.py:185
msgid "PSN link" msgid "PSN link"
msgstr "link PSN" msgstr "link PSN"
#: rcgcdw.py:187
msgid "VK link" msgid "VK link"
msgstr "link VK" msgstr "link VK"
#: rcgcdw.py:189
msgid "XVL link" msgid "XVL link"
msgstr "link XVL" msgstr "link XVL"
#: rcgcdw.py:191
msgid "Steam link" msgid "Steam link"
msgstr "link Steam" msgstr "link Steam"
#: rcgcdw.py:193
msgid "Unknown" msgid "Unknown"
msgstr "Nieznana" msgstr "Nieznana"
#: rcgcdw.py:194
msgid "Edited {target}'s profile" msgid "Edited {target}'s profile"
msgstr "Edytowano profil użytkownika {target}" msgstr "Edytowano profil użytkownika {target}"
#: rcgcdw.py:195
msgid "{field} field changed to: {desc}" msgid "{field} field changed to: {desc}"
msgstr "pole {field} zostało zmienione na: {desc}" msgstr "pole {field} zostało zmienione na: {desc}"
#: rcgcdw.py:198
msgid "Deleted a comment on {target}'s profile" msgid "Deleted a comment on {target}'s profile"
msgstr "Usunął komentarz na profilu użytkownika {target}" msgstr "Usunął komentarz na profilu użytkownika {target}"
#: rcgcdw.py:201
msgid "Changed group membership for {target}" msgid "Changed group membership for {target}"
msgstr "Zmieniono przynależność do grup dla {target}" msgstr "Zmieniono przynależność do grup dla {target}"
#: rcgcdw.py:205 rcgcdw.py:207
msgid "none" msgid "none"
msgstr "brak" msgstr "brak"
#: rcgcdw.py:208 rcgcdw.py:302
msgid "No description provided" msgid "No description provided"
msgstr "Nie podano opisu zmian" msgstr "Nie podano opisu zmian"
#: rcgcdw.py:209
msgid "Groups changed from {old_groups} to {new_groups} {reason}" msgid "Groups changed from {old_groups} to {new_groups} {reason}"
msgstr "Grupy zmienione z {old_groups} do {new_groups} {desc}" msgstr "Grupy zmienione z {old_groups} do {new_groups} {desc}"
#: rcgcdw.py:212
msgid "Protected {target}" msgid "Protected {target}"
msgstr "Zabezpieczono {target}" msgstr "Zabezpieczono {target}"
#: rcgcdw.py:217
msgid "Changed protection level for {article}" msgid "Changed protection level for {article}"
msgstr "Zmieniono poziom zabezpieczeń {article}" msgstr "Zmieniono poziom zabezpieczeń {article}"
#: rcgcdw.py:222
msgid "Removed protection from {article}" msgid "Removed protection from {article}"
msgstr "Usunięto zabezpieczenie {article}" msgstr "Usunięto zabezpieczenie {article}"
#: rcgcdw.py:226
msgid "Changed visibility of revision(s) on page {article} " msgid "Changed visibility of revision(s) on page {article} "
msgstr "Zmieniono widoczność wersji na stroni {article}" msgstr "Zmieniono widoczność wersji na stroni {article}"
#: rcgcdw.py:229
msgid "Imported {article} with {count} revision(s)" msgid "Imported {article} with {count} revision(s)"
msgstr "Zaimportowano {article} z {count} wersjami" msgstr "Zaimportowano {article} z {count} wersjami"
#: rcgcdw.py:232
msgid "Restored {article}" msgid "Restored {article}"
msgstr "Przywrócono {article)" msgstr "Przywrócono {article)"
#: rcgcdw.py:235
msgid "Changed visibility of log events" msgid "Changed visibility of log events"
msgstr "Zmieniono widoczność logów" msgstr "Zmieniono widoczność logów"
#: rcgcdw.py:238
msgid "Imported interwiki" msgid "Imported interwiki"
msgstr "Zaimportowano interwiki" msgstr "Zaimportowano interwiki"
#: rcgcdw.py:241
msgid "Edited abuse filter number {number}" msgid "Edited abuse filter number {number}"
msgstr "Edytowano filtr nadużyć numer (number)" msgstr "Edytowano filtr nadużyć numer (number)"
#: rcgcdw.py:244
msgid "Merged revision histories of {article} into {dest}" msgid "Merged revision histories of {article} into {dest}"
msgstr "Połączono historie {article} z {dest}" msgstr "Połączono historie {article} z {dest}"
#: rcgcdw.py:247
msgid "Added an entry to the interwiki table" msgid "Added an entry to the interwiki table"
msgstr "Dodano wpis do tabeli interwiki" msgstr "Dodano wpis do tabeli interwiki"
#: rcgcdw.py:248 rcgcdw.py:252
msgid "Prefix: {prefix}, website: {website} | {desc}" msgid "Prefix: {prefix}, website: {website} | {desc}"
msgstr "Prefix: {prefix}, strona: {website} | desc" msgstr "Prefix: {prefix}, strona: {website} | desc"
#: rcgcdw.py:251
msgid "Edited an entry in interwiki table" msgid "Edited an entry in interwiki table"
msgstr "Edytowano wpis interwiki" msgstr "Edytowano wpis interwiki"
#: rcgcdw.py:255
msgid "Deleted an entry in interwiki table" msgid "Deleted an entry in interwiki table"
msgstr "Usunięto wpis interwiki" msgstr "Usunięto wpis interwiki"
#: rcgcdw.py:256
msgid "Prefix: {prefix} | {desc}" msgid "Prefix: {prefix} | {desc}"
msgstr "Prefix: {prefix} | {desc}" msgstr "Prefix: {prefix} | {desc}"
#: rcgcdw.py:259
msgid "Changed the content model of the page {article}" msgid "Changed the content model of the page {article}"
msgstr "Zmieniono model zawartości {article}" msgstr "Zmieniono model zawartości {article}"
#: rcgcdw.py:260
msgid "Model changed from {old} to {new}: {reason}" msgid "Model changed from {old} to {new}: {reason}"
msgstr "Model został zmieniony z {old} na {new}: reason" msgstr "Model został zmieniony z {old} na {new}: {reason}"
#: rcgcdw.py:263
msgid "Edited the sprite for {article}" msgid "Edited the sprite for {article}"
msgstr "Edytowano sprite dla {article}" msgstr "Edytowano sprite dla {article}"
#: rcgcdw.py:266
msgid "Created the sprite sheet for {article}" msgid "Created the sprite sheet for {article}"
msgstr "Utworzono sprite sheet dla {article}" msgstr "Utworzono sprite sheet dla {article}"
#: rcgcdw.py:269
msgid "Edited the slice for {article}" msgid "Edited the slice for {article}"
msgstr "Edytowano część sprite dla {article}" msgstr "Edytowano część sprite dla {article}"
#: rcgcdw.py:272
msgid "Created a tag \"{tag}\"" msgid "Created a tag \"{tag}\""
msgstr "Utworzono tag \"{tag}\"" msgstr "Utworzono tag \"{tag}\""
#: rcgcdw.py:275
msgid "Deleted a tag \"{tag}\"" msgid "Deleted a tag \"{tag}\""
msgstr "Usunięto tag \"{tag}\"" msgstr "Usunięto tag \"{tag}\""
#: rcgcdw.py:278
msgid "Activated a tag \"{tag}\"" msgid "Activated a tag \"{tag}\""
msgstr "Aktywowano tag \"{tag}\"" msgstr "Aktywowano tag \"{tag}\""
#: rcgcdw.py:281
msgid "Deactivated a tag \"{tag}\"" msgid "Deactivated a tag \"{tag}\""
msgstr "Dezaktywowano tag \"{tag}\"" msgstr "Dezaktywowano tag \"{tag}\""
#: rcgcdw.py:387
msgid "Unable to process the event" msgid "Unable to process the event"
msgstr "Nie udało się odczytać wydarzenia" msgstr "Nie udało się odczytać wydarzenia"
#: rcgcdw.py:387
msgid "error" msgid "error"
msgstr "błąd" msgstr "błąd"
#: rcgcdw.py:485
msgid "Connection status" msgid "Connection status"
msgstr "Problem z połączeniem" msgstr "Problem z połączeniem"
#: rcgcdw.py:485
msgid "{wiki} seems to be down or unreachable." msgid "{wiki} seems to be down or unreachable."
msgstr "{wiki} nie działa lub jest nieosiągalna." msgstr "{wiki} nie działa lub jest nieosiągalna."
msgid "Admin actions"
msgstr "Akcji administratorskich"
msgid "Bytes changed"
msgstr "Zmienionych bajtów"
msgid "Day score"
msgstr "Wynik dnia"
msgid "Edits made"
msgstr "Zrobionych edycji"
msgid "Most active user"
msgstr "Najbardziej aktywny użytkownik"
msgid "New articles"
msgstr "Nowych artykułów"
msgid "New files"
msgstr "Nowych plików"
msgid "Unique contributors"
msgstr "Unikalnych edytujących"
msgid "{wiki} is back up!"
msgstr "{wiki} jest ponownie osiągalna!"
#~ msgid "Moved {article} to redirect page ({title})" #~ msgid "Moved {article} to redirect page ({title})"
#~ msgstr "Przeniesiono {article} do przekierowania ({title})" #~ msgstr "Przeniesiono {article} do przekierowania ({title})"

View file

@ -5,7 +5,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2018-06-18 11:12+0200\n" "POT-Creation-Date: 2018-06-18 16:13+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -15,285 +15,242 @@ msgstr ""
"Generated-By: pygettext.py 1.5\n" "Generated-By: pygettext.py 1.5\n"
#: rcgcdw.py:84
msgid "(N!) " msgid "(N!) "
msgstr "" msgstr ""
#: rcgcdw.py:84
msgid "m " msgid "m "
msgstr "" msgstr ""
#: rcgcdw.py:98
msgid "Uploaded a new version of {name}" msgid "Uploaded a new version of {name}"
msgstr "" msgstr ""
#: rcgcdw.py:99
msgid "([preview]({link}) | [undo]({undolink}))" msgid "([preview]({link}) | [undo]({undolink}))"
msgstr "" msgstr ""
#: rcgcdw.py:99 rcgcdw.py:115
msgid "Options" msgid "Options"
msgstr "" msgstr ""
#: rcgcdw.py:101
msgid "Uploaded {name}" msgid "Uploaded {name}"
msgstr "" msgstr ""
#: rcgcdw.py:108
msgid "**No license!**" msgid "**No license!**"
msgstr "" msgstr ""
#: rcgcdw.py:115
msgid "([preview]({link}))" msgid "([preview]({link}))"
msgstr "" msgstr ""
#: rcgcdw.py:116
msgid "" msgid ""
"{desc}\n" "{desc}\n"
"License: {license}" "License: {license}"
msgstr "" msgstr ""
#: rcgcdw.py:121
msgid "Deleted page {article}" msgid "Deleted page {article}"
msgstr "" msgstr ""
#: rcgcdw.py:126
msgid "Deleted redirect {article} by overwriting" msgid "Deleted redirect {article} by overwriting"
msgstr "" msgstr ""
#: rcgcdw.py:130
msgid "A redirect has been made" msgid "A redirect has been made"
msgstr "" msgstr ""
#: rcgcdw.py:130
msgid "No redirect has been made" msgid "No redirect has been made"
msgstr "" msgstr ""
#: rcgcdw.py:131
msgid "Moved {article} to {target}" msgid "Moved {article} to {target}"
msgstr "" msgstr ""
#: rcgcdw.py:134
msgid "Moved {article} to {title} over redirect" msgid "Moved {article} to {title} over redirect"
msgstr "" msgstr ""
#: rcgcdw.py:138
msgid "Moved protection settings from {article} to {title}" msgid "Moved protection settings from {article} to {title}"
msgstr "" msgstr ""
#: rcgcdw.py:143
msgid "infinity and beyond" msgid "infinity and beyond"
msgstr "" msgstr ""
#: rcgcdw.py:144
msgid "Blocked {blocked_user} for {time}" msgid "Blocked {blocked_user} for {time}"
msgstr "" msgstr ""
#: rcgcdw.py:150
msgid "Changed block settings for {blocked_user}" msgid "Changed block settings for {blocked_user}"
msgstr "" msgstr ""
#: rcgcdw.py:156
msgid "Unblocked {blocked_user}" msgid "Unblocked {blocked_user}"
msgstr "" msgstr ""
#: rcgcdw.py:161
msgid "Left a comment on {target}'s profile" msgid "Left a comment on {target}'s profile"
msgstr "" msgstr ""
#: rcgcdw.py:164
msgid "Replied to a comment on {target}'s profile" msgid "Replied to a comment on {target}'s profile"
msgstr "" msgstr ""
#: rcgcdw.py:167
msgid "Edited a comment on {target}'s profile" msgid "Edited a comment on {target}'s profile"
msgstr "" msgstr ""
#: rcgcdw.py:171
msgid "Location" msgid "Location"
msgstr "" msgstr ""
#: rcgcdw.py:173
msgid "About me" msgid "About me"
msgstr "" msgstr ""
#: rcgcdw.py:175
msgid "Google link" msgid "Google link"
msgstr "" msgstr ""
#: rcgcdw.py:177
msgid "Facebook link" msgid "Facebook link"
msgstr "" msgstr ""
#: rcgcdw.py:179
msgid "Twitter link" msgid "Twitter link"
msgstr "" msgstr ""
#: rcgcdw.py:181
msgid "Reddit link" msgid "Reddit link"
msgstr "" msgstr ""
#: rcgcdw.py:183
msgid "Twitch link" msgid "Twitch link"
msgstr "" msgstr ""
#: rcgcdw.py:185
msgid "PSN link" msgid "PSN link"
msgstr "" msgstr ""
#: rcgcdw.py:187
msgid "VK link" msgid "VK link"
msgstr "" msgstr ""
#: rcgcdw.py:189
msgid "XVL link" msgid "XVL link"
msgstr "" msgstr ""
#: rcgcdw.py:191
msgid "Steam link" msgid "Steam link"
msgstr "" msgstr ""
#: rcgcdw.py:193
msgid "Unknown" msgid "Unknown"
msgstr "" msgstr ""
#: rcgcdw.py:194
msgid "Edited {target}'s profile" msgid "Edited {target}'s profile"
msgstr "" msgstr ""
#: rcgcdw.py:195
msgid "{field} field changed to: {desc}" msgid "{field} field changed to: {desc}"
msgstr "" msgstr ""
#: rcgcdw.py:198
msgid "Deleted a comment on {target}'s profile" msgid "Deleted a comment on {target}'s profile"
msgstr "" msgstr ""
#: rcgcdw.py:201
msgid "Changed group membership for {target}" msgid "Changed group membership for {target}"
msgstr "" msgstr ""
#: rcgcdw.py:205 rcgcdw.py:207
msgid "none" msgid "none"
msgstr "" msgstr ""
#: rcgcdw.py:208 rcgcdw.py:302
msgid "No description provided" msgid "No description provided"
msgstr "" msgstr ""
#: rcgcdw.py:209
msgid "Groups changed from {old_groups} to {new_groups} {reason}" msgid "Groups changed from {old_groups} to {new_groups} {reason}"
msgstr "" msgstr ""
#: rcgcdw.py:212
msgid "Protected {target}" msgid "Protected {target}"
msgstr "" msgstr ""
#: rcgcdw.py:217
msgid "Changed protection level for {article}" msgid "Changed protection level for {article}"
msgstr "" msgstr ""
#: rcgcdw.py:222
msgid "Removed protection from {article}" msgid "Removed protection from {article}"
msgstr "" msgstr ""
#: rcgcdw.py:226
msgid "Changed visibility of revision(s) on page {article} " msgid "Changed visibility of revision(s) on page {article} "
msgstr "" msgstr ""
#: rcgcdw.py:229
msgid "Imported {article} with {count} revision(s)" msgid "Imported {article} with {count} revision(s)"
msgstr "" msgstr ""
#: rcgcdw.py:232
msgid "Restored {article}" msgid "Restored {article}"
msgstr "" msgstr ""
#: rcgcdw.py:235
msgid "Changed visibility of log events" msgid "Changed visibility of log events"
msgstr "" msgstr ""
#: rcgcdw.py:238
msgid "Imported interwiki" msgid "Imported interwiki"
msgstr "" msgstr ""
#: rcgcdw.py:241
msgid "Edited abuse filter number {number}" msgid "Edited abuse filter number {number}"
msgstr "" msgstr ""
#: rcgcdw.py:244
msgid "Merged revision histories of {article} into {dest}" msgid "Merged revision histories of {article} into {dest}"
msgstr "" msgstr ""
#: rcgcdw.py:247
msgid "Added an entry to the interwiki table" msgid "Added an entry to the interwiki table"
msgstr "" msgstr ""
#: rcgcdw.py:248 rcgcdw.py:252
msgid "Prefix: {prefix}, website: {website} | {desc}" msgid "Prefix: {prefix}, website: {website} | {desc}"
msgstr "" msgstr ""
#: rcgcdw.py:251
msgid "Edited an entry in interwiki table" msgid "Edited an entry in interwiki table"
msgstr "" msgstr ""
#: rcgcdw.py:255
msgid "Deleted an entry in interwiki table" msgid "Deleted an entry in interwiki table"
msgstr "" msgstr ""
#: rcgcdw.py:256
msgid "Prefix: {prefix} | {desc}" msgid "Prefix: {prefix} | {desc}"
msgstr "" msgstr ""
#: rcgcdw.py:259
msgid "Changed the content model of the page {article}" msgid "Changed the content model of the page {article}"
msgstr "" msgstr ""
#: rcgcdw.py:260
msgid "Model changed from {old} to {new}: {reason}" msgid "Model changed from {old} to {new}: {reason}"
msgstr "" msgstr ""
#: rcgcdw.py:263
msgid "Edited the sprite for {article}" msgid "Edited the sprite for {article}"
msgstr "" msgstr ""
#: rcgcdw.py:266
msgid "Created the sprite sheet for {article}" msgid "Created the sprite sheet for {article}"
msgstr "" msgstr ""
#: rcgcdw.py:269
msgid "Edited the slice for {article}" msgid "Edited the slice for {article}"
msgstr "" msgstr ""
#: rcgcdw.py:272
msgid "Created a tag \"{tag}\"" msgid "Created a tag \"{tag}\""
msgstr "" msgstr ""
#: rcgcdw.py:275
msgid "Deleted a tag \"{tag}\"" msgid "Deleted a tag \"{tag}\""
msgstr "" msgstr ""
#: rcgcdw.py:278
msgid "Activated a tag \"{tag}\"" msgid "Activated a tag \"{tag}\""
msgstr "" msgstr ""
#: rcgcdw.py:281
msgid "Deactivated a tag \"{tag}\"" msgid "Deactivated a tag \"{tag}\""
msgstr "" msgstr ""
#: rcgcdw.py:387
msgid "Unable to process the event" msgid "Unable to process the event"
msgstr "" msgstr ""
#: rcgcdw.py:387
msgid "error" msgid "error"
msgstr "" msgstr ""
#: rcgcdw.py:485
msgid "Connection status" msgid "Connection status"
msgstr "" msgstr ""
#: rcgcdw.py:485
msgid "{wiki} seems to be down or unreachable." msgid "{wiki} seems to be down or unreachable."
msgstr "" msgstr ""
msgid "Admin actions"
msgstr ""
msgid "Bytes changed"
msgstr ""
msgid "Day score"
msgstr ""
msgid "Edits made"
msgstr ""
msgid "Most active user"
msgstr ""
msgid "New articles"
msgstr ""
msgid "New files"
msgstr ""
msgid "Unique contributors"
msgstr ""
msgid "{wiki} is back up!"
msgstr ""

View file

@ -274,16 +274,16 @@ def webhook_formatter(action, timestamp, **params):
embed["title"] = _("Edited the slice for {article}").format(article=params["title"]) embed["title"] = _("Edited the slice for {article}").format(article=params["title"])
elif action == 34: elif action == 34:
link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded)
embed["title"] = _("Created a tag \"{tag}\"").format(article=params["additional"]["tag"]) embed["title"] = _("Created a tag \"{tag}\"").format(tag=params["additional"]["tag"])
elif action == 35: elif action == 35:
link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded)
embed["title"] = _("Deleted a tag \"{tag}\"").format(article=params["additional"]["tag"]) embed["title"] = _("Deleted a tag \"{tag}\"").format(tag=params["additional"]["tag"])
elif action == 36: elif action == 36:
link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded)
embed["title"] = _("Activated a tag \"{tag}\"").format(article=params["additional"]["tag"]) embed["title"] = _("Activated a tag \"{tag}\"").format(tag=params["additional"]["tag"])
elif action == 38: elif action == 38:
link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded) link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=article_encoded)
embed["title"] = _("Deactivated a tag \"{tag}\"").format(article=params["additional"]["tag"]) embed["title"] = _("Deactivated a tag \"{tag}\"").format(tag=params["additional"]["tag"])
else: else:
logging.warning("No entry for {event} with params: {params}".format(event=action, params=params)) logging.warning("No entry for {event} with params: {params}".format(event=action, params=params))
embed["author"]["name"] = params["user"] embed["author"]["name"] = params["user"]
@ -303,6 +303,7 @@ def webhook_formatter(action, timestamp, **params):
def first_pass(change): def first_pass(change):
parsedcomment = (BeautifulSoup(change["parsedcomment"], "lxml")).get_text() parsedcomment = (BeautifulSoup(change["parsedcomment"], "lxml")).get_text()
logging.debug(change)
if not parsedcomment: if not parsedcomment:
parsedcomment = _("No description provided") parsedcomment = _("No description provided")
if change["type"] == "edit": if change["type"] == "edit":
@ -370,20 +371,20 @@ def first_pass(change):
webhook_formatter(29, change["timestamp"], user=change["user"], target=change["title"].split(':')[1]) webhook_formatter(29, change["timestamp"], user=change["user"], target=change["title"].split(':')[1])
elif logtype=="contentmodel" and logaction=="change": elif logtype=="contentmodel" and logaction=="change":
webhook_formatter(30, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment, oldmodel=change["logparams" ]["oldmodel"], newmodel=change["logparams" ]["newmodel"]) webhook_formatter(30, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment, oldmodel=change["logparams" ]["oldmodel"], newmodel=change["logparams" ]["newmodel"])
elif logtype=="sprite" and logaction=="sprite": elif logtype=="sprite" and logaction=="sprite": #spritesheet extension present on English Minecraft Wiki
webhook_formatter(31, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment) webhook_formatter(31, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment)
elif logtype=="sprite" and logaction=="sheet": elif logtype=="sprite" and logaction=="sheet":
webhook_formatter(32, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment) webhook_formatter(32, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment)
elif logtype=="sprite" and logaction=="slice": elif logtype=="sprite" and logaction=="slice":
webhook_formatter(33, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment) webhook_formatter(33, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment)
elif logtype=="managetags" and logaction=="create": elif logtype=="managetags" and logaction=="create":
webhook_formatter(34, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment, additional=change["params"]) webhook_formatter(34, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment, additional=change["logparams"])
elif logtype=="managetags" and logaction=="delete": elif logtype=="managetags" and logaction=="delete":
webhook_formatter(35, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment, additional=change["params"]) webhook_formatter(35, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment, additional=change["logparams"])
elif logtype=="managetags" and logaction=="activate": elif logtype=="managetags" and logaction=="activate":
webhook_formatter(36, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment, additional=change["params"]) webhook_formatter(36, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment, additional=change["logparams"])
elif logtype=="managetags" and logaction=="deactivate": elif logtype=="managetags" and logaction=="deactivate":
webhook_formatter(38, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment, additional=change["params"]) webhook_formatter(38, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment, additional=change["logparams"])
elif logtype=="tag" and logaction=="update": elif logtype=="tag" and logaction=="update":
webhook_formatter(39, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment) webhook_formatter(39, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment)
else: else:
@ -401,7 +402,6 @@ def first_pass(change):
class recent_changes(object): class recent_changes(object):
starttime = time.time() starttime = time.time()
day = datetime.date.fromtimestamp(time.time()).day day = datetime.date.fromtimestamp(time.time()).day
cache = []
ids = [] ids = []
map_ips = {} map_ips = {}
recent_id = 0 recent_id = 0
@ -414,7 +414,6 @@ class recent_changes(object):
else: else:
file_id = 999999999 file_id = 999999999
def add_cache(self, change): def add_cache(self, change):
self.cache.append(change)
self.ids.append(change["rcid"]) self.ids.append(change["rcid"])
#self.recent_id = change["rcid"] #self.recent_id = change["rcid"]
if len(self.ids) > settings["limit"]+5: if len(self.ids) > settings["limit"]+5:
@ -428,8 +427,8 @@ class recent_changes(object):
record.write(str(self.file_id)) record.write(str(self.file_id))
logging.debug("Most recent rcid is: {}".format(self.recent_id)) logging.debug("Most recent rcid is: {}".format(self.recent_id))
def fetch_changes(self, amount, clean=False): def fetch_changes(self, amount, clean=False):
if len(self.cache) == 0: if len(self.ids) == 0:
logging.debug("cache is empty, triggering clean fetch") logging.debug("ids is empty, triggering clean fetch")
clean = True clean = True
changes = self.safe_request("https://{wiki}.gamepedia.com/api.php?action=query&format=json&list=recentchanges&rcshow=!bot&rcprop=title%7Ctimestamp%7Cids%7Cloginfo%7Cparsedcomment%7Csizes%7Cflags%7Ctags%7Cuser&rclimit={amount}&rctype=edit%7Cnew%7Clog%7Cexternal".format(wiki=settings["wiki"], amount=amount)) changes = self.safe_request("https://{wiki}.gamepedia.com/api.php?action=query&format=json&list=recentchanges&rcshow=!bot&rcprop=title%7Ctimestamp%7Cids%7Cloginfo%7Cparsedcomment%7Csizes%7Cflags%7Ctags%7Cuser&rclimit={amount}&rctype=edit%7Cnew%7Clog%7Cexternal".format(wiki=settings["wiki"], amount=amount))
if changes: if changes:
@ -502,6 +501,10 @@ class recent_changes(object):
recent_changes = recent_changes() recent_changes = recent_changes()
recent_changes.fetch(amount=settings["limitrefetch" ] if settings["limitrefetch"] != -1 else settings["limit"]) recent_changes.fetch(amount=settings["limitrefetch" ] if settings["limitrefetch"] != -1 else settings["limit"])
if 1 == 2:
#some translations for later use in different places
print ([_("{wiki} is back up!"), _("Most active user"), _("Edits made"), _("New files"), _("Admin actions"), _("Unique contributors"), _("Bytes changed"), _("Day score"), _("New articles")])
while 1: while 1:
time.sleep(float(settings["cooldown"])) time.sleep(float(settings["cooldown"]))
recent_changes.fetch() recent_changes.fetch()

View file

@ -1,10 +1,19 @@
{ {
"cooldown": 30, "cooldown": 30,
"wiki": "minecraft", "wiki": "minecraft",
"lang": "en",
"header": { "header": {
"user-agent": "FrisksRcGcDw/0.1" "user-agent": "FrisksRcGcDw/0.5"
}, },
"limit": 11, "limit": 11,
"webhookURL": "https://discordapp.com/api/webhooks/111111111111111111/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "webhookURL": "https://discordapp.com/api/webhooks/111111111111111111/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"limitrefetch": 28,
"wikiname": "Minecraft Wiki",
"avatars": {
"connection_failed": "https://i.imgur.com/2jWQEt1.png",
"no_event": "",
"embed": ""
},
"verbose_level": 0,
"show_updown_messages": true
} }