mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-23 00:24:09 +00:00
Small changes
This commit is contained in:
parent
b6f02521c2
commit
68a3f84667
Binary file not shown.
|
@ -5,39 +5,40 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: RcGcDw\n"
|
"Project-Id-Version: RcGcDw\n"
|
||||||
"POT-Creation-Date: 2018-06-16 13:32+0200\n"
|
"POT-Creation-Date: 2018-06-16 14:38+0200\n"
|
||||||
"PO-Revision-Date: 2018-06-16 13:58+0200\n"
|
"PO-Revision-Date: 2018-06-16 14:44+0200\n"
|
||||||
|
"Last-Translator: Frisk <piotrex43@protonmail.ch>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
|
"Language: pl\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"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"
|
||||||
"Last-Translator: Frisk <piotrex43@protonmail.ch>\n"
|
"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"
|
||||||
"Language: pl\n"
|
|
||||||
|
|
||||||
#: rcgcdw.py:88
|
#: rcgcdw.py:90
|
||||||
msgid "New file version {name}"
|
msgid "New file version {name}"
|
||||||
msgstr "Nowa wersja pliku (name)"
|
msgstr "Nowa wersja pliku (name)"
|
||||||
|
|
||||||
#: rcgcdw.py:89
|
#: rcgcdw.py:91
|
||||||
msgid "([preview]({link}) | [undo]({undolink}))"
|
msgid "([preview]({link}) | [undo]({undolink}))"
|
||||||
msgstr "([podgląd]({link}) | [wycofaj]({undolink}))"
|
msgstr "([podgląd]({link}) | [wycofaj]({undolink}))"
|
||||||
|
|
||||||
#: rcgcdw.py:89 rcgcdw.py:105
|
#: rcgcdw.py:91 rcgcdw.py:107
|
||||||
msgid "Options"
|
msgid "Options"
|
||||||
msgstr "Opcje"
|
msgstr "Opcje"
|
||||||
|
|
||||||
#: rcgcdw.py:91
|
#: rcgcdw.py:93
|
||||||
msgid "New file {name}"
|
msgid "New file {name}"
|
||||||
msgstr "Nowy plik {name}"
|
msgstr "Nowy plik {name}"
|
||||||
|
|
||||||
#: rcgcdw.py:105
|
#: rcgcdw.py:107
|
||||||
msgid "([preview]({link}))"
|
msgid "([preview]({link}))"
|
||||||
msgstr "([podgląd]({link})"
|
msgstr "([podgląd]({link})"
|
||||||
|
|
||||||
#: rcgcdw.py:106
|
#: rcgcdw.py:108
|
||||||
msgid ""
|
msgid ""
|
||||||
"{desc}\n"
|
"{desc}\n"
|
||||||
"License: {license}"
|
"License: {license}"
|
||||||
|
@ -45,206 +46,209 @@ msgstr ""
|
||||||
"{desc}\n"
|
"{desc}\n"
|
||||||
"Licencja: {license}"
|
"Licencja: {license}"
|
||||||
|
|
||||||
#: rcgcdw.py:111
|
#: rcgcdw.py:113
|
||||||
msgid "Deleted {article}"
|
msgid "Deleted {article}"
|
||||||
msgstr "Usunięto {article}"
|
msgstr "Usunięto {article}"
|
||||||
|
|
||||||
#: rcgcdw.py:116
|
#: rcgcdw.py:118
|
||||||
msgid "Deleted redirect ({article}) to make space for moved page"
|
msgid "Deleted redirect ({article}) to make space for moved page"
|
||||||
msgstr "Usunięto przekierowanie ({article}) aby utworzyć miejsce dla przenoszonej strony"
|
msgstr ""
|
||||||
|
"Usunięto przekierowanie ({article}) aby utworzyć miejsce dla przenoszonej "
|
||||||
|
"strony"
|
||||||
|
|
||||||
#: rcgcdw.py:120
|
#: rcgcdw.py:122
|
||||||
msgid "A redirect has been made"
|
msgid "A redirect has been made"
|
||||||
msgstr "Zostało utworzone przekierowanie"
|
msgstr "Zostało utworzone przekierowanie"
|
||||||
|
|
||||||
#: rcgcdw.py:120
|
#: rcgcdw.py:122
|
||||||
msgid "No redirect has been made"
|
msgid "No redirect has been made"
|
||||||
msgstr "Nie utworzono przekierowania"
|
msgstr "Nie utworzono przekierowania"
|
||||||
|
|
||||||
#: rcgcdw.py:121
|
#: rcgcdw.py:123
|
||||||
msgid "Moved \"{article}\" to \"{target}\""
|
msgid "Moved \"{article}\" to \"{target}\""
|
||||||
msgstr "Przeniesiono \"{article}\" do \"{target}\""
|
msgstr "Przeniesiono \"{article}\" do \"{target}\""
|
||||||
|
|
||||||
#: rcgcdw.py:124
|
#: rcgcdw.py:126
|
||||||
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})"
|
||||||
|
|
||||||
#: rcgcdw.py:128
|
#: rcgcdw.py:130
|
||||||
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:133
|
#: rcgcdw.py:135
|
||||||
msgid "infinity and beyond"
|
msgid "infinity and beyond"
|
||||||
msgstr "wieczność"
|
msgstr "wieczność"
|
||||||
|
|
||||||
#: rcgcdw.py:134
|
#: rcgcdw.py:136
|
||||||
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:140
|
#: rcgcdw.py:142
|
||||||
msgid "Reapplied the block on {blocked_user}"
|
msgid "Reapplied the block on {blocked_user}"
|
||||||
msgstr "Ponownie nałożono blokadę na {blocked_user}"
|
msgstr "Ponownie nałożono blokadę na {blocked_user}"
|
||||||
|
|
||||||
#: rcgcdw.py:146
|
#: rcgcdw.py:148
|
||||||
msgid "Removed the block on {blocked_user}"
|
msgid "Removed the block on {blocked_user}"
|
||||||
msgstr "Usunięto blokadę na {blocked_user}"
|
msgstr "Usunięto blokadę na {blocked_user}"
|
||||||
|
|
||||||
#: rcgcdw.py:151
|
#: rcgcdw.py:153
|
||||||
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:154
|
#: rcgcdw.py:156
|
||||||
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:157
|
#: rcgcdw.py:159
|
||||||
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:161
|
#: rcgcdw.py:163
|
||||||
msgid "Location"
|
msgid "Location"
|
||||||
msgstr "Lokacja"
|
msgstr "Lokacja"
|
||||||
|
|
||||||
#: rcgcdw.py:163
|
#: rcgcdw.py:165
|
||||||
msgid "About me"
|
msgid "About me"
|
||||||
msgstr "O mnie"
|
msgstr "O mnie"
|
||||||
|
|
||||||
#: rcgcdw.py:183
|
#: rcgcdw.py:185
|
||||||
msgid "Unknown"
|
msgid "Unknown"
|
||||||
msgstr "Nieznana"
|
msgstr "Nieznana"
|
||||||
|
|
||||||
#: rcgcdw.py:184
|
#: rcgcdw.py:186
|
||||||
msgid "Edited {target}'s profile"
|
msgid "Edited {target}'s profile"
|
||||||
msgstr "Edytowano profil użytkownika {target}"
|
msgstr "Edytowano profil użytkownika {target}"
|
||||||
|
|
||||||
#: rcgcdw.py:185
|
#: rcgcdw.py:187
|
||||||
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:188
|
#: rcgcdw.py:190
|
||||||
msgid "Removed a comment on {target}'s profile"
|
msgid "Removed a comment on {target}'s profile"
|
||||||
msgstr "Usunięto komentarz na profilu użytkownika {target}"
|
msgstr "Usunięto komentarz na profilu użytkownika {target}"
|
||||||
|
|
||||||
#: rcgcdw.py:191
|
#: rcgcdw.py:193
|
||||||
msgid "Changed {target}'s user groups"
|
msgid "Changed {target}'s user groups"
|
||||||
msgstr "Zmieniono grupy użytkownika {target}"
|
msgstr "Zmieniono grupy użytkownika {target}"
|
||||||
|
|
||||||
#: rcgcdw.py:195 rcgcdw.py:197
|
#: rcgcdw.py:197 rcgcdw.py:199
|
||||||
msgid "none"
|
msgid "none"
|
||||||
msgstr "brak"
|
msgstr "brak"
|
||||||
|
|
||||||
#: rcgcdw.py:198
|
#: rcgcdw.py:200
|
||||||
msgid "Groups changed from {old_groups} to {new_groups} with reason given: {desc}"
|
msgid ""
|
||||||
|
"Groups changed from {old_groups} to {new_groups} with reason given: {desc}"
|
||||||
msgstr "Grupy zmienione z {old_groups} do {new_groups} z powodu: {desc}"
|
msgstr "Grupy zmienione z {old_groups} do {new_groups} z powodu: {desc}"
|
||||||
|
|
||||||
#: rcgcdw.py:201
|
#: rcgcdw.py:203
|
||||||
msgid "Protected the page {target}"
|
msgid "Protected the page {target}"
|
||||||
msgstr "Zabezpieczono stronę: {target}"
|
msgstr "Zabezpieczono stronę: {target}"
|
||||||
|
|
||||||
#: rcgcdw.py:206
|
#: rcgcdw.py:208
|
||||||
msgid "Modified protection settings for {article}"
|
msgid "Modified protection settings for {article}"
|
||||||
msgstr "Zmodyfikowano ustawienia zabezpieczeń dla {article}"
|
msgstr "Zmodyfikowano ustawienia zabezpieczeń dla {article}"
|
||||||
|
|
||||||
#: rcgcdw.py:211
|
#: rcgcdw.py:213
|
||||||
msgid "Removed protection for {article}"
|
msgid "Removed protection for {article}"
|
||||||
msgstr "Usunięto zabezpieczenia dla {article}"
|
msgstr "Usunięto zabezpieczenia dla {article}"
|
||||||
|
|
||||||
#: rcgcdw.py:215
|
#: rcgcdw.py:217
|
||||||
msgid "Removed revision(s) from public view for {article}"
|
msgid "Removed revision(s) from public view for {article}"
|
||||||
msgstr "Usunięto edycje z widoku publicznego dla {article}"
|
msgstr "Usunięto edycje z widoku publicznego dla {article}"
|
||||||
|
|
||||||
#: rcgcdw.py:218
|
#: rcgcdw.py:220
|
||||||
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:221
|
#: rcgcdw.py:223
|
||||||
msgid "Restored {article}"
|
msgid "Restored {article}"
|
||||||
msgstr "Przywrócono {article)"
|
msgstr "Przywrócono {article)"
|
||||||
|
|
||||||
#: rcgcdw.py:224
|
#: rcgcdw.py:226
|
||||||
msgid "Removed events"
|
msgid "Removed events"
|
||||||
msgstr "Usunięto wydarzenia"
|
msgstr "Usunięto wydarzenia"
|
||||||
|
|
||||||
#: rcgcdw.py:227
|
#: rcgcdw.py:229
|
||||||
msgid "Imported interwiki"
|
msgid "Imported interwiki"
|
||||||
msgstr "Zaimportowano interwiki"
|
msgstr "Zaimportowano interwiki"
|
||||||
|
|
||||||
#: rcgcdw.py:230
|
#: rcgcdw.py:232
|
||||||
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:233
|
#: rcgcdw.py:235
|
||||||
msgid "Merged revision histories for {article}"
|
msgid "Merged revision histories for {article}"
|
||||||
msgstr "Połączono historie artykułu dla {article}"
|
msgstr "Połączono historie artykułu dla {article}"
|
||||||
|
|
||||||
#: rcgcdw.py:236
|
#: rcgcdw.py:238
|
||||||
msgid "Added interwiki entry"
|
msgid "Added interwiki entry"
|
||||||
msgstr "Dodano intwrwiki"
|
msgstr "Dodano intwrwiki"
|
||||||
|
|
||||||
#: rcgcdw.py:237 rcgcdw.py:241
|
#: rcgcdw.py:239 rcgcdw.py:243
|
||||||
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:240
|
#: rcgcdw.py:242
|
||||||
msgid "Edited interwiki entry"
|
msgid "Edited interwiki entry"
|
||||||
msgstr "Edytowano interwiki"
|
msgstr "Edytowano interwiki"
|
||||||
|
|
||||||
#: rcgcdw.py:244
|
#: rcgcdw.py:246
|
||||||
msgid "Deleted interwiki entry"
|
msgid "Deleted interwiki entry"
|
||||||
msgstr "Usunięto interwiki"
|
msgstr "Usunięto interwiki"
|
||||||
|
|
||||||
#: rcgcdw.py:245
|
#: rcgcdw.py:247
|
||||||
msgid "Prefix: {prefix} | {desc}"
|
msgid "Prefix: {prefix} | {desc}"
|
||||||
msgstr "Prefix: {prefix} | {desc}"
|
msgstr "Prefix: {prefix} | {desc}"
|
||||||
|
|
||||||
#: rcgcdw.py:248
|
#: rcgcdw.py:250
|
||||||
msgid "Changed content model of {article}"
|
msgid "Changed content model of {article}"
|
||||||
msgstr "Zmieniono model zawartości {article}"
|
msgstr "Zmieniono model zawartości {article}"
|
||||||
|
|
||||||
#: rcgcdw.py:249
|
#: rcgcdw.py:251
|
||||||
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:252
|
#: rcgcdw.py:254
|
||||||
msgid "Edited the sprite for {article}"
|
msgid "Edited the sprite for {article}"
|
||||||
msgstr "Edytowano sprite dla {article}"
|
msgstr "Edytowano sprite dla {article}"
|
||||||
|
|
||||||
#: rcgcdw.py:255
|
#: rcgcdw.py:257
|
||||||
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:258
|
#: rcgcdw.py:260
|
||||||
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:261
|
#: rcgcdw.py:263
|
||||||
msgid "Created a tag \"{tag}\""
|
msgid "Created a tag \"{tag}\""
|
||||||
msgstr "Utworzono tag \"{tag}\""
|
msgstr "Utworzono tag \"{tag}\""
|
||||||
|
|
||||||
#: rcgcdw.py:264
|
#: rcgcdw.py:266
|
||||||
msgid "Deleted a tag \"{tag}\""
|
msgid "Deleted a tag \"{tag}\""
|
||||||
msgstr "Usunięto tag \"{tag}\""
|
msgstr "Usunięto tag \"{tag}\""
|
||||||
|
|
||||||
#: rcgcdw.py:283
|
#: rcgcdw.py:285
|
||||||
msgid "No description provided"
|
msgid "No description provided"
|
||||||
msgstr "Nie podano opisu zmian"
|
msgstr "Nie podano opisu zmian"
|
||||||
|
|
||||||
#: rcgcdw.py:364
|
#: rcgcdw.py:366
|
||||||
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:364
|
#: rcgcdw.py:366
|
||||||
msgid "error"
|
msgid "error"
|
||||||
msgstr "błąd"
|
msgstr "błąd"
|
||||||
|
|
||||||
#: rcgcdw.py:445
|
#: rcgcdw.py:451
|
||||||
msgid "Connection status"
|
msgid "Connection status"
|
||||||
msgstr "Problem z połączeniem"
|
msgstr "Problem z połączeniem"
|
||||||
|
|
||||||
#: rcgcdw.py:445
|
#: rcgcdw.py:451
|
||||||
msgid "Minecraft Wiki seems to be down or unreachable."
|
|
||||||
msgstr "Minecraft Wiki nie działa lub jest nieosiągalna."
|
|
||||||
|
|
||||||
#: rcgcdw.py:445
|
|
||||||
msgid "https://i.imgur.com/2jWQEt1.png"
|
msgid "https://i.imgur.com/2jWQEt1.png"
|
||||||
msgstr "https://i.imgur.com/2jWQEt1.png"
|
msgstr "https://i.imgur.com/2jWQEt1.png"
|
||||||
|
|
||||||
|
#: rcgcdw.py:451
|
||||||
|
msgid "{wiki} seems to be down or unreachable."
|
||||||
|
msgstr "{wiki} nie działa lub jest nieosiągalna."
|
||||||
|
|
122
rcgcdw.pot
122
rcgcdw.pot
|
@ -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-16 13:32+0200\n"
|
"POT-Creation-Date: 2018-06-16 14:38+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,233 +15,233 @@ msgstr ""
|
||||||
"Generated-By: pygettext.py 1.5\n"
|
"Generated-By: pygettext.py 1.5\n"
|
||||||
|
|
||||||
|
|
||||||
#: rcgcdw.py:88
|
#: rcgcdw.py:90
|
||||||
msgid "New file version {name}"
|
msgid "New file version {name}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:89
|
#: rcgcdw.py:91
|
||||||
msgid "([preview]({link}) | [undo]({undolink}))"
|
msgid "([preview]({link}) | [undo]({undolink}))"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:89 rcgcdw.py:105
|
#: rcgcdw.py:91 rcgcdw.py:107
|
||||||
msgid "Options"
|
msgid "Options"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:91
|
#: rcgcdw.py:93
|
||||||
msgid "New file {name}"
|
msgid "New file {name}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:105
|
#: rcgcdw.py:107
|
||||||
msgid "([preview]({link}))"
|
msgid "([preview]({link}))"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:106
|
#: rcgcdw.py:108
|
||||||
msgid ""
|
msgid ""
|
||||||
"{desc}\n"
|
"{desc}\n"
|
||||||
"License: {license}"
|
"License: {license}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:111
|
#: rcgcdw.py:113
|
||||||
msgid "Deleted {article}"
|
msgid "Deleted {article}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:116
|
#: rcgcdw.py:118
|
||||||
msgid "Deleted redirect ({article}) to make space for moved page"
|
msgid "Deleted redirect ({article}) to make space for moved page"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:120
|
#: rcgcdw.py:122
|
||||||
msgid "A redirect has been made"
|
msgid "A redirect has been made"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:120
|
#: rcgcdw.py:122
|
||||||
msgid "No redirect has been made"
|
msgid "No redirect has been made"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:121
|
#: rcgcdw.py:123
|
||||||
msgid "Moved \"{article}\" to \"{target}\""
|
msgid "Moved \"{article}\" to \"{target}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:124
|
#: rcgcdw.py:126
|
||||||
msgid "Moved {article} to redirect page ({title})"
|
msgid "Moved {article} to redirect page ({title})"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:128
|
#: rcgcdw.py:130
|
||||||
msgid "Moved protection settings from {article} to {title}"
|
msgid "Moved protection settings from {article} to {title}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:133
|
#: rcgcdw.py:135
|
||||||
msgid "infinity and beyond"
|
msgid "infinity and beyond"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:134
|
#: rcgcdw.py:136
|
||||||
msgid "Blocked {blocked_user} for {time}"
|
msgid "Blocked {blocked_user} for {time}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:140
|
#: rcgcdw.py:142
|
||||||
msgid "Reapplied the block on {blocked_user}"
|
msgid "Reapplied the block on {blocked_user}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:146
|
#: rcgcdw.py:148
|
||||||
msgid "Removed the block on {blocked_user}"
|
msgid "Removed the block on {blocked_user}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:151
|
#: rcgcdw.py:153
|
||||||
msgid "Left a comment on {target}'s profile"
|
msgid "Left a comment on {target}'s profile"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:154
|
#: rcgcdw.py:156
|
||||||
msgid "Replied to a comment on {target}'s profile"
|
msgid "Replied to a comment on {target}'s profile"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:157
|
#: rcgcdw.py:159
|
||||||
msgid "Edited a comment on {target}'s profile"
|
msgid "Edited a comment on {target}'s profile"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:161
|
#: rcgcdw.py:163
|
||||||
msgid "Location"
|
msgid "Location"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:163
|
#: rcgcdw.py:165
|
||||||
msgid "About me"
|
msgid "About me"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:183
|
#: rcgcdw.py:185
|
||||||
msgid "Unknown"
|
msgid "Unknown"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:184
|
#: rcgcdw.py:186
|
||||||
msgid "Edited {target}'s profile"
|
msgid "Edited {target}'s profile"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:185
|
#: rcgcdw.py:187
|
||||||
msgid "{field} field changed to: {desc}"
|
msgid "{field} field changed to: {desc}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:188
|
#: rcgcdw.py:190
|
||||||
msgid "Removed a comment on {target}'s profile"
|
msgid "Removed a comment on {target}'s profile"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:191
|
#: rcgcdw.py:193
|
||||||
msgid "Changed {target}'s user groups"
|
msgid "Changed {target}'s user groups"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:195 rcgcdw.py:197
|
#: rcgcdw.py:197 rcgcdw.py:199
|
||||||
msgid "none"
|
msgid "none"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:198
|
#: rcgcdw.py:200
|
||||||
msgid "Groups changed from {old_groups} to {new_groups} with reason given: {desc}"
|
msgid "Groups changed from {old_groups} to {new_groups} with reason given: {desc}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:201
|
#: rcgcdw.py:203
|
||||||
msgid "Protected the page {target}"
|
msgid "Protected the page {target}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:206
|
#: rcgcdw.py:208
|
||||||
msgid "Modified protection settings for {article}"
|
msgid "Modified protection settings for {article}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:211
|
#: rcgcdw.py:213
|
||||||
msgid "Removed protection for {article}"
|
msgid "Removed protection for {article}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:215
|
#: rcgcdw.py:217
|
||||||
msgid "Removed revision(s) from public view for {article}"
|
msgid "Removed revision(s) from public view for {article}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:218
|
#: rcgcdw.py:220
|
||||||
msgid "Imported {article} with {count} revision(s)"
|
msgid "Imported {article} with {count} revision(s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:221
|
#: rcgcdw.py:223
|
||||||
msgid "Restored {article}"
|
msgid "Restored {article}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:224
|
#: rcgcdw.py:226
|
||||||
msgid "Removed events"
|
msgid "Removed events"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:227
|
#: rcgcdw.py:229
|
||||||
msgid "Imported interwiki"
|
msgid "Imported interwiki"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:230
|
#: rcgcdw.py:232
|
||||||
msgid "Edited abuse filter number {number}"
|
msgid "Edited abuse filter number {number}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:233
|
#: rcgcdw.py:235
|
||||||
msgid "Merged revision histories for {article}"
|
msgid "Merged revision histories for {article}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:236
|
#: rcgcdw.py:238
|
||||||
msgid "Added interwiki entry"
|
msgid "Added interwiki entry"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:237 rcgcdw.py:241
|
#: rcgcdw.py:239 rcgcdw.py:243
|
||||||
msgid "Prefix: {prefix}, website: {website} | {desc}"
|
msgid "Prefix: {prefix}, website: {website} | {desc}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:240
|
#: rcgcdw.py:242
|
||||||
msgid "Edited interwiki entry"
|
msgid "Edited interwiki entry"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:244
|
#: rcgcdw.py:246
|
||||||
msgid "Deleted interwiki entry"
|
msgid "Deleted interwiki entry"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:245
|
#: rcgcdw.py:247
|
||||||
msgid "Prefix: {prefix} | {desc}"
|
msgid "Prefix: {prefix} | {desc}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:248
|
#: rcgcdw.py:250
|
||||||
msgid "Changed content model of {article}"
|
msgid "Changed content model of {article}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:249
|
#: rcgcdw.py:251
|
||||||
msgid "Model changed from {old} to {new}: {reason}"
|
msgid "Model changed from {old} to {new}: {reason}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:252
|
#: rcgcdw.py:254
|
||||||
msgid "Edited the sprite for {article}"
|
msgid "Edited the sprite for {article}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:255
|
#: rcgcdw.py:257
|
||||||
msgid "Created the sprite sheet for {article}"
|
msgid "Created the sprite sheet for {article}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:258
|
#: rcgcdw.py:260
|
||||||
msgid "Edited the slice for {article}"
|
msgid "Edited the slice for {article}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:261
|
#: rcgcdw.py:263
|
||||||
msgid "Created a tag \"{tag}\""
|
msgid "Created a tag \"{tag}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:264
|
#: rcgcdw.py:266
|
||||||
msgid "Deleted a tag \"{tag}\""
|
msgid "Deleted a tag \"{tag}\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:283
|
#: rcgcdw.py:285
|
||||||
msgid "No description provided"
|
msgid "No description provided"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:364
|
#: rcgcdw.py:366
|
||||||
msgid "Unable to process the event"
|
msgid "Unable to process the event"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:364
|
#: rcgcdw.py:366
|
||||||
msgid "error"
|
msgid "error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:445
|
#: rcgcdw.py:451
|
||||||
msgid "Connection status"
|
msgid "Connection status"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: rcgcdw.py:445
|
#: rcgcdw.py:451
|
||||||
msgid "Minecraft Wiki seems to be down or unreachable."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: rcgcdw.py:445
|
|
||||||
msgid "https://i.imgur.com/2jWQEt1.png"
|
msgid "https://i.imgur.com/2jWQEt1.png"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: rcgcdw.py:451
|
||||||
|
msgid "{wiki} seems to be down or unreachable."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
|
110
rcgcdw.py
110
rcgcdw.py
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import time, logging, json, requests, datetime, re, gettext
|
import time, logging, json, requests, datetime, re, gettext, math, random
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
|
@ -39,21 +39,21 @@ def webhook_formatter(action, timestamp, **params):
|
||||||
embed = defaultdict(dict)
|
embed = defaultdict(dict)
|
||||||
if "title" in params:
|
if "title" in params:
|
||||||
article_encoded = params["title"].replace(" ", "_").replace(')', '\)')
|
article_encoded = params["title"].replace(" ", "_").replace(')', '\)')
|
||||||
if re.match(r"\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b", params["author"]) is not None:
|
if re.match(r"\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b", params["user"]) is not None:
|
||||||
author_url = "https://{wiki}.gamepedia.com/Special:Contributions/{user}".format(wiki=settings["wiki"], user=params["author"])
|
author_url = "https://{wiki}.gamepedia.com/Special:Contributions/{user}".format(wiki=settings["wiki"], user=params["user"])
|
||||||
if params["author"] not in list(recent_changes.map_ips.keys()):
|
if params["user"] not in list(recent_changes.map_ips.keys()):
|
||||||
contibs = safe_read(recent_changes.safe_request("https://{wiki}.gamepedia.com/api.php?action=query&format=json&list=usercontribs&uclimit=max&ucuser={user}&ucprop=".format(wiki=settings["wiki"], user=params["author"])), "query", "usercontribs")
|
contibs = safe_read(recent_changes.safe_request("https://{wiki}.gamepedia.com/api.php?action=query&format=json&list=usercontribs&uclimit=max&ucuser={user}&ucprop=".format(wiki=settings["wiki"], user=params["user"])), "query", "usercontribs")
|
||||||
if contibs is None:
|
if contibs is None:
|
||||||
logging.warning("WARNING: Something went wrong when checking amount of contributions for given IP address")
|
logging.warning("WARNING: Something went wrong when checking amount of contributions for given IP address")
|
||||||
params["author"] = params["author"] + "(?)"
|
params["user"] = params["user"] + "(?)"
|
||||||
else:
|
else:
|
||||||
params["author"] = "{author} ({contribs})".format(author=params["author"], contribs=len(contibs))
|
params["user"] = "{author} ({contribs})".format(author=params["user"], contribs=len(contibs))
|
||||||
recent_changes.map_ips[params["author"]]=len(contibs)
|
recent_changes.map_ips[params["user"]]=len(contibs)
|
||||||
else:
|
else:
|
||||||
recent_changes.map_ips[params["author"]]+=1
|
recent_changes.map_ips[params["user"]]+=1
|
||||||
params["author"] = "{author} ({amount})".format(author=params["author"], amount=recent_changes.map_ips[params["author"]])
|
params["user"] = "{author} ({amount})".format(author=params["user"], amount=recent_changes.map_ips[params["user"]])
|
||||||
else:
|
else:
|
||||||
author_url = "https://{wiki}.gamepedia.com/User:{user}".format(wiki=settings["wiki"], user=params["author"].replace(" ", "_"))
|
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"]
|
editsize = params["size"]
|
||||||
if editsize > 0:
|
if editsize > 0:
|
||||||
|
@ -69,12 +69,12 @@ def webhook_formatter(action, timestamp, **params):
|
||||||
elif editsize == 0:
|
elif editsize == 0:
|
||||||
colornumber = 8750469
|
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=article_encoded)
|
||||||
if event == "edit":
|
if action == 1:
|
||||||
embed["author"]["icon_url"] = "https://d1u5p3l4wpay3k.cloudfront.net/minecraft_pl_gamepedia/d/df/Ksi%C4%85%C5%BCka_z_pi%C3%B3rem.png?version=d2b085f15fb5713091ed06f92f81c360"
|
embed["author"]["icon_url"] = "https://d1u5p3l4wpay3k.cloudfront.net/minecraft_pl_gamepedia/d/df/Ksi%C4%85%C5%BCka_z_pi%C3%B3rem.png?version=d2b085f15fb5713091ed06f92f81c360"
|
||||||
else:
|
else:
|
||||||
embed["author"]["icon_url"] = "https://framapic.org/VBVcOznftNsV/4a0fbBL7wkUo.png"
|
embed["author"]["icon_url"] = "https://framapic.org/VBVcOznftNsV/4a0fbBL7wkUo.png"
|
||||||
embed["title"] = "{article} ({new}{minor}{editsize})".format(article=params["title"], editsize="+"+str(editsize) if editsize>0 else editsize, new= "(N!) " if event == 37 else "", minor="m " if event == "edit" and params["minor"] else "")
|
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 event == 5: #sending files
|
elif action == 5: #sending files
|
||||||
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")
|
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 = ""
|
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=article_encoded)
|
||||||
|
@ -91,7 +91,7 @@ def webhook_formatter(action, timestamp, **params):
|
||||||
embed["fields"] = [{"name": _("Options"), "value": _("([preview]({link}) | [undo]({undolink}))").format(link=embed["image"]["url"], undolink=undolink)}]
|
embed["fields"] = [{"name": _("Options"), "value": _("([preview]({link}) | [undo]({undolink}))").format(link=embed["image"]["url"], undolink=undolink)}]
|
||||||
else:
|
else:
|
||||||
embed["title"] = _("New file {name}").format(name=params["title"])
|
embed["title"] = _("New file {name}").format(name=params["title"])
|
||||||
article_content = safe_read(recent_changes.safe_request("https://minecraft.gamepedia.com/api.php?action=query&format=json&prop=revisions&titles={article}&rvprop=content".format(article=urllib.parse.quote_plus(params["title"]))), "query", "pages") #TODO Napewno urllib?
|
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=urllib.parse.quote_plus(params["title"]))), "query", "pages") #TODO Napewno urllib?
|
||||||
if article_content is None:
|
if article_content is None:
|
||||||
logging.warning("Something went wrong when getting license for the image")
|
logging.warning("Something went wrong when getting license for the image")
|
||||||
return 0
|
return 0
|
||||||
|
@ -106,58 +106,58 @@ def webhook_formatter(action, timestamp, **params):
|
||||||
license = "?"
|
license = "?"
|
||||||
embed["fields"] = [{"name": _("Options"), "value": _("([preview]({link}))").format(link=pic_url)}]
|
embed["fields"] = [{"name": _("Options"), "value": _("([preview]({link}))").format(link=pic_url)}]
|
||||||
params["desc"] = _("{desc}\nLicense: {license}").format(desc=params["desc"], license=license)
|
params["desc"] = _("{desc}\nLicense: {license}").format(desc=params["desc"], license=license)
|
||||||
elif event == 6:
|
elif action == 6:
|
||||||
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["author"]["icon_url"] = "https://framapic.org/9Rgw6Vkx1L1b/R9WrMWJ6umeX.png"
|
embed["author"]["icon_url"] = "https://framapic.org/9Rgw6Vkx1L1b/R9WrMWJ6umeX.png"
|
||||||
colornumber = 1
|
colornumber = 1
|
||||||
embed["title"] = _("Deleted {article}").format(article=params["title"])
|
embed["title"] = _("Deleted {article}").format(article=params["title"])
|
||||||
elif event == 7:
|
elif action == 7:
|
||||||
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["author"]["icon_url"] = "https://framapic.org/9Rgw6Vkx1L1b/R9WrMWJ6umeX.png"
|
embed["author"]["icon_url"] = "https://framapic.org/9Rgw6Vkx1L1b/R9WrMWJ6umeX.png"
|
||||||
colornumber = 1
|
colornumber = 1
|
||||||
embed["title"] = _("Deleted redirect ({article}) to make space for moved page").format(article=params["title"])
|
embed["title"] = _("Deleted redirect ({article}) to make space for moved page").format(article=params["title"])
|
||||||
elif event == 14:
|
elif action == 14:
|
||||||
link = params["targetlink"]
|
link = params["targetlink"]
|
||||||
embed["author"]["icon_url"] = "https://i.imgur.com/ZX02KBf.png"
|
embed["author"]["icon_url"] = "https://i.imgur.com/ZX02KBf.png"
|
||||||
params["desc"] = "{supress}. {desc}".format(desc=params["desc"], supress=_("No redirect has been made") if params["supress"] == True else _("A redirect has been made"))
|
params["desc"] = "{supress}. {desc}".format(desc=params["desc"], supress=_("No redirect has been made") if params["supress"] == True else _("A redirect has been made"))
|
||||||
embed["title"] = _("Moved \"{article}\" to \"{target}\"").format(article = params["title"], target=params["target"])
|
embed["title"] = _("Moved \"{article}\" to \"{target}\"").format(article = params["title"], target=params["target"])
|
||||||
elif event == 15:
|
elif action == 15:
|
||||||
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"] = _("Moved {article} to redirect page ({title})").format(article=params["title"], title=params["target"])
|
embed["title"] = _("Moved {article} to redirect page ({title})").format(article=params["title"], title=params["target"])
|
||||||
embed["author"]["icon_url"]= "https://i.imgur.com/ZX02KBf.png"
|
embed["author"]["icon_url"]= "https://i.imgur.com/ZX02KBf.png"
|
||||||
elif event == 16:
|
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=article_encoded)
|
||||||
embed["title"] = _("Moved protection settings from {article} to {title}").format(article=params["title"], title=params["target"])
|
embed["title"] = _("Moved protection settings from {article} to {title}").format(article=params["title"], title=params["target"])
|
||||||
embed["author"]["icon_url"]= "https://i.imgur.com/ZX02KBf.png"
|
embed["author"]["icon_url"]= "https://i.imgur.com/ZX02KBf.png"
|
||||||
elif event == 17:
|
elif action == 17:
|
||||||
link = "https://{wiki}.gamepedia.com/{user}".format(wiki=settings["wiki"], user=params["blocked_user"].replace(" ", "_").replace(')', '\)'))
|
link = "https://{wiki}.gamepedia.com/{user}".format(wiki=settings["wiki"], user=params["blocked_user"].replace(" ", "_").replace(')', '\)'))
|
||||||
user = params["blocked_user"].split(':')[1]
|
user = params["blocked_user"].split(':')[1]
|
||||||
time =_( "infinity and beyond") if params["duration"] == "infinite" else params["duration"]
|
time =_( "infinity and beyond") if params["duration"] == "infinite" else params["duration"]
|
||||||
embed["title"] = _("Blocked {blocked_user} for {time}").format(blocked_user=user, time=duration)
|
embed["title"] = _("Blocked {blocked_user} for {time}").format(blocked_user=user, time=time)
|
||||||
colornumber = 1
|
colornumber = 1
|
||||||
embed["author"]["icon_url"] = "https://i.imgur.com/g7KgZHf.png"
|
embed["author"]["icon_url"] = "https://i.imgur.com/g7KgZHf.png"
|
||||||
elif event == 19:
|
elif action == 19:
|
||||||
link = "https://{wiki}.gamepedia.com/{user}".format(wiki=settings["wiki"], user=params["blocked_user"].replace(" ", "_").replace(')', '\)'))
|
link = "https://{wiki}.gamepedia.com/{user}".format(wiki=settings["wiki"], user=params["blocked_user"].replace(" ", "_").replace(')', '\)'))
|
||||||
user = params["blocked_user"].split(':')[1]
|
user = params["blocked_user"].split(':')[1]
|
||||||
embed["title"] = _("Reapplied the block on {blocked_user}").format(blocked_user=user)
|
embed["title"] = _("Reapplied the block on {blocked_user}").format(blocked_user=user)
|
||||||
colornumber = 1
|
colornumber = 1
|
||||||
embed["author"]["icon_url"] = "https://i.imgur.com/g7KgZHf.png"
|
embed["author"]["icon_url"] = "https://i.imgur.com/g7KgZHf.png"
|
||||||
elif event == 18:
|
elif action == 18:
|
||||||
link = "https://{wiki}.gamepedia.com/{user}".format(wiki=settings["wiki"], user=params["blocked_user"].replace(" ", "_").replace(')', '\)'))
|
link = "https://{wiki}.gamepedia.com/{user}".format(wiki=settings["wiki"], user=params["blocked_user"].replace(" ", "_").replace(')', '\)'))
|
||||||
user = params["blocked_user"].split(':')[1]
|
user = params["blocked_user"].split(':')[1]
|
||||||
embed["title"] = _("Removed the block on {blocked_user}").format(blocked_user=user)
|
embed["title"] = _("Removed the block on {blocked_user}").format(blocked_user=user)
|
||||||
colornumber = 1
|
colornumber = 1
|
||||||
embed["author"]["icon_url"] = "https://i.imgur.com/g7KgZHf.png"
|
embed["author"]["icon_url"] = "https://i.imgur.com/g7KgZHf.png"
|
||||||
elif event == 25:
|
elif action == 25:
|
||||||
link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)'))
|
link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)'))
|
||||||
embed["title"] = _("Left a comment on {target}'s profile").format(target=params["target"])
|
embed["title"] = _("Left a comment on {target}'s profile").format(target=params["target"])
|
||||||
elif event == 29:
|
elif action == 29:
|
||||||
link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)'))
|
link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)'))
|
||||||
embed["title"] = _("Replied to a comment on {target}'s profile").format(target=params["target"])
|
embed["title"] = _("Replied to a comment on {target}'s profile").format(target=params["target"])
|
||||||
elif event == 26:
|
elif action == 26:
|
||||||
link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)'))
|
link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)'))
|
||||||
embed["title"] = _("Edited a comment on {target}'s profile").format(target=params["target"])
|
embed["title"] = _("Edited a comment on {target}'s profile").format(target=params["target"])
|
||||||
elif event == 28:
|
elif action == 28:
|
||||||
link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)'))
|
link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)'))
|
||||||
if params["field"] == "profile-location":
|
if params["field"] == "profile-location":
|
||||||
field = _("Location")
|
field = _("Location")
|
||||||
|
@ -185,10 +185,10 @@ def webhook_formatter(action, timestamp, **params):
|
||||||
field = _("Unknown")
|
field = _("Unknown")
|
||||||
embed["title"] = _("Edited {target}'s profile").format(target=params["target"])
|
embed["title"] = _("Edited {target}'s profile").format(target=params["target"])
|
||||||
params["desc"] = _("{field} field changed to: {desc}").format(field=field, desc=params["desc"])
|
params["desc"] = _("{field} field changed to: {desc}").format(field=field, desc=params["desc"])
|
||||||
elif event == 27:
|
elif action == 27:
|
||||||
link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)'))
|
link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)'))
|
||||||
embed["title"] = _("Removed a comment on {target}'s profile").format(target=params["target"])
|
embed["title"] = _("Removed a comment on {target}'s profile").format(target=params["target"])
|
||||||
elif event == 20:
|
elif action == 20:
|
||||||
link = "https://{wiki}.gamepedia.com/"+params["user"].replace(" ", "_").replace(')', '\)')
|
link = "https://{wiki}.gamepedia.com/"+params["user"].replace(" ", "_").replace(')', '\)')
|
||||||
embed["title"] = _("Changed {target}'s user groups").format(target=params["user"])
|
embed["title"] = _("Changed {target}'s user groups").format(target=params["user"])
|
||||||
if params["old_groups"].count(' ') < params["new_groups"].count(' '):
|
if params["old_groups"].count(' ') < params["new_groups"].count(' '):
|
||||||
|
@ -198,75 +198,75 @@ def webhook_formatter(action, timestamp, **params):
|
||||||
if len(params["new_groups"]) < 4:
|
if len(params["new_groups"]) < 4:
|
||||||
params["new_groups"] = _("none")
|
params["new_groups"] = _("none")
|
||||||
params["desc"] = _("Groups changed from {old_groups} to {new_groups} with reason given: {desc}").format(old_groups=params["old_groups"], new_groups=params["new_groups"], desc=params["desc"])
|
params["desc"] = _("Groups changed from {old_groups} to {new_groups} with reason given: {desc}").format(old_groups=params["old_groups"], new_groups=params["new_groups"], desc=params["desc"])
|
||||||
elif event == 2:
|
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=article_encoded)
|
||||||
embed["title"] = _("Protected the page {target}").format(target=params["title"])
|
embed["title"] = _("Protected the page {target}").format(target=params["title"])
|
||||||
embed["author"]["icon_url"] ="https://i.imgur.com/Lfk0wuw.png"
|
embed["author"]["icon_url"] ="https://i.imgur.com/Lfk0wuw.png"
|
||||||
params["desc"] = params["settings"] + " | " + params["desc"]
|
params["desc"] = params["settings"] + " | " + params["desc"]
|
||||||
elif event == 3:
|
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=article_encoded)
|
||||||
embed["title"] = _("Modified protection settings for {article}").format(article=params["title"])
|
embed["title"] = _("Modified protection settings for {article}").format(article=params["title"])
|
||||||
params["desc"] = params["desc2"] + " | " + params["desc"]
|
params["desc"] = params["settings"] + " | " + params["desc"]
|
||||||
embed["author"]["icon_url"] ="https://i.imgur.com/Lfk0wuw.png"
|
embed["author"]["icon_url"] ="https://i.imgur.com/Lfk0wuw.png"
|
||||||
elif event == 4:
|
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=article_encoded)
|
||||||
embed["title"] = _("Removed protection for {article}").format(article=params["title"])
|
embed["title"] = _("Removed protection for {article}").format(article=params["title"])
|
||||||
embed["author"]["icon_url"] ="https://i.imgur.com/Lfk0wuw.png"
|
embed["author"]["icon_url"] ="https://i.imgur.com/Lfk0wuw.png"
|
||||||
elif event == 9:
|
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=article_encoded)
|
||||||
embed["title"] = _("Removed revision(s) from public view for {article}").format(article=params["title"])
|
embed["title"] = _("Removed revision(s) from public view for {article}").format(article=params["title"])
|
||||||
elif event == 11:
|
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=article_encoded)
|
||||||
embed["title"] = _("Imported {article} with {count} revision(s)").format(article=params["title"], count=params["amount"])
|
embed["title"] = _("Imported {article} with {count} revision(s)").format(article=params["title"], count=params["amount"])
|
||||||
elif event == 8:
|
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=article_encoded)
|
||||||
embed["title"] = _("Restored {article}").format(article=params["title"])
|
embed["title"] = _("Restored {article}").format(article=params["title"])
|
||||||
elif event == 10:
|
elif action == 10:
|
||||||
link = "https://{wiki}.gamepedia.com/Special:RecentChanges".format(wiki=settings["wiki"])
|
link = "https://{wiki}.gamepedia.com/Special:RecentChanges".format(wiki=settings["wiki"])
|
||||||
embed["title"] = _("Removed events")
|
embed["title"] = _("Removed events")
|
||||||
elif event == 12:
|
elif action == 12:
|
||||||
link = "https://{wiki}.gamepedia.com/Special:RecentChanges".format(wiki=settings["wiki"])
|
link = "https://{wiki}.gamepedia.com/Special:RecentChanges".format(wiki=settings["wiki"])
|
||||||
embed["title"] = _("Imported interwiki")
|
embed["title"] = _("Imported interwiki")
|
||||||
elif event == 21:
|
elif action == 21:
|
||||||
link = "https://{wiki}.gamepedia.com/Special:RecentChanges".format(wiki=settings["wiki"])
|
link = "https://{wiki}.gamepedia.com/Special:RecentChanges".format(wiki=settings["wiki"])
|
||||||
embed["title"] = _("Edited abuse filter number {number}").format(number=params["filternr"])
|
embed["title"] = _("Edited abuse filter number {number}").format(number=params["filternr"])
|
||||||
elif event == 8:
|
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=article_encoded)
|
||||||
embed["title"] = _("Merged revision histories for {article}").format(article=params["title"])
|
embed["title"] = _("Merged revision histories for {article}").format(article=params["title"])
|
||||||
elif event == 22:
|
elif action == 22:
|
||||||
link = "https://{wiki}.gamepedia.com/Special:Interwiki".format(wiki=settings["wiki"])
|
link = "https://{wiki}.gamepedia.com/Special:Interwiki".format(wiki=settings["wiki"])
|
||||||
embed["title"] = _("Added interwiki entry")
|
embed["title"] = _("Added interwiki entry")
|
||||||
params["desc"] =_("Prefix: {prefix}, website: {website} | {desc}").format(desc=params["desc"], prefix=params["prefix"], website=params["website"])
|
params["desc"] =_("Prefix: {prefix}, website: {website} | {desc}").format(desc=params["desc"], prefix=params["prefix"], website=params["website"])
|
||||||
elif event == 23:
|
elif action == 23:
|
||||||
link = "https://{wiki}.gamepedia.com/Special:Interwiki".format(wiki=settings["wiki"])
|
link = "https://{wiki}.gamepedia.com/Special:Interwiki".format(wiki=settings["wiki"])
|
||||||
embed["title"] = _("Edited interwiki entry")
|
embed["title"] = _("Edited interwiki entry")
|
||||||
params["desc"] =_("Prefix: {prefix}, website: {website} | {desc}").format(desc=params["desc"], prefix=params["prefix"], website=params["website"])
|
params["desc"] =_("Prefix: {prefix}, website: {website} | {desc}").format(desc=params["desc"], prefix=params["prefix"], website=params["website"])
|
||||||
elif event == 24:
|
elif action == 24:
|
||||||
link = "https://{wiki}.gamepedia.com/Special:Interwiki".format(wiki=settings["wiki"])
|
link = "https://{wiki}.gamepedia.com/Special:Interwiki".format(wiki=settings["wiki"])
|
||||||
embed["title"] = _("Deleted interwiki entry")
|
embed["title"] = _("Deleted interwiki entry")
|
||||||
params["desc"] =_("Prefix: {prefix} | {desc}").format(desc=params["desc"], prefix=params["prefix"])
|
params["desc"] =_("Prefix: {prefix} | {desc}").format(desc=params["desc"], prefix=params["prefix"])
|
||||||
elif event == 30:
|
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=article_encoded)
|
||||||
embed["title"] = _("Changed content model of {article}").format(article=params["title"])
|
embed["title"] = _("Changed content model of {article}").format(article=params["title"])
|
||||||
params["desc"] = _("Model changed from {old} to {new}: {reason}").format(old=params["oldmodel"], new=params["newmodel"], reason=params["desc"])
|
params["desc"] = _("Model changed from {old} to {new}: {reason}").format(old=params["oldmodel"], new=params["newmodel"], reason=params["desc"])
|
||||||
elif event == 31:
|
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=article_encoded)
|
||||||
embed["title"] = _("Edited the sprite for {article}").format(article=params["title"])
|
embed["title"] = _("Edited the sprite for {article}").format(article=params["title"])
|
||||||
elif event == 32:
|
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=article_encoded)
|
||||||
embed["title"] = _("Created the sprite sheet for {article}").format(article=params["title"])
|
embed["title"] = _("Created the sprite sheet for {article}").format(article=params["title"])
|
||||||
elif event == 33:
|
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=article_encoded)
|
||||||
embed["title"] = _("Edited the slice for {article}").format(article=params["title"])
|
embed["title"] = _("Edited the slice for {article}").format(article=params["title"])
|
||||||
elif event == 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(article=params["additional"]["tag"])
|
||||||
elif event == 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(article=params["additional"]["tag"])
|
||||||
else:
|
else:
|
||||||
logging.warning("No entry for {event} with params: {params}".format(event=event, params=params))
|
logging.warning("No entry for {event} with params: {params}".format(event=action, params=params))
|
||||||
embed["author"]["name"] = params["author"]
|
embed["author"]["name"] = params["user"]
|
||||||
embed["author"]["url"] = author_url
|
embed["author"]["url"] = author_url
|
||||||
embed["url"] = link
|
embed["url"] = link
|
||||||
if "desc" not in params:
|
if "desc" not in params:
|
||||||
|
@ -315,7 +315,7 @@ def first_pass(change):
|
||||||
elif logtype=="merge" :
|
elif logtype=="merge" :
|
||||||
webhook_formatter(13, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment)
|
webhook_formatter(13, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment)
|
||||||
elif logtype=="move" and logaction=="move":
|
elif logtype=="move" and logaction=="move":
|
||||||
webhook_formatter(14, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment, supress=True if "suppressredirect" in change["logparams"] else False, target=change["logparams"]['target_title'], targetlink="https://minecraft.gamepedia.com/" + change["logparams"]['target_title'].replace(" ", "_")) #TODO Remove the link making in here
|
webhook_formatter(14, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment, supress=True if "suppressredirect" in change["logparams"] else False, target=change["logparams"]['target_title'], targetlink="https://{wiki}.gamepedia.com/".format(wiki=settings["wiki"]) + change["logparams"]['target_title'].replace(" ", "_")) #TODO Remove the link making in here
|
||||||
elif logtype=="move" and logaction=="move_redir":
|
elif logtype=="move" and logaction=="move_redir":
|
||||||
webhook_formatter(15, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment, target=change["logparams"]["target_title"])
|
webhook_formatter(15, change["timestamp"], user=change["user"], title=change["title"], desc=parsedcomment, target=change["logparams"]["target_title"])
|
||||||
elif logtype=="protect" and logaction=="move_prot":
|
elif logtype=="protect" and logaction=="move_prot":
|
||||||
|
@ -412,6 +412,8 @@ class recent_changes(object):
|
||||||
self.add_cache(change)
|
self.add_cache(change)
|
||||||
if clean:
|
if clean:
|
||||||
continue
|
continue
|
||||||
|
first_pass(change)
|
||||||
|
time.sleep(0.5)
|
||||||
def safe_request(self, url):
|
def safe_request(self, url):
|
||||||
try:
|
try:
|
||||||
request = requests.get(url, timeout=10, headers=settings["header"])
|
request = requests.get(url, timeout=10, headers=settings["header"])
|
||||||
|
@ -444,7 +446,7 @@ class recent_changes(object):
|
||||||
self.downtimecredibility+=15
|
self.downtimecredibility+=15
|
||||||
else:
|
else:
|
||||||
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
|
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(_("Minecraft Wiki seems to be down or unreachable."), _("Connection status"), _("https://i.imgur.com/2jWQEt1.png"))
|
send(_("{wiki} seems to be down or unreachable.").format(wiki=settings["wiki"]), _("Connection status"), _("https://i.imgur.com/2jWQEt1.png"))
|
||||||
self.last_downtime = time.time()
|
self.last_downtime = time.time()
|
||||||
|
|
||||||
recent_changes = recent_changes()
|
recent_changes = recent_changes()
|
||||||
|
|
Loading…
Reference in a new issue