diff --git a/README.md b/README.md index 6b15b17..f041e2d 100644 --- a/README.md +++ b/README.md @@ -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 `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 -`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 -`embed` – every embed message showing changes +* `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 +* `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 ### 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. +### Credits ### +Translators: +* MarkusRost for German translation + ### Other ### Script seem to use about 17MB of RAM and negligible amount of CPU when fetching changes. diff --git a/locale/de/LC_MESSAGES/rcgcdw.mo b/locale/de/LC_MESSAGES/rcgcdw.mo index 40e44d2..87d7551 100644 Binary files a/locale/de/LC_MESSAGES/rcgcdw.mo and b/locale/de/LC_MESSAGES/rcgcdw.mo differ diff --git a/locale/de/LC_MESSAGES/rcgcdw.po b/locale/de/LC_MESSAGES/rcgcdw.po index 4a90ab8..b665782 100644 --- a/locale/de/LC_MESSAGES/rcgcdw.po +++ b/locale/de/LC_MESSAGES/rcgcdw.po @@ -5,9 +5,9 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2018-06-18 11:12+0200\n" -"PO-Revision-Date: 2018-06-18 13:49+0200\n" -"Last-Translator: \n" +"POT-Creation-Date: 2018-06-18 16:13+0200\n" +"PO-Revision-Date: 2018-06-18 16:27+0200\n" +"Last-Translator: MarkusRost\n" "Language-Team: \n" "Language: de\n" "MIME-Version: 1.0\n" @@ -16,39 +16,30 @@ msgstr "" "Generated-By: pygettext.py 1.5\n" "X-Generator: Poedit 2.0.8\n" -#: rcgcdw.py:84 msgid "(N!) " msgstr "(N!) " -#: rcgcdw.py:84 msgid "m " msgstr "K " -#: rcgcdw.py:98 msgid "Uploaded a new version of {name}" msgstr "Neue Dateiversion {name}" -#: rcgcdw.py:99 msgid "([preview]({link}) | [undo]({undolink}))" msgstr "([Vorschau]({link}) | [zurücksetzen]({undolink}))" -#: rcgcdw.py:99 rcgcdw.py:115 msgid "Options" msgstr "Optionen" -#: rcgcdw.py:101 msgid "Uploaded {name}" msgstr "Neue Datei {name}" -#: rcgcdw.py:108 msgid "**No license!**" msgstr "**Keine Lizenz!**" -#: rcgcdw.py:115 msgid "([preview]({link}))" msgstr "([Vorschau]({link}))" -#: rcgcdw.py:116 msgid "" "{desc}\n" "License: {license}" @@ -56,246 +47,214 @@ msgstr "" "{desc}\n" "Lizenz: {license}" -#: rcgcdw.py:121 msgid "Deleted page {article}" msgstr "Löschte {article}" -#: rcgcdw.py:126 msgid "Deleted redirect {article} by overwriting" msgstr "Löschte die Weiterleitung {article} um Platz zu machen" -#: rcgcdw.py:130 msgid "A redirect has been made" msgstr "Eine Weiterleitung wurde erstellt" -#: rcgcdw.py:130 msgid "No redirect has been made" msgstr "Die Erstellung einer Weiterleitung wurde unterdrückt" -#: rcgcdw.py:131 msgid "Moved {article} to {target}" msgstr "Verschob {article} nach {target}" -#: rcgcdw.py:134 msgid "Moved {article} to {title} over redirect" msgstr "Verschob {article} nach {target} und überschrieb eine Weiterleitung\"" -#: rcgcdw.py:138 msgid "Moved protection settings from {article} to {title}" msgstr "Verschob die Schutzeinstellungen von {article} nach {title}" -#: rcgcdw.py:143 msgid "infinity and beyond" msgstr "alle Ewigkeit" -#: rcgcdw.py:144 msgid "Blocked {blocked_user} for {time}" msgstr "Sperrte {blocked_user} für {time}" -#: rcgcdw.py:150 msgid "Changed block settings for {blocked_user}" msgstr "Änderte die Sperreinstellungen für {blocked_user}" -#: rcgcdw.py:156 msgid "Unblocked {blocked_user}" msgstr "Hob die Sperre von {blocked_user} auf" -#: rcgcdw.py:161 msgid "Left a comment on {target}'s profile" msgstr "Hinterließ ein Kommentar auf dem Profil von {target}" -#: rcgcdw.py:164 msgid "Replied to a comment on {target}'s profile" msgstr "Antwortete auf ein Kommentar auf dem Profil von {target}" -#: rcgcdw.py:167 msgid "Edited a comment on {target}'s profile" msgstr "Bearbeitete ein Kommentar auf dem Profil von {target}" -#: rcgcdw.py:171 msgid "Location" msgstr "Wohnort" -#: rcgcdw.py:173 msgid "About me" msgstr "\"Über mich\"-Abschnitt" -#: rcgcdw.py:175 msgid "Google link" msgstr "Google-Konto" -#: rcgcdw.py:177 msgid "Facebook link" msgstr "Facebook-Seite" -#: rcgcdw.py:179 msgid "Twitter link" msgstr "Twitter-Benutzernamen" -#: rcgcdw.py:181 msgid "Reddit link" msgstr "Reddit-Benutzernamen" -#: rcgcdw.py:183 msgid "Twitch link" msgstr "Twitch-Account" -#: rcgcdw.py:185 msgid "PSN link" msgstr "PSN-Account" -#: rcgcdw.py:187 msgid "VK link" msgstr "VK-Account" -#: rcgcdw.py:189 msgid "XVL link" msgstr "Xbox-Live-Tag" -#: rcgcdw.py:191 msgid "Steam link" msgstr "Steam-Account" -#: rcgcdw.py:193 msgid "Unknown" msgstr "Unbekannt" -#: rcgcdw.py:194 msgid "Edited {target}'s profile" msgstr "Bearbeitete das Profil von {target}" -#: rcgcdw.py:195 msgid "{field} field changed to: {desc}" msgstr "{field} geändert zu: {desc}" -#: rcgcdw.py:198 msgid "Deleted a comment on {target}'s profile" msgstr "Löschte ein Kommentar auf dem Profil von {target}" -#: rcgcdw.py:201 msgid "Changed group membership for {target}" msgstr "Änderte die Gruppenzugehörigkeit von {target}" -#: rcgcdw.py:205 rcgcdw.py:207 msgid "none" msgstr "keine" -#: rcgcdw.py:208 rcgcdw.py:302 msgid "No description provided" msgstr "Keine Zusammenfassung angegeben" -#: rcgcdw.py:209 msgid "Groups changed from {old_groups} to {new_groups} {reason}" msgstr "Änderte die Gruppenzugehörigkeit von {old_groups} auf {new_groups}: {reason}" -#: rcgcdw.py:212 msgid "Protected {target}" msgstr "Schützte {target}" -#: rcgcdw.py:217 msgid "Changed protection level for {article}" msgstr "Änderte den Schutzstatus von {article}" -#: rcgcdw.py:222 msgid "Removed protection from {article}" msgstr "Entfernte den Schutz von {article}" -#: rcgcdw.py:226 msgid "Changed visibility of revision(s) on page {article} " msgstr "Änderte die Sichtbarkeit einiger Versionen von {article}" -#: rcgcdw.py:229 msgid "Imported {article} with {count} revision(s)" msgstr "Importierte {article} mit {count} Versionen" -#: rcgcdw.py:232 msgid "Restored {article}" msgstr "Stellte {article} wieder her" -#: rcgcdw.py:235 msgid "Changed visibility of log events" msgstr "Änderte die Sichtbarkeit eines Logbucheintrags" -#: rcgcdw.py:238 msgid "Imported interwiki" msgstr "Importierte Interwiki" -#: rcgcdw.py:241 msgid "Edited abuse filter number {number}" msgstr "Änderte Missbrauchsfilter {number}" -#: rcgcdw.py:244 msgid "Merged revision histories of {article} into {dest}" msgstr "Vereinigte Versionsgeschichten von {article} in {dest}" -#: rcgcdw.py:247 msgid "Added an entry to the interwiki table" msgstr "Fügte ein Interwiki-Präfix hinzu" -#: rcgcdw.py:248 rcgcdw.py:252 msgid "Prefix: {prefix}, website: {website} | {desc}" msgstr "Präfix: {prefix}, URL: {website} | {desc}" -#: rcgcdw.py:251 msgid "Edited an entry in interwiki table" msgstr "Änderte ein Interwiki-Präfix" -#: rcgcdw.py:255 msgid "Deleted an entry in interwiki table" msgstr "Entfernte ein Interwiki-Präfix" -#: rcgcdw.py:256 msgid "Prefix: {prefix} | {desc}" msgstr "Präfix: {prefix} | {desc}" -#: rcgcdw.py:259 msgid "Changed the content model of the page {article}" msgstr "Änderte das Inhaltsmodell von {article}" -#: rcgcdw.py:260 msgid "Model changed from {old} to {new}: {reason}" msgstr "Modell geändert von {old} zu {new}: {reason}" -#: rcgcdw.py:263 msgid "Edited the sprite for {article}" msgstr "Edited the sprite for {article}" -#: rcgcdw.py:266 msgid "Created the sprite sheet for {article}" msgstr "Created the sprite sheet for {article}" -#: rcgcdw.py:269 msgid "Edited the slice for {article}" msgstr "Edited the slice for {article}" -#: rcgcdw.py:272 msgid "Created a tag \"{tag}\"" msgstr "Erstellte die Markierung \"{tag}\"" -#: rcgcdw.py:275 msgid "Deleted a tag \"{tag}\"" msgstr "Löschte die Markierung \"{tag}\"" -#: rcgcdw.py:278 msgid "Activated a tag \"{tag}\"" msgstr "Aktivierte die Markierung \"{tag}\"" -#: rcgcdw.py:281 msgid "Deactivated a tag \"{tag}\"" msgstr "Deaktivierte die Markierung \"{tag}\"" -#: rcgcdw.py:387 msgid "Unable to process the event" msgstr "Ereignis kann nicht verabreitet werden" -#: rcgcdw.py:387 msgid "error" msgstr "Fehler" -#: rcgcdw.py:485 msgid "Connection status" msgstr "Verbindungsstatus" -#: rcgcdw.py:485 msgid "{wiki} seems to be down or unreachable." 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." diff --git a/locale/pl/LC_MESSAGES/rcgcdw.mo b/locale/pl/LC_MESSAGES/rcgcdw.mo index fb2db58..544c8fe 100644 Binary files a/locale/pl/LC_MESSAGES/rcgcdw.mo and b/locale/pl/LC_MESSAGES/rcgcdw.mo differ diff --git a/locale/pl/LC_MESSAGES/rcgcdw.po b/locale/pl/LC_MESSAGES/rcgcdw.po index eee1b08..3747913 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-18 11:12+0200\n" -"PO-Revision-Date: 2018-06-18 11:15+0200\n" +"POT-Creation-Date: 2018-06-18 16:13+0200\n" +"PO-Revision-Date: 2018-06-18 17:24+0200\n" "Last-Translator: Frisk \n" "Language-Team: \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 " "|| n%100>=20) ? 1 : 2);\n" -#: rcgcdw.py:84 msgid "(N!) " msgstr "(N!) " -#: rcgcdw.py:84 msgid "m " msgstr "d " -#: rcgcdw.py:98 msgid "Uploaded a new version of {name}" msgstr "Przesłał(a) nową wersję {name}" -#: rcgcdw.py:99 msgid "([preview]({link}) | [undo]({undolink}))" msgstr "([podgląd]({link}) | [wycofaj]({undolink}))" -#: rcgcdw.py:99 rcgcdw.py:115 msgid "Options" msgstr "Opcje" -#: rcgcdw.py:101 msgid "Uploaded {name}" msgstr "Przesłał(a) {name}" -#: rcgcdw.py:108 msgid "**No license!**" msgstr "**Brak licencji!**" -#: rcgcdw.py:115 msgid "([preview]({link}))" msgstr "([podgląd]({link})" -#: rcgcdw.py:116 msgid "" "{desc}\n" "License: {license}" @@ -58,252 +49,218 @@ msgstr "" "{desc}\n" "Licencja: {license}" -#: rcgcdw.py:121 msgid "Deleted page {article}" msgstr "Usunął/usunęła {article}" -#: rcgcdw.py:126 msgid "Deleted redirect {article} by overwriting" msgstr "" "Usunął/usunęła przekierowanie ({article}) aby utworzyć miejsce dla " "przenoszonej strony" -#: rcgcdw.py:130 msgid "A redirect has been made" msgstr "Zostało utworzone przekierowanie" -#: rcgcdw.py:130 msgid "No redirect has been made" msgstr "Nie utworzono przekierowania" -#: rcgcdw.py:131 msgid "Moved {article} to {target}" msgstr "Przeniósł/przeniosła {article} do {target}" -#: rcgcdw.py:134 msgid "Moved {article} to {title} over redirect" msgstr "Przeniósł/przeniosła {article} do strony przekierowującej {target}" -#: rcgcdw.py:138 msgid "Moved protection settings from {article} to {title}" msgstr "Przeniesiono ustawienia zabezpieczeń z {article} do {title}" -#: rcgcdw.py:143 msgid "infinity and beyond" msgstr "wieczność" -#: rcgcdw.py:144 msgid "Blocked {blocked_user} for {time}" msgstr "Zablokowano {blocked_user} na {time}" -#: rcgcdw.py:150 msgid "Changed block settings for {blocked_user}" msgstr "Zmienił ustawienia blokady {blocked_user}" -#: rcgcdw.py:156 msgid "Unblocked {blocked_user}" msgstr "Zablokował {blocked_user} na {time}" -#: rcgcdw.py:161 msgid "Left a comment on {target}'s profile" msgstr "Pozostawiono komentarz na profilu użytkownika {target}" -#: rcgcdw.py:164 msgid "Replied to a comment on {target}'s profile" msgstr "Odpowiedziano na komentarz na profilu użytkownika {target}" -#: rcgcdw.py:167 msgid "Edited a comment on {target}'s profile" msgstr "Edytowano komentarz na profilu użytkownika {target}" -#: rcgcdw.py:171 msgid "Location" msgstr "Lokacja" -#: rcgcdw.py:173 msgid "About me" msgstr "O mnie" -#: rcgcdw.py:175 msgid "Google link" msgstr "link Google" -#: rcgcdw.py:177 msgid "Facebook link" msgstr "link Facebook" -#: rcgcdw.py:179 msgid "Twitter link" msgstr "link Twitter" -#: rcgcdw.py:181 msgid "Reddit link" msgstr "link Reddit" -#: rcgcdw.py:183 msgid "Twitch link" msgstr "link Twitch" -#: rcgcdw.py:185 msgid "PSN link" msgstr "link PSN" -#: rcgcdw.py:187 msgid "VK link" msgstr "link VK" -#: rcgcdw.py:189 msgid "XVL link" msgstr "link XVL" -#: rcgcdw.py:191 msgid "Steam link" msgstr "link Steam" -#: rcgcdw.py:193 msgid "Unknown" msgstr "Nieznana" -#: rcgcdw.py:194 msgid "Edited {target}'s profile" msgstr "Edytowano profil użytkownika {target}" -#: rcgcdw.py:195 msgid "{field} field changed to: {desc}" msgstr "pole {field} zostało zmienione na: {desc}" -#: rcgcdw.py:198 msgid "Deleted a comment on {target}'s profile" msgstr "Usunął komentarz na profilu użytkownika {target}" -#: rcgcdw.py:201 msgid "Changed group membership for {target}" msgstr "Zmieniono przynależność do grup dla {target}" -#: rcgcdw.py:205 rcgcdw.py:207 msgid "none" msgstr "brak" -#: rcgcdw.py:208 rcgcdw.py:302 msgid "No description provided" msgstr "Nie podano opisu zmian" -#: rcgcdw.py:209 msgid "Groups changed from {old_groups} to {new_groups} {reason}" msgstr "Grupy zmienione z {old_groups} do {new_groups} {desc}" -#: rcgcdw.py:212 msgid "Protected {target}" msgstr "Zabezpieczono {target}" -#: rcgcdw.py:217 msgid "Changed protection level for {article}" msgstr "Zmieniono poziom zabezpieczeń {article}" -#: rcgcdw.py:222 msgid "Removed protection from {article}" msgstr "Usunięto zabezpieczenie {article}" -#: rcgcdw.py:226 msgid "Changed visibility of revision(s) on page {article} " msgstr "Zmieniono widoczność wersji na stroni {article}" -#: rcgcdw.py:229 msgid "Imported {article} with {count} revision(s)" msgstr "Zaimportowano {article} z {count} wersjami" -#: rcgcdw.py:232 msgid "Restored {article}" msgstr "Przywrócono {article)" -#: rcgcdw.py:235 msgid "Changed visibility of log events" msgstr "Zmieniono widoczność logów" -#: rcgcdw.py:238 msgid "Imported interwiki" msgstr "Zaimportowano interwiki" -#: rcgcdw.py:241 msgid "Edited abuse filter number {number}" msgstr "Edytowano filtr nadużyć numer (number)" -#: rcgcdw.py:244 msgid "Merged revision histories of {article} into {dest}" msgstr "Połączono historie {article} z {dest}" -#: rcgcdw.py:247 msgid "Added an entry to the interwiki table" msgstr "Dodano wpis do tabeli interwiki" -#: rcgcdw.py:248 rcgcdw.py:252 msgid "Prefix: {prefix}, website: {website} | {desc}" msgstr "Prefix: {prefix}, strona: {website} | desc" -#: rcgcdw.py:251 msgid "Edited an entry in interwiki table" msgstr "Edytowano wpis interwiki" -#: rcgcdw.py:255 msgid "Deleted an entry in interwiki table" msgstr "Usunięto wpis interwiki" -#: rcgcdw.py:256 msgid "Prefix: {prefix} | {desc}" msgstr "Prefix: {prefix} | {desc}" -#: rcgcdw.py:259 msgid "Changed the content model of the page {article}" msgstr "Zmieniono model zawartości {article}" -#: rcgcdw.py:260 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}" msgstr "Edytowano sprite dla {article}" -#: rcgcdw.py:266 msgid "Created the sprite sheet for {article}" msgstr "Utworzono sprite sheet dla {article}" -#: rcgcdw.py:269 msgid "Edited the slice for {article}" msgstr "Edytowano część sprite dla {article}" -#: rcgcdw.py:272 msgid "Created a tag \"{tag}\"" msgstr "Utworzono tag \"{tag}\"" -#: rcgcdw.py:275 msgid "Deleted a tag \"{tag}\"" msgstr "Usunięto tag \"{tag}\"" -#: rcgcdw.py:278 msgid "Activated a tag \"{tag}\"" msgstr "Aktywowano tag \"{tag}\"" -#: rcgcdw.py:281 msgid "Deactivated a tag \"{tag}\"" msgstr "Dezaktywowano tag \"{tag}\"" -#: rcgcdw.py:387 msgid "Unable to process the event" msgstr "Nie udało się odczytać wydarzenia" -#: rcgcdw.py:387 msgid "error" msgstr "błąd" -#: rcgcdw.py:485 msgid "Connection status" msgstr "Problem z połączeniem" -#: rcgcdw.py:485 msgid "{wiki} seems to be down or unreachable." 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})" #~ msgstr "Przeniesiono {article} do przekierowania ({title})" diff --git a/rcgcdw.pot b/rcgcdw.pot index 9620785..192b22d 100644 --- a/rcgcdw.pot +++ b/rcgcdw.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "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" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -15,285 +15,242 @@ msgstr "" "Generated-By: pygettext.py 1.5\n" -#: rcgcdw.py:84 msgid "(N!) " msgstr "" -#: rcgcdw.py:84 msgid "m " msgstr "" -#: rcgcdw.py:98 msgid "Uploaded a new version of {name}" msgstr "" -#: rcgcdw.py:99 msgid "([preview]({link}) | [undo]({undolink}))" msgstr "" -#: rcgcdw.py:99 rcgcdw.py:115 msgid "Options" msgstr "" -#: rcgcdw.py:101 msgid "Uploaded {name}" msgstr "" -#: rcgcdw.py:108 msgid "**No license!**" msgstr "" -#: rcgcdw.py:115 msgid "([preview]({link}))" msgstr "" -#: rcgcdw.py:116 msgid "" "{desc}\n" "License: {license}" msgstr "" -#: rcgcdw.py:121 msgid "Deleted page {article}" msgstr "" -#: rcgcdw.py:126 msgid "Deleted redirect {article} by overwriting" msgstr "" -#: rcgcdw.py:130 msgid "A redirect has been made" msgstr "" -#: rcgcdw.py:130 msgid "No redirect has been made" msgstr "" -#: rcgcdw.py:131 msgid "Moved {article} to {target}" msgstr "" -#: rcgcdw.py:134 msgid "Moved {article} to {title} over redirect" msgstr "" -#: rcgcdw.py:138 msgid "Moved protection settings from {article} to {title}" msgstr "" -#: rcgcdw.py:143 msgid "infinity and beyond" msgstr "" -#: rcgcdw.py:144 msgid "Blocked {blocked_user} for {time}" msgstr "" -#: rcgcdw.py:150 msgid "Changed block settings for {blocked_user}" msgstr "" -#: rcgcdw.py:156 msgid "Unblocked {blocked_user}" msgstr "" -#: rcgcdw.py:161 msgid "Left a comment on {target}'s profile" msgstr "" -#: rcgcdw.py:164 msgid "Replied to a comment on {target}'s profile" msgstr "" -#: rcgcdw.py:167 msgid "Edited a comment on {target}'s profile" msgstr "" -#: rcgcdw.py:171 msgid "Location" msgstr "" -#: rcgcdw.py:173 msgid "About me" msgstr "" -#: rcgcdw.py:175 msgid "Google link" msgstr "" -#: rcgcdw.py:177 msgid "Facebook link" msgstr "" -#: rcgcdw.py:179 msgid "Twitter link" msgstr "" -#: rcgcdw.py:181 msgid "Reddit link" msgstr "" -#: rcgcdw.py:183 msgid "Twitch link" msgstr "" -#: rcgcdw.py:185 msgid "PSN link" msgstr "" -#: rcgcdw.py:187 msgid "VK link" msgstr "" -#: rcgcdw.py:189 msgid "XVL link" msgstr "" -#: rcgcdw.py:191 msgid "Steam link" msgstr "" -#: rcgcdw.py:193 msgid "Unknown" msgstr "" -#: rcgcdw.py:194 msgid "Edited {target}'s profile" msgstr "" -#: rcgcdw.py:195 msgid "{field} field changed to: {desc}" msgstr "" -#: rcgcdw.py:198 msgid "Deleted a comment on {target}'s profile" msgstr "" -#: rcgcdw.py:201 msgid "Changed group membership for {target}" msgstr "" -#: rcgcdw.py:205 rcgcdw.py:207 msgid "none" msgstr "" -#: rcgcdw.py:208 rcgcdw.py:302 msgid "No description provided" msgstr "" -#: rcgcdw.py:209 msgid "Groups changed from {old_groups} to {new_groups} {reason}" msgstr "" -#: rcgcdw.py:212 msgid "Protected {target}" msgstr "" -#: rcgcdw.py:217 msgid "Changed protection level for {article}" msgstr "" -#: rcgcdw.py:222 msgid "Removed protection from {article}" msgstr "" -#: rcgcdw.py:226 msgid "Changed visibility of revision(s) on page {article} " msgstr "" -#: rcgcdw.py:229 msgid "Imported {article} with {count} revision(s)" msgstr "" -#: rcgcdw.py:232 msgid "Restored {article}" msgstr "" -#: rcgcdw.py:235 msgid "Changed visibility of log events" msgstr "" -#: rcgcdw.py:238 msgid "Imported interwiki" msgstr "" -#: rcgcdw.py:241 msgid "Edited abuse filter number {number}" msgstr "" -#: rcgcdw.py:244 msgid "Merged revision histories of {article} into {dest}" msgstr "" -#: rcgcdw.py:247 msgid "Added an entry to the interwiki table" msgstr "" -#: rcgcdw.py:248 rcgcdw.py:252 msgid "Prefix: {prefix}, website: {website} | {desc}" msgstr "" -#: rcgcdw.py:251 msgid "Edited an entry in interwiki table" msgstr "" -#: rcgcdw.py:255 msgid "Deleted an entry in interwiki table" msgstr "" -#: rcgcdw.py:256 msgid "Prefix: {prefix} | {desc}" msgstr "" -#: rcgcdw.py:259 msgid "Changed the content model of the page {article}" msgstr "" -#: rcgcdw.py:260 msgid "Model changed from {old} to {new}: {reason}" msgstr "" -#: rcgcdw.py:263 msgid "Edited the sprite for {article}" msgstr "" -#: rcgcdw.py:266 msgid "Created the sprite sheet for {article}" msgstr "" -#: rcgcdw.py:269 msgid "Edited the slice for {article}" msgstr "" -#: rcgcdw.py:272 msgid "Created a tag \"{tag}\"" msgstr "" -#: rcgcdw.py:275 msgid "Deleted a tag \"{tag}\"" msgstr "" -#: rcgcdw.py:278 msgid "Activated a tag \"{tag}\"" msgstr "" -#: rcgcdw.py:281 msgid "Deactivated a tag \"{tag}\"" msgstr "" -#: rcgcdw.py:387 msgid "Unable to process the event" msgstr "" -#: rcgcdw.py:387 msgid "error" msgstr "" -#: rcgcdw.py:485 msgid "Connection status" msgstr "" -#: rcgcdw.py:485 msgid "{wiki} seems to be down or unreachable." 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 "" + diff --git a/rcgcdw.py b/rcgcdw.py index d67a6d7..3cc283c 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -274,16 +274,16 @@ def webhook_formatter(action, timestamp, **params): 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) - 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: 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: 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: 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: logging.warning("No entry for {event} with params: {params}".format(event=action, params=params)) embed["author"]["name"] = params["user"] @@ -303,6 +303,7 @@ def webhook_formatter(action, timestamp, **params): def first_pass(change): parsedcomment = (BeautifulSoup(change["parsedcomment"], "lxml")).get_text() + logging.debug(change) if not parsedcomment: parsedcomment = _("No description provided") 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]) 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"]) - 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) elif logtype=="sprite" and logaction=="sheet": webhook_formatter(32, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment) elif logtype=="sprite" and logaction=="slice": webhook_formatter(33, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment) 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": - 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": - 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": - 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": webhook_formatter(39, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment) else: @@ -401,7 +402,6 @@ def first_pass(change): class recent_changes(object): starttime = time.time() day = datetime.date.fromtimestamp(time.time()).day - cache = [] ids = [] map_ips = {} recent_id = 0 @@ -414,7 +414,6 @@ class recent_changes(object): else: file_id = 999999999 def add_cache(self, change): - self.cache.append(change) self.ids.append(change["rcid"]) #self.recent_id = change["rcid"] if len(self.ids) > settings["limit"]+5: @@ -428,8 +427,8 @@ class recent_changes(object): 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.cache) == 0: - logging.debug("cache is empty, triggering clean fetch") + if len(self.ids) == 0: + logging.debug("ids is empty, triggering clean fetch") 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)) if changes: @@ -501,6 +500,10 @@ class recent_changes(object): recent_changes = recent_changes() 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: time.sleep(float(settings["cooldown"])) diff --git a/settings.json.example b/settings.json.example index c65c503..e89f163 100644 --- a/settings.json.example +++ b/settings.json.example @@ -1,10 +1,19 @@ { "cooldown": 30, "wiki": "minecraft", + "lang": "en", "header": { - "user-agent": "FrisksRcGcDw/0.1" + "user-agent": "FrisksRcGcDw/0.5" }, "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 } -