From 4697491320f7db36daec511f34ceac68b4114f15 Mon Sep 17 00:00:00 2001 From: Frisk Date: Fri, 31 Aug 2018 10:27:52 +0200 Subject: [PATCH 01/25] Version 1.3 --- settings.json.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.json.example b/settings.json.example index 5592bf0..b4fa637 100644 --- a/settings.json.example +++ b/settings.json.example @@ -3,7 +3,7 @@ "wiki": "minecraft", "lang": "en", "header": { - "user-agent": "FrisksRcGcDw/1.2" + "user-agent": "FrisksRcGcDw/1.3" }, "limit": 11, "webhookURL": "https://discordapp.com/api/webhooks/111111111111111111/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", From b8b7d8ac561aa3eac67ae43c47a014de82d4c024 Mon Sep 17 00:00:00 2001 From: Frisk Date: Sun, 2 Sep 2018 11:48:58 +0200 Subject: [PATCH 02/25] Added suppresion event, fixed links in some cases, some translations --- locale/en/LC_MESSAGES/rcgcdw.mo | Bin 7418 -> 7545 bytes locale/en/LC_MESSAGES/rcgcdw.po | 206 ++++++++++++++-------------- locale/fr/LC_MESSAGES/rcgcdw.mo | Bin 7984 -> 8125 bytes locale/fr/LC_MESSAGES/rcgcdw.po | 209 +++++++++++++++-------------- locale/pl/LC_MESSAGES/rcgcdw.mo | Bin 8061 -> 8193 bytes locale/pl/LC_MESSAGES/rcgcdw.po | 206 ++++++++++++++-------------- rcgcdw.pot | 230 ++++++++++++++++---------------- rcgcdw.py | 16 ++- settings.json.example | 4 + 9 files changed, 450 insertions(+), 421 deletions(-) diff --git a/locale/en/LC_MESSAGES/rcgcdw.mo b/locale/en/LC_MESSAGES/rcgcdw.mo index fc2b2e4e5c8427dc972d4d11011b0956515aab07..82756d9c38c9db346de799c8cfeb3d640b066463 100644 GIT binary patch delta 2328 zcmb8xTWFVM9Ki8sn^R|6JLqhA*tbD3uO-${2dw=xKg{6pQ$ zbU|#^#U!Gj1Y<#xc2Tq_D1wnn5TS@+7e-N$b&*l@{qFw`yzODX|L1w1_y4}n>G%BE zwWhzClNWPm9SxLjVkuFd5yBzdG@B2~(A*Gi!Kbhok6vA>f`H1^m{Gnj5nbJ>O_-uC)!~*rsK2dKo8`w{yvzDzc`Gnes~#Os$&@8 zDO`!)qPa4Q89bdu3dWDn95l1Hid;0Yvu z!Z~yazeiW#Cv?V{jLrwD(ClwPZiU_GKn|ksIUe8t8eNgA=;_F3+MbRE^u1e=Elq|& zD$eKtnl!`Mh+}9HPGJXLLQh8>PrG#6uoe^O=@>&hoQ%DUbzIM8e@wn+bW1wXq)cL# z=l=*51{q#Oo(U6Z@_mVRbS7^94y(AniVm!Zw>sc@bc@!aTiJ!)A3>A$4Kx`~ph@>W z`rK)p@A?0X3V-1YA51d*j3!MczsC-w03$3yb6|bk-hmEqJK9lq>|XSA?2oUXN540W zZtW}RfW|Rtw!TTl4v(Y9<0EvWpP&zZj&9LZ?0Iyhe#8hfmZg%a6wQ@(Ohe0-6ydR0 zah2S%C*6Ou)p9%0PHZH)iFL#dVy2j!TM3tTd))Xab`dV8D`>fo=p;;5ixaXuo+3OE zy9P7ee~YuVtR-9;O9SyR;mj=_GmA;*YR!};D)-M^pj*~LtS25JEFHwQ=^8&yv2u_7 zlTYC;uPFBt?r|C6Qr;s3sSYVLmyx6^6> delta 2211 zcmX}sT};(w9Ki7(YT+>zJp^JJ9JBdp$n{X7@;9;!96Ue*c zXLP0)(53$u9as^|oR4*AKh2o+K|7Ti>_6Mbl|jGzN~b_MI7p>lvPcxN0<9(;g~@Fd#N=ZRk<`5E6Q_tWU_ zX3!b`g$`%|31O0^&<+c50j@^}x&dvsX(j9L4>$7#s~m0UigaQI2eBIWVFkW}2lFDn z!E1cZ+uf3J^gXX)CBA`t;tUrjHifRh1+?R(SI=!tQI?8XUV{#x4_)#BwBf$w`$;qz z52L?7jV9&qScfHKa0WYZ6o-*9#yNBXzapO~CbMl42dgXqjh(3wu44cMTYr&54sX#=&5)KJr(bx?>&od}CkVBZkBWMnMl6?OaI>2wyj;0f5&{J_Sxxa+|F2(=3GftxeT8k#>dbGbP%z7-g zQE{a0Xv3Z89(5<~MOHB$#|%D)Ce`a`u6&7kXt`yM%h!&}wYj{wHMze5A9VjM4kEWl z=u$hn`-lv27s2~;#lZ~{=E2Rx!^C#NZLpXx4TOVp$t~K%Ni=&y*+Y1aEjJM+>`vlNqK7a~{J*%Dm@n5-xu1B5 zc+3RZMp!%+?z>4?MwAnG5POOFau1dE\n" "Language-Team: \n" "Language: en\n" @@ -15,46 +15,46 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: pygettext.py 1.5\n" -"X-Generator: Poedit 2.0.8\n" +"X-Generator: Poedit 2.1.1\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: rcgcdw.py:124 +#: rcgcdw.py:150 msgid "(N!) " msgstr "(N!) " -#: rcgcdw.py:124 +#: rcgcdw.py:150 msgid "m " msgstr "m " -#: rcgcdw.py:142 rcgcdw.py:168 +#: rcgcdw.py:168 rcgcdw.py:194 msgid "Options" msgstr "Options" -#: rcgcdw.py:142 +#: rcgcdw.py:168 #, python-brace-format msgid "([preview]({link}) | [undo]({undolink}))" msgstr "([preview]({link}) | [undo]({undolink}))" -#: rcgcdw.py:143 +#: rcgcdw.py:169 #, python-brace-format msgid "Uploaded a new version of {name}" msgstr "Uploaded a new version of {name}" -#: rcgcdw.py:145 +#: rcgcdw.py:171 #, python-brace-format msgid "Uploaded {name}" msgstr "Uploaded {name}" -#: rcgcdw.py:158 +#: rcgcdw.py:184 msgid "**No license!**" msgstr "**No license!**" -#: rcgcdw.py:168 +#: rcgcdw.py:194 #, python-brace-format msgid "([preview]({link}))" msgstr "([preview]({link}))" -#: rcgcdw.py:169 +#: rcgcdw.py:195 #, python-brace-format msgid "" "{desc}\n" @@ -63,404 +63,408 @@ msgstr "" "{desc}\n" "License: {license}" -#: rcgcdw.py:172 +#: rcgcdw.py:198 #, python-brace-format msgid "Deleted page {article}" msgstr "Deleted page {article}" -#: rcgcdw.py:175 +#: rcgcdw.py:201 #, python-brace-format msgid "Deleted redirect {article} by overwriting" msgstr "Deleted redirect {article} by overwriting" -#: rcgcdw.py:178 +#: rcgcdw.py:204 msgid "No redirect has been made" msgstr "No redirect has been made" -#: rcgcdw.py:178 +#: rcgcdw.py:204 msgid "A redirect has been made" msgstr "A redirect has been made" -#: rcgcdw.py:179 +#: rcgcdw.py:205 #, python-brace-format msgid "Moved {article} to {target}" msgstr "Moved {article} to {target}" -#: rcgcdw.py:182 +#: rcgcdw.py:208 #, python-brace-format msgid "Moved {article} to {title} over redirect" msgstr "Moved {article} to {title} over redirect" -#: rcgcdw.py:185 +#: rcgcdw.py:211 #, python-brace-format msgid "Moved protection settings from {article} to {title}" msgstr "Moved protection settings from {article} to {title}" -#: rcgcdw.py:189 +#: rcgcdw.py:215 msgid "infinity and beyond" msgstr "infinity and beyond" -#: rcgcdw.py:190 +#: rcgcdw.py:216 #, python-brace-format msgid "Blocked {blocked_user} for {time}" msgstr "Blocked {blocked_user} for {time}" -#: rcgcdw.py:194 +#: rcgcdw.py:220 #, python-brace-format msgid "Changed block settings for {blocked_user}" msgstr "Changed block settings for {blocked_user}" -#: rcgcdw.py:198 +#: rcgcdw.py:224 #, python-brace-format msgid "Unblocked {blocked_user}" msgstr "Unblocked {blocked_user}" -#: rcgcdw.py:202 +#: rcgcdw.py:228 #, python-brace-format msgid "Left a comment on {target}'s profile" msgstr "Left a comment on {target}'s profile" -#: rcgcdw.py:206 +#: rcgcdw.py:232 #, python-brace-format msgid "Replied to a comment on {target}'s profile" msgstr "Replied to a comment on {target}'s profile" -#: rcgcdw.py:210 +#: rcgcdw.py:236 #, python-brace-format msgid "Edited a comment on {target}'s profile" msgstr "Edited a comment on {target}'s profile" -#: rcgcdw.py:214 +#: rcgcdw.py:240 msgid "Location" msgstr "Location" -#: rcgcdw.py:216 +#: rcgcdw.py:242 msgid "About me" msgstr "About me" -#: rcgcdw.py:218 +#: rcgcdw.py:244 msgid "Google link" msgstr "Google link" -#: rcgcdw.py:220 +#: rcgcdw.py:246 msgid "Facebook link" msgstr "Facebook link" -#: rcgcdw.py:222 +#: rcgcdw.py:248 msgid "Twitter link" msgstr "Twitter link" -#: rcgcdw.py:224 +#: rcgcdw.py:250 msgid "Reddit link" msgstr "Reddit link" -#: rcgcdw.py:226 +#: rcgcdw.py:252 msgid "Twitch link" msgstr "Twitch link" -#: rcgcdw.py:228 +#: rcgcdw.py:254 msgid "PSN link" msgstr "PSN link" -#: rcgcdw.py:230 +#: rcgcdw.py:256 msgid "VK link" msgstr "VK link" -#: rcgcdw.py:232 +#: rcgcdw.py:258 msgid "XVL link" msgstr "XVL link" -#: rcgcdw.py:234 +#: rcgcdw.py:260 msgid "Steam link" msgstr "Steam link" -#: rcgcdw.py:236 +#: rcgcdw.py:262 msgid "Unknown" msgstr "Unknown" -#: rcgcdw.py:237 +#: rcgcdw.py:263 #, python-brace-format msgid "Edited {target}'s profile" msgstr "Edited {target}'s profile" -#: rcgcdw.py:238 +#: rcgcdw.py:264 #, python-brace-format msgid "{field} field changed to: {desc}" msgstr "{field} field changed to: {desc}" -#: rcgcdw.py:242 +#: rcgcdw.py:268 #, python-brace-format msgid "Deleted a comment on {target}'s profile" msgstr "Deleted a comment on {target}'s profile" -#: rcgcdw.py:246 +#: rcgcdw.py:272 #, python-brace-format msgid "Changed group membership for {target}" msgstr "Changed group membership for {target}" -#: rcgcdw.py:248 +#: rcgcdw.py:274 msgid "System" msgstr "System" -#: rcgcdw.py:250 +#: rcgcdw.py:276 #, python-brace-format msgid "{target} got autopromoted to a new usergroup" msgstr "{target} got autopromoted to a new usergroup" -#: rcgcdw.py:260 rcgcdw.py:262 +#: rcgcdw.py:286 rcgcdw.py:288 msgid "none" msgstr "none" -#: rcgcdw.py:263 rcgcdw.py:385 +#: rcgcdw.py:289 rcgcdw.py:420 msgid "No description provided" msgstr "No description provided" -#: rcgcdw.py:264 +#: rcgcdw.py:290 #, python-brace-format msgid "Groups changed from {old_groups} to {new_groups}{reason}" msgstr "Groups changed from {old_groups} to {new_groups}{reason}" -#: rcgcdw.py:267 +#: rcgcdw.py:293 #, python-brace-format msgid "Protected {target}" msgstr "Protected {target}" -#: rcgcdw.py:271 +#: rcgcdw.py:297 #, python-brace-format msgid "Changed protection level for {article}" msgstr "Changed protection level for {article}" -#: rcgcdw.py:275 +#: rcgcdw.py:301 #, python-brace-format msgid "Removed protection from {article}" msgstr "Removed protection from {article}" -#: rcgcdw.py:279 +#: rcgcdw.py:305 #, python-brace-format msgid "Changed visibility of revision on page {article} " msgid_plural "Changed visibility of {amount} revisions on page {article} " msgstr[0] "Changed visibility of revision on page {article} " msgstr[1] "Changed visibility of {amount} revisions on page {article} " -#: rcgcdw.py:282 +#: rcgcdw.py:308 #, python-brace-format msgid "Imported {article} with {count} revision" msgid_plural "Imported {article} with {count} revisions" msgstr[0] "Imported {article} with {count} revision" msgstr[1] "Imported {article} with {count} revisions" -#: rcgcdw.py:285 +#: rcgcdw.py:311 #, python-brace-format msgid "Restored {article}" msgstr "Restored {article}" -#: rcgcdw.py:288 +#: rcgcdw.py:314 msgid "Changed visibility of log events" msgstr "Changed visibility of log events" -#: rcgcdw.py:291 +#: rcgcdw.py:317 msgid "Imported interwiki" msgstr "Imported interwiki" -#: rcgcdw.py:294 +#: rcgcdw.py:320 #, python-brace-format msgid "Edited abuse filter number {number}" msgstr "Edited abuse filter number {number}" -#: rcgcdw.py:297 +#: rcgcdw.py:323 #, python-brace-format msgid "Merged revision histories of {article} into {dest}" msgstr "Merged revision histories of {article} into {dest}" -#: rcgcdw.py:300 +#: rcgcdw.py:326 msgid "Added an entry to the interwiki table" msgstr "Added an entry to the interwiki table" -#: rcgcdw.py:301 rcgcdw.py:305 +#: rcgcdw.py:327 rcgcdw.py:331 #, python-brace-format msgid "Prefix: {prefix}, website: {website} | {desc}" msgstr "Prefix: {prefix}, website: {website} | {desc}" -#: rcgcdw.py:304 +#: rcgcdw.py:330 msgid "Edited an entry in interwiki table" msgstr "Edited an entry in interwiki table" -#: rcgcdw.py:308 +#: rcgcdw.py:334 msgid "Deleted an entry in interwiki table" msgstr "Deleted an entry in interwiki table" -#: rcgcdw.py:309 +#: rcgcdw.py:335 #, python-brace-format msgid "Prefix: {prefix} | {desc}" msgstr "Prefix: {prefix} | {desc}" -#: rcgcdw.py:312 +#: rcgcdw.py:338 #, python-brace-format msgid "Changed the content model of the page {article}" msgstr "Changed the content model of the page {article}" -#: rcgcdw.py:313 +#: rcgcdw.py:339 #, python-brace-format msgid "Model changed from {old} to {new}: {reason}" msgstr "Model changed from {old} to {new}: {reason}" -#: rcgcdw.py:316 +#: rcgcdw.py:342 #, python-brace-format msgid "Edited the sprite for {article}" msgstr "Edited the sprite for {article}" -#: rcgcdw.py:319 +#: rcgcdw.py:345 #, python-brace-format msgid "Created the sprite sheet for {article}" msgstr "Created the sprite sheet for {article}" -#: rcgcdw.py:322 +#: rcgcdw.py:348 #, python-brace-format msgid "Edited the slice for {article}" msgstr "Edited the slice for {article}" -#: rcgcdw.py:325 +#: rcgcdw.py:351 #, python-brace-format msgid "Created a tag \"{tag}\"" msgstr "Created a tag \"{tag}\"" -#: rcgcdw.py:329 +#: rcgcdw.py:355 #, python-brace-format msgid "Deleted a tag \"{tag}\"" msgstr "Deleted a tag \"{tag}\"" -#: rcgcdw.py:333 +#: rcgcdw.py:359 #, python-brace-format msgid "Activated a tag \"{tag}\"" msgstr "Activated a tag \"{tag}\"" -#: rcgcdw.py:336 +#: rcgcdw.py:362 #, python-brace-format msgid "Deactivated a tag \"{tag}\"" msgstr "Deactivated a tag \"{tag}\"" -#: rcgcdw.py:357 +#: rcgcdw.py:365 +msgid "Action has been hidden by Gamepedia staff." +msgstr "Action has been hidden by Gamepedia staff." + +#: rcgcdw.py:386 msgid "Tags" msgstr "Tags" -#: rcgcdw.py:480 +#: rcgcdw.py:515 msgid "Unable to process the event" msgstr "Unable to process the event" -#: rcgcdw.py:480 +#: rcgcdw.py:515 msgid "error" msgstr "error" -#: rcgcdw.py:560 +#: rcgcdw.py:597 msgid "Daily overview" msgstr "Daily overview" -#: rcgcdw.py:576 +#: rcgcdw.py:613 msgid " ({} action)" -msgid_plural "({} actions)" +msgid_plural " ({} actions)" msgstr[0] " ({} action)" msgstr[1] " ({} actions)" -#: rcgcdw.py:577 +#: rcgcdw.py:614 msgid " UTC ({} action)" msgid_plural " UTC ({} actions)" msgstr[0] " UTC ({} action)" msgstr[1] " UTC ({} actions)" -#: rcgcdw.py:579 rcgcdw.py:580 +#: rcgcdw.py:616 rcgcdw.py:617 msgid "But nobody came" msgstr "But nobody came" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Most active user" msgid_plural "Most active users" msgstr[0] "Most active user" msgstr[1] "Most active users" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Edits made" msgstr "Edits made" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "New files" msgstr "New files" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Admin actions" msgstr "Admin actions" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Bytes changed" msgstr "Bytes changed" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "New articles" msgstr "New articles" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Unique contributors" msgstr "Unique contributors" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Most active hour" msgid_plural "Most active hours" msgstr[0] "Most active hour" msgstr[1] "Most active hours" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Day score" msgstr "Day score" -#: rcgcdw.py:674 +#: rcgcdw.py:745 #, python-brace-format msgid "Connection to {wiki} seems to be stable now." msgstr "Connection to {wiki} seems to be stable now." -#: rcgcdw.py:674 rcgcdw.py:729 +#: rcgcdw.py:745 rcgcdw.py:804 msgid "Connection status" msgstr "Connection status" -#: rcgcdw.py:729 +#: rcgcdw.py:804 #, python-brace-format msgid "{wiki} seems to be down or unreachable." msgstr "{wiki} seems to be down or unreachable." -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "director" msgstr "Director" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "bot" msgstr "Bot" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "editor" msgstr "Editor" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "directors" msgstr "Directors" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "sysop" msgstr "Administrator" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "bureaucrat" msgstr "Bureaucrat" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "reviewer" msgstr "Reviewer" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "autoreview" msgstr "Autoreview" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "autopatrol" msgstr "Autopatrol" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "wiki_guardian" msgstr "Wiki guardian" diff --git a/locale/fr/LC_MESSAGES/rcgcdw.mo b/locale/fr/LC_MESSAGES/rcgcdw.mo index f492b2b3949e33644de8f1ba009ea6854a0838e0..a9553ac4bf0388584053f9aeb570812641f83e1c 100644 GIT binary patch delta 2335 zcmYk+e@xVM9LMoD0&x&39Eg#k-+=g~AP0xtp@D{h6$O%Mg=WXyk!&8nj+WKdZT3f+ z=%&=%!d08B#%fe!wYAB#v3@LTt1W9SXKik+Khj!1+^Y5C`MUeE{OsQM_q=_CQ$>-rGBtav6|y=P#0w8m{s5!T!%gA-~o)` zDa^&@0;87{+a)OG#11dkv?+DR;CetU&ZB`40JF8Be<@EGa?vmg5!F))lba23(12unRTe zlddmfBggOI3j7_bFrRH?4c3gh(+ zUs!`Bd8yyGqVBL4RWALQficu|qo{>Eg<9ZYRBgP9s+qHS?7vp>1t%Q5fXrckqs}iT zp<3WF)I_UXtC2c2zk3`&{jUvm$DODJ?LZalZq$TfT!fFI7Wza!`>zWV?jH{#yKhHP zTXhm0dVwl4c zyo%LWNF{2kT2NcQ6LrA>*9qLf@f4~kze68pQL#Y`Vl&3^7|x&;vWY@aO>IX#?ulpU z)YF+lK6aij?Z9PB<{WiF39C_+ccboX2pycnTkteC;%}(`SFwE>w-fc38bO!ZQoO3;odOE(vggW2T(Lk3`kH=Ni0DrjW|3%&{<{^Q4JeQ*uQi-hDHluRB z2UV=cF%8x3O<@nX3jIeZ+oSv|hib~rHsVeqOelA~#6r^o?jw|{2i=o9v5(MQDn)9y z6FUg)pqg$-ZC46=$W=v~srSE{@}jnh(2l4z5%&-(PBrCNO?RqCX`uz_v@aZ>Qr1S? zMraO`A zk3J7c@_FZVU|ocs3>9%Hv6WD3NoHr_<%0H!qn?q9p+RSFDDLz{qjUx$5$Jo|=?KN5 z!_mk<$cc}I`upo<|MZk)X9sKR8yugnxpAVxyE=aXxDaDZ+#WPBaeFcDKKNjwPBIa<@2@?a^xx09z4xB=f7)Apwkq+& zn{mu2&BS=3Jl*U7&KbxTB|g|}4A$aA+=7{S5KHg~=HhwG##=ZVA0r=o&sRS7;bhG9 zm<_`y`pptnLq#vPxEp)1lZIo`!Q{ET|fJH%`_ zMv+%7j+#&%7Sq4AQqc=XaT5NCqwo%v;ww}`*+WzJXQ5W20SmAL3-KhX;mb(h_5d~0 zXGjzF4kOryUJP@yj{dENN)aAME!hVK2(RrOhYcj8Mp(-;b|hg#~}s0aUZ4kSZobDfV$ z#(E558%FUjjNxni4gF-W2GE1br5mW@{RyXIK8c~+NW}Tp%o|aAy%Y7quc++4hMLiH z^x<$uS&0Fhf!k5fpFlNy2ld`J)Qk&QPOVTCYGs@FQh)78t|Y9JN|YatA${0g+=_2d z4K5y=N~#VFaNUU-&;``iymETkkNI3zqqb^4&cbeFx9q9&Ju1mFSdOte|M^sujUiN0 z#E@rf0jh(|$g0^9WW;s`^~dx#hVec!R?A{Tm8?amb^@qmi=f_{i#ipxsQ;PO=%;^c zqr$e?Nz_38LCyRks^Pcp_e|DR4G%+gG|K5mC0{wJqY&yeR5|0QQ&Hz!hia!06FL?x zRMbGLyRjSj&#-pXvHS%!kmJZ$>|fNL-$Ny9CL7J6NR}U*{nYeVkjHI-yPk;~wf`y_ zgqB7{d!x)Ijve39Z^vB0?zXNP3$?Oe9JO9aSxTEuqptG!n`S zZFzG3N`_^+pyUurHkEW@5iy%kKB&ZqIH4n`vYgOXsZk($6B~&BvYN^~ccJ50@9I(1X;?@!={H|Vdxx)S%bu29 zJ4>xAF}S;@-c#W5R89+qe8FHW)YaxK%t~EFV&P!d8Sjhq=@pTl&fIWX+Wg-~Pv{w$ H*PZnp=Q_4# diff --git a/locale/fr/LC_MESSAGES/rcgcdw.po b/locale/fr/LC_MESSAGES/rcgcdw.po index 447fe96..8ff41a3 100644 --- a/locale/fr/LC_MESSAGES/rcgcdw.po +++ b/locale/fr/LC_MESSAGES/rcgcdw.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-07-12 11:29+0200\n" -"PO-Revision-Date: 2018-07-12 18:41+0200\n" +"POT-Creation-Date: 2018-09-02 11:39+0200\n" +"PO-Revision-Date: 2018-09-02 11:44+0200\n" "Last-Translator: JSBM\n" "Language-Team: \n" "Language: fr\n" @@ -15,48 +15,48 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: pygettext.py 1.5\n" -"X-Generator: Poedit 2.0.8\n" +"X-Generator: Poedit 2.1.1\n" "X-Poedit-Basepath: ../../..\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Poedit-SearchPath-0: rcgcdw.pot\n" -#: rcgcdw.py:124 +#: rcgcdw.py:150 msgid "(N!) " msgstr "(N!) " -#: rcgcdw.py:124 +#: rcgcdw.py:150 msgid "m " msgstr "m " -#: rcgcdw.py:142 rcgcdw.py:168 +#: rcgcdw.py:168 rcgcdw.py:194 msgid "Options" msgstr "Options" -#: rcgcdw.py:142 +#: rcgcdw.py:168 #, python-brace-format msgid "([preview]({link}) | [undo]({undolink}))" msgstr "([Aperçu]({link}) | [Annuler]({undolink}))" -#: rcgcdw.py:143 +#: rcgcdw.py:169 #, python-brace-format msgid "Uploaded a new version of {name}" msgstr "Téléversement d'une nouvelle version de {name}" -#: rcgcdw.py:145 +#: rcgcdw.py:171 #, python-brace-format msgid "Uploaded {name}" msgstr "Téléversement de {name}" -#: rcgcdw.py:158 +#: rcgcdw.py:184 msgid "**No license!**" msgstr "**Aucune license!**" -#: rcgcdw.py:168 +#: rcgcdw.py:194 #, python-brace-format msgid "([preview]({link}))" msgstr "([Aperçu]({link}))" -#: rcgcdw.py:169 +#: rcgcdw.py:195 #, python-brace-format msgid "" "{desc}\n" @@ -65,405 +65,410 @@ msgstr "" "{desc}\n" "License: {license}" -#: rcgcdw.py:172 +#: rcgcdw.py:198 #, python-brace-format msgid "Deleted page {article}" msgstr "Suppression de la page {article}" -#: rcgcdw.py:175 +#: rcgcdw.py:201 #, python-brace-format msgid "Deleted redirect {article} by overwriting" msgstr "Suppression par écrasement de la redirection {article}" -#: rcgcdw.py:178 +#: rcgcdw.py:204 msgid "No redirect has been made" msgstr "Aucune redirection créée" -#: rcgcdw.py:178 +#: rcgcdw.py:204 msgid "A redirect has been made" msgstr "Une redirection a été créée" -#: rcgcdw.py:179 +#: rcgcdw.py:205 #, python-brace-format msgid "Moved {article} to {target}" msgstr "Déplacement de {article} vers {target}" -#: rcgcdw.py:182 +#: rcgcdw.py:208 #, python-brace-format msgid "Moved {article} to {title} over redirect" msgstr "Déplacement de {article} vers {title} par redirection" -#: rcgcdw.py:185 +#: rcgcdw.py:211 #, python-brace-format msgid "Moved protection settings from {article} to {title}" msgstr "Transfert des paramètres de protection de {article} vers {title}" -#: rcgcdw.py:189 +#: rcgcdw.py:215 msgid "infinity and beyond" msgstr "toujours" -#: rcgcdw.py:190 +#: rcgcdw.py:216 #, python-brace-format msgid "Blocked {blocked_user} for {time}" msgstr "{blocked_user} a été bloqué pour {time}" -#: rcgcdw.py:194 +#: rcgcdw.py:220 #, python-brace-format msgid "Changed block settings for {blocked_user}" msgstr "Modification des paramètres de blocage pour {blocked_user}" -#: rcgcdw.py:198 +#: rcgcdw.py:224 #, python-brace-format msgid "Unblocked {blocked_user}" msgstr "{blocked_user} a été débloqué" -#: rcgcdw.py:202 +#: rcgcdw.py:228 #, python-brace-format msgid "Left a comment on {target}'s profile" msgstr "Ajout d'un commentaire sur le profil de {target}" -#: rcgcdw.py:206 +#: rcgcdw.py:232 #, python-brace-format msgid "Replied to a comment on {target}'s profile" msgstr "Réponse à un commentaire sur le profil de {target}" -#: rcgcdw.py:210 +#: rcgcdw.py:236 #, python-brace-format msgid "Edited a comment on {target}'s profile" msgstr "Édition d'un commentaire sur le profil de {target}" -#: rcgcdw.py:214 +#: rcgcdw.py:240 msgid "Location" msgstr "Emplacement" -#: rcgcdw.py:216 +#: rcgcdw.py:242 msgid "About me" msgstr "À propos de moi" -#: rcgcdw.py:218 +#: rcgcdw.py:244 msgid "Google link" msgstr "Lien Google" -#: rcgcdw.py:220 +#: rcgcdw.py:246 msgid "Facebook link" msgstr "Lien Facebook" -#: rcgcdw.py:222 +#: rcgcdw.py:248 msgid "Twitter link" msgstr "Lien Twitter" -#: rcgcdw.py:224 +#: rcgcdw.py:250 msgid "Reddit link" msgstr "Lien Reddit" -#: rcgcdw.py:226 +#: rcgcdw.py:252 msgid "Twitch link" msgstr "Lien Twitch" -#: rcgcdw.py:228 +#: rcgcdw.py:254 msgid "PSN link" msgstr "Lien PSN" -#: rcgcdw.py:230 +#: rcgcdw.py:256 msgid "VK link" msgstr "Lien VK" -#: rcgcdw.py:232 +#: rcgcdw.py:258 msgid "XVL link" msgstr "Lien XVL" -#: rcgcdw.py:234 +#: rcgcdw.py:260 msgid "Steam link" msgstr "Lien Steam" -#: rcgcdw.py:236 +#: rcgcdw.py:262 msgid "Unknown" msgstr "Inconnu" -#: rcgcdw.py:237 +#: rcgcdw.py:263 #, python-brace-format msgid "Edited {target}'s profile" msgstr "Modification du profil de {target}" -#: rcgcdw.py:238 +#: rcgcdw.py:264 #, python-brace-format msgid "{field} field changed to: {desc}" msgstr "{field} modifié pour: {desc}" -#: rcgcdw.py:242 +#: rcgcdw.py:268 #, python-brace-format msgid "Deleted a comment on {target}'s profile" msgstr "Retrait d'un commentaire sur le profil de {target}" -#: rcgcdw.py:246 +#: rcgcdw.py:272 #, python-brace-format msgid "Changed group membership for {target}" msgstr "Modification des groupes pour {target}" -#: rcgcdw.py:248 +#: rcgcdw.py:274 msgid "System" msgstr "Système" -#: rcgcdw.py:250 +#: rcgcdw.py:276 #, python-brace-format msgid "{target} got autopromoted to a new usergroup" msgstr "{target} a été auto-promu dans un nouveau groupe" -#: rcgcdw.py:260 rcgcdw.py:262 +#: rcgcdw.py:286 rcgcdw.py:288 msgid "none" msgstr "aucun" -#: rcgcdw.py:263 rcgcdw.py:385 +#: rcgcdw.py:289 rcgcdw.py:420 msgid "No description provided" msgstr "Aucune description" -#: rcgcdw.py:264 +#: rcgcdw.py:290 #, python-brace-format msgid "Groups changed from {old_groups} to {new_groups}{reason}" msgstr "Groupe modifié de {old_groups} vers {new_groups}{reason}" -#: rcgcdw.py:267 +#: rcgcdw.py:293 #, python-brace-format msgid "Protected {target}" msgstr "Protection de {target}" -#: rcgcdw.py:271 +#: rcgcdw.py:297 #, python-brace-format msgid "Changed protection level for {article}" msgstr "Modification du niveau de protection de {article}" -#: rcgcdw.py:275 +#: rcgcdw.py:301 #, python-brace-format msgid "Removed protection from {article}" msgstr "Retrait de la protection de {article}" -#: rcgcdw.py:279 +#: rcgcdw.py:305 #, python-brace-format msgid "Changed visibility of revision on page {article} " msgid_plural "Changed visibility of {amount} revisions on page {article} " msgstr[0] "Modification de la visibilité d'une révision de la page {article} " -msgstr[1] "Modification de la visibilité de {amount} révisions sur la page {article} " +msgstr[1] "" +"Modification de la visibilité de {amount} révisions sur la page {article} " -#: rcgcdw.py:282 +#: rcgcdw.py:308 #, python-brace-format msgid "Imported {article} with {count} revision" msgid_plural "Imported {article} with {count} revisions" msgstr[0] "Article {article} importé avec {count} révision" msgstr[1] "Article {article} importé avec {count} révisions" -#: rcgcdw.py:285 +#: rcgcdw.py:311 #, python-brace-format msgid "Restored {article}" msgstr "Restauration de {article}" -#: rcgcdw.py:288 +#: rcgcdw.py:314 msgid "Changed visibility of log events" msgstr "Modification de la visibilité d'évènements des journaux" -#: rcgcdw.py:291 +#: rcgcdw.py:317 msgid "Imported interwiki" msgstr "Importation d'interwiki" -#: rcgcdw.py:294 +#: rcgcdw.py:320 #, python-brace-format msgid "Edited abuse filter number {number}" msgstr "Édition de la règle {number} du filtre anti-abus" -#: rcgcdw.py:297 +#: rcgcdw.py:323 #, python-brace-format msgid "Merged revision histories of {article} into {dest}" msgstr "Fusion de l'historique de {article} vers {dest}" -#: rcgcdw.py:300 +#: rcgcdw.py:326 msgid "Added an entry to the interwiki table" msgstr "Ajout d'une entrée à la table interwiki" -#: rcgcdw.py:301 rcgcdw.py:305 +#: rcgcdw.py:327 rcgcdw.py:331 #, python-brace-format msgid "Prefix: {prefix}, website: {website} | {desc}" msgstr "Préfixe: {prefix}, site: {website} | {desc}" -#: rcgcdw.py:304 +#: rcgcdw.py:330 msgid "Edited an entry in interwiki table" msgstr "Modification d'une entrée de la table interwiki" -#: rcgcdw.py:308 +#: rcgcdw.py:334 msgid "Deleted an entry in interwiki table" msgstr "Retrait d'une entrée de la table interwiki" -#: rcgcdw.py:309 +#: rcgcdw.py:335 #, python-brace-format msgid "Prefix: {prefix} | {desc}" msgstr "Préfixe: {prefix} | {desc}" -#: rcgcdw.py:312 +#: rcgcdw.py:338 #, python-brace-format msgid "Changed the content model of the page {article}" msgstr "Modification du modèle de contenu de l'article {article}" -#: rcgcdw.py:313 +#: rcgcdw.py:339 #, python-brace-format msgid "Model changed from {old} to {new}: {reason}" msgstr "Modèle changé de {old} à {new}: {reason}" -#: rcgcdw.py:316 +#: rcgcdw.py:342 #, python-brace-format msgid "Edited the sprite for {article}" msgstr "Édition du sprite de {article}" -#: rcgcdw.py:319 +#: rcgcdw.py:345 #, python-brace-format msgid "Created the sprite sheet for {article}" msgstr "Création d'une feuille de sprite pour {article}" -#: rcgcdw.py:322 +#: rcgcdw.py:348 #, python-brace-format msgid "Edited the slice for {article}" msgstr "Edited the slice for {article}" -#: rcgcdw.py:325 +#: rcgcdw.py:351 #, python-brace-format msgid "Created a tag \"{tag}\"" msgstr "Création du tag « {tag} »" -#: rcgcdw.py:329 +#: rcgcdw.py:355 #, python-brace-format msgid "Deleted a tag \"{tag}\"" msgstr "Suppression du tag « {tag} »" -#: rcgcdw.py:333 +#: rcgcdw.py:359 #, python-brace-format msgid "Activated a tag \"{tag}\"" msgstr "Activation du tag « {tag} »" -#: rcgcdw.py:336 +#: rcgcdw.py:362 #, python-brace-format msgid "Deactivated a tag \"{tag}\"" msgstr "Désactivation du tag « {tag} »" -#: rcgcdw.py:357 +#: rcgcdw.py:365 +msgid "Action has been hidden by Gamepedia staff." +msgstr "L'action a été masquée par le personnel de Gamepedia." + +#: rcgcdw.py:386 msgid "Tags" msgstr "Tags" -#: rcgcdw.py:480 +#: rcgcdw.py:515 msgid "Unable to process the event" msgstr "Impossible d'analyser l'évènement" -#: rcgcdw.py:480 +#: rcgcdw.py:515 msgid "error" msgstr "erreur" -#: rcgcdw.py:560 +#: rcgcdw.py:597 msgid "Daily overview" msgstr "Résumé de la journée" -#: rcgcdw.py:576 +#: rcgcdw.py:613 msgid " ({} action)" -msgid_plural "({} actions)" +msgid_plural " ({} actions)" msgstr[0] " ({} action)" msgstr[1] " ({} actions)" -#: rcgcdw.py:577 +#: rcgcdw.py:614 msgid " UTC ({} action)" msgid_plural " UTC ({} actions)" msgstr[0] " UTC ({} action)" msgstr[1] " UTC ({} actions)" -#: rcgcdw.py:579 rcgcdw.py:580 +#: rcgcdw.py:616 rcgcdw.py:617 msgid "But nobody came" msgstr "Aucune activité" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Most active user" msgid_plural "Most active users" msgstr[0] "Membre le plus actif" msgstr[1] "Membres les plus actifs" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Edits made" msgstr "Modifications effectuées" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "New files" msgstr "Nouveaux fichiers" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Admin actions" msgstr "Actions d'administrateur" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Bytes changed" msgstr "Octets modifiés" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "New articles" msgstr "Nouveaux articles" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Unique contributors" msgstr "Contributeurs uniques" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Most active hour" msgid_plural "Most active hours" msgstr[0] "Heure la plus active" msgstr[1] "Heures les plus actives" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Day score" msgstr "Score du jour" -#: rcgcdw.py:674 +#: rcgcdw.py:745 #, python-brace-format msgid "Connection to {wiki} seems to be stable now." msgstr "La connexion avec {wiki} semble stable maintenant." -#: rcgcdw.py:674 rcgcdw.py:729 +#: rcgcdw.py:745 rcgcdw.py:804 msgid "Connection status" msgstr "Statut de connexion" -#: rcgcdw.py:729 +#: rcgcdw.py:804 #, python-brace-format msgid "{wiki} seems to be down or unreachable." msgstr "{wiki} semble être down ou inatteignable." -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "director" msgstr "Directeur" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "bot" msgstr "Robot" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "editor" msgstr "editor" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "directors" msgstr "Directeur" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "sysop" msgstr "Administrateur" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "bureaucrat" msgstr "Bureaucrate" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "reviewer" msgstr "reviewer" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "autoreview" msgstr "autoreview" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "autopatrol" msgstr "autopatrol" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "wiki_guardian" msgstr "Gardien du wiki" diff --git a/locale/pl/LC_MESSAGES/rcgcdw.mo b/locale/pl/LC_MESSAGES/rcgcdw.mo index b469ff87c50c5add776c301f04c91d548eb30008..012700dc066162ec3f8937453096a226e72fac0c 100644 GIT binary patch delta 2340 zcmYk-e@sRU9bsOtY2vD3;=Ln1OGh4^LqMp2chN54;Z3 zvdpMjF$QoQF2_#19(QA|S;CG`S<8iK)C1m2-LNmw&-o9i1{v9A44dPNff;`e@a0UI_YgBIF!f8~4U$G3Y;4&=DNe!d{^`Hpq{VI%TCICtkNRCJ>W#Oe2Gom6)?KI$BbbJdqXs&W&-|-l!u{bPWcKZO)Ktx& zgYRG^euv5x57YD660V_g;V+(Eg)0kF9d1GWz6<%Y{Twu-FQ8`f1ZsevB&ew2SEyvW zf=Z$yGEq}ihsuds=b$kaw&lP)Dpc^ z)WII)0leQ&fY0Py_RF(D$MO`>-8r@m177zDNEnjfZH)ic!0y6}5}{ zk^T~Pn2M%+8kICB@kTs_^koaEUE<*@bQ3;}%8hqX5B>!smoSHU(wjG-2CxIw!A>MSEPN4_z(88y%z3}74^ zaoRmUgKUmu(UPd#n<9Bsn+oCqt*o+FMQgsD*g`~z7NU<>Eb6$2(AwSSUc4Lo2@RfQ zP8O|kFQH^r(F>{UOkwxCDwi^nnMFl!tI|wpMpWvEZG_%jMcYb6$)+v1SQ@BoUOYi9 zO)GILaTlS|P27{L@o{n$wq^ zENgO|(=kM7J8LT{2b8$Vk&T3kcF0;n{U`T#8|u@kqU=`2E7|TK?j-z#L;SzgbE0)u z38qLM`FbaJ5^0e926Upn4I7A3qMcCL#6L-%>f5*92}j0bBg1}krg}3^mX8cO4~55^ z{%Dj+Y+wNT_d0Fip=dlh5DPnF=9&sxmQ+O^4m%SgwEOr#*m>-c(Y@ngCq6n6op9pO(Xo-?=$`)`9}8N`RB-vS Kxub;(+5ZA2aM{EF delta 2206 zcmXxlduWwq9KiA4rZ%V9=GK}zbH}{w>h8IVHfNceb}_dsFKKN;Y0UbgdtqlHltHXw zMUVq2BAI_gW)XoRMMm?F#GtZ&q_Cntf=iS48=kvVhJMY#r4Z*gX6dyf5dwH4^vn-D`FpR!nt?~Yw;YG;1#r8 z(d>xpupMa{J?Mmbv4Z|%kcti7#3gtPZ@_P{3V%Z%RB&zf{z`Nuw&Nn)kL5UuKKLZk zcl?0P^cUn2F@bG3iAC7L&0hMCZYoRh9dyY~V-tRZH8_cOSiv-OBR1ncEW>xP5>Fw| zj^ELl{*5mERdiq_EOQ>#qy4mE+8bR|R^WDYWQWiZA4c{lj$$>AC-*O-Gt4WDFinbZ zI?hMiEkXxUjSjFC&51rVR|e663>C8eDJqBff@j89a^rJ!gkPW?olX26$8$J2{gx^Pg5~@-awb=IGPJ*(Y>2Mo)vjy zs9R8mcDNoZ@oDsw9Kjp$3?9QvX!~J$F^4`tzKZYA=l_AsA<}dBl}lWX&b%6%aUI&= zS#)5-==_Jb(5Vm40$RA@G%0o=ea9o{ULHUje28ZE8T1&Q$5nVax!=J0yOQ1L9`~Zjwhe8!3q2K&qFe9` zE^wx!RGj%|=m5^49b7=RKPJ)RQpkFGe;)ExEKXd5o{F950Q%A24JOx5CD%jfz+OQI z^g5Ca%)mdBW2(#Zz-9lL00`tND1vNx3VOdX@H+K_lgvm*gXOhtEt0c^PmwW?Z*-kt} zxZ0ksOs4xH+2jR<7g#3Qth=Xo5GGjzVR6}eh|I~rdkDA4(n*;4X8m2nX2N_}M%+(K z6?11Bv5R=v*XAvR#Uym!O*XbP^TxUpA0Vd6eN?)V3tvPYK}$Q~`(PvCag0>u3;R?3 zyPw?q_+wQulAbwsqA!1GetzqU#->zbV@K1-P*M4;>{U}obIZtB(WPk(b!{hJD_)!P JaY@eX{{i*;w=Dnw diff --git a/locale/pl/LC_MESSAGES/rcgcdw.po b/locale/pl/LC_MESSAGES/rcgcdw.po index 43235ca..26f7aec 100644 --- a/locale/pl/LC_MESSAGES/rcgcdw.po +++ b/locale/pl/LC_MESSAGES/rcgcdw.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: RcGcDw\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-07-12 11:29+0200\n" -"PO-Revision-Date: 2018-07-12 12:34+0200\n" +"POT-Creation-Date: 2018-09-02 11:39+0200\n" +"PO-Revision-Date: 2018-09-02 11:43+0200\n" "Last-Translator: Frisk \n" "Language-Team: \n" "Language: pl\n" @@ -15,47 +15,47 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: pygettext.py 1.5\n" -"X-Generator: Poedit 2.0.8\n" +"X-Generator: Poedit 2.1.1\n" "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:124 +#: rcgcdw.py:150 msgid "(N!) " msgstr "(N!) " -#: rcgcdw.py:124 +#: rcgcdw.py:150 msgid "m " msgstr "d " -#: rcgcdw.py:142 rcgcdw.py:168 +#: rcgcdw.py:168 rcgcdw.py:194 msgid "Options" msgstr "Opcje" -#: rcgcdw.py:142 +#: rcgcdw.py:168 #, python-brace-format msgid "([preview]({link}) | [undo]({undolink}))" msgstr "([podgląd]({link}) | [wycofaj]({undolink}))" -#: rcgcdw.py:143 +#: rcgcdw.py:169 #, python-brace-format msgid "Uploaded a new version of {name}" msgstr "Przesłał(a) nową wersję {name}" -#: rcgcdw.py:145 +#: rcgcdw.py:171 #, python-brace-format msgid "Uploaded {name}" msgstr "Przesłał(a) {name}" -#: rcgcdw.py:158 +#: rcgcdw.py:184 msgid "**No license!**" msgstr "**Brak licencji!**" -#: rcgcdw.py:168 +#: rcgcdw.py:194 #, python-brace-format msgid "([preview]({link}))" msgstr "([podgląd]({link}))" -#: rcgcdw.py:169 +#: rcgcdw.py:195 #, python-brace-format msgid "" "{desc}\n" @@ -64,181 +64,181 @@ msgstr "" "{desc}\n" "Licencja: {license}" -#: rcgcdw.py:172 +#: rcgcdw.py:198 #, python-brace-format msgid "Deleted page {article}" msgstr "Usunął/usunęła {article}" -#: rcgcdw.py:175 +#: rcgcdw.py:201 #, python-brace-format msgid "Deleted redirect {article} by overwriting" msgstr "" "Usunął/usunęła przekierowanie ({article}) aby utworzyć miejsce dla " "przenoszonej strony" -#: rcgcdw.py:178 +#: rcgcdw.py:204 msgid "No redirect has been made" msgstr "Nie utworzono przekierowania" -#: rcgcdw.py:178 +#: rcgcdw.py:204 msgid "A redirect has been made" msgstr "Zostało utworzone przekierowanie" -#: rcgcdw.py:179 +#: rcgcdw.py:205 #, python-brace-format msgid "Moved {article} to {target}" msgstr "Przeniósł/przeniosła {article} do {target}" -#: rcgcdw.py:182 +#: rcgcdw.py:208 #, python-brace-format msgid "Moved {article} to {title} over redirect" msgstr "Przeniósł/przeniosła {article} do strony przekierowującej {title}" -#: rcgcdw.py:185 +#: rcgcdw.py:211 #, python-brace-format msgid "Moved protection settings from {article} to {title}" msgstr "Przeniesiono ustawienia zabezpieczeń z {article} do {title}" -#: rcgcdw.py:189 +#: rcgcdw.py:215 msgid "infinity and beyond" msgstr "wieczność" -#: rcgcdw.py:190 +#: rcgcdw.py:216 #, python-brace-format msgid "Blocked {blocked_user} for {time}" msgstr "Zablokowano {blocked_user} na {time}" -#: rcgcdw.py:194 +#: rcgcdw.py:220 #, python-brace-format msgid "Changed block settings for {blocked_user}" msgstr "Zmienił ustawienia blokady {blocked_user}" -#: rcgcdw.py:198 +#: rcgcdw.py:224 #, python-brace-format msgid "Unblocked {blocked_user}" msgstr "Odblokował {blocked_user}" -#: rcgcdw.py:202 +#: rcgcdw.py:228 #, python-brace-format msgid "Left a comment on {target}'s profile" msgstr "Pozostawiono komentarz na profilu użytkownika {target}" -#: rcgcdw.py:206 +#: rcgcdw.py:232 #, python-brace-format msgid "Replied to a comment on {target}'s profile" msgstr "Odpowiedziano na komentarz na profilu użytkownika {target}" -#: rcgcdw.py:210 +#: rcgcdw.py:236 #, python-brace-format msgid "Edited a comment on {target}'s profile" msgstr "Edytowano komentarz na profilu użytkownika {target}" -#: rcgcdw.py:214 +#: rcgcdw.py:240 msgid "Location" msgstr "Lokacja" -#: rcgcdw.py:216 +#: rcgcdw.py:242 msgid "About me" msgstr "O mnie" -#: rcgcdw.py:218 +#: rcgcdw.py:244 msgid "Google link" msgstr "link Google" -#: rcgcdw.py:220 +#: rcgcdw.py:246 msgid "Facebook link" msgstr "link Facebook" -#: rcgcdw.py:222 +#: rcgcdw.py:248 msgid "Twitter link" msgstr "link Twitter" -#: rcgcdw.py:224 +#: rcgcdw.py:250 msgid "Reddit link" msgstr "link Reddit" -#: rcgcdw.py:226 +#: rcgcdw.py:252 msgid "Twitch link" msgstr "link Twitch" -#: rcgcdw.py:228 +#: rcgcdw.py:254 msgid "PSN link" msgstr "link PSN" -#: rcgcdw.py:230 +#: rcgcdw.py:256 msgid "VK link" msgstr "link VK" -#: rcgcdw.py:232 +#: rcgcdw.py:258 msgid "XVL link" msgstr "link XVL" -#: rcgcdw.py:234 +#: rcgcdw.py:260 msgid "Steam link" msgstr "link Steam" -#: rcgcdw.py:236 +#: rcgcdw.py:262 msgid "Unknown" msgstr "Nieznana" -#: rcgcdw.py:237 +#: rcgcdw.py:263 #, python-brace-format msgid "Edited {target}'s profile" msgstr "Edytowano profil użytkownika {target}" -#: rcgcdw.py:238 +#: rcgcdw.py:264 #, python-brace-format msgid "{field} field changed to: {desc}" msgstr "pole {field} zostało zmienione na: {desc}" -#: rcgcdw.py:242 +#: rcgcdw.py:268 #, python-brace-format msgid "Deleted a comment on {target}'s profile" msgstr "Usunął komentarz na profilu użytkownika {target}" -#: rcgcdw.py:246 +#: rcgcdw.py:272 #, python-brace-format msgid "Changed group membership for {target}" msgstr "Zmieniono przynależność do grup dla {target}" -#: rcgcdw.py:248 +#: rcgcdw.py:274 msgid "System" msgstr "System" -#: rcgcdw.py:250 +#: rcgcdw.py:276 #, python-brace-format msgid "{target} got autopromoted to a new usergroup" msgstr "{target} automatycznie otrzymał nową grupę użytkownika" -#: rcgcdw.py:260 rcgcdw.py:262 +#: rcgcdw.py:286 rcgcdw.py:288 msgid "none" msgstr "brak" -#: rcgcdw.py:263 rcgcdw.py:385 +#: rcgcdw.py:289 rcgcdw.py:420 msgid "No description provided" msgstr "Nie podano opisu zmian" -#: rcgcdw.py:264 +#: rcgcdw.py:290 #, python-brace-format msgid "Groups changed from {old_groups} to {new_groups}{reason}" msgstr "Grupy zmienione z {old_groups} do {new_groups}{reason}" -#: rcgcdw.py:267 +#: rcgcdw.py:293 #, python-brace-format msgid "Protected {target}" msgstr "Zabezpieczono {target}" -#: rcgcdw.py:271 +#: rcgcdw.py:297 #, python-brace-format msgid "Changed protection level for {article}" msgstr "Zmieniono poziom zabezpieczeń {article}" -#: rcgcdw.py:275 +#: rcgcdw.py:301 #, python-brace-format msgid "Removed protection from {article}" msgstr "Usunięto zabezpieczenie {article}" -#: rcgcdw.py:279 +#: rcgcdw.py:305 #, python-brace-format msgid "Changed visibility of revision on page {article} " msgid_plural "Changed visibility of {amount} revisions on page {article} " @@ -246,7 +246,7 @@ msgstr[0] "Zmieniono widoczność wersji na stronie {article}" msgstr[1] "Zmieniono widoczność {amount} wersji na stronie {article}" msgstr[2] "Zmieniono widoczność {amount} wersji na stronie {article}" -#: rcgcdw.py:282 +#: rcgcdw.py:308 #, python-brace-format msgid "Imported {article} with {count} revision" msgid_plural "Imported {article} with {count} revisions" @@ -254,223 +254,227 @@ msgstr[0] "Zaimportowano {article} z {count} wersją" msgstr[1] "Zaimportowano {article} z {count} wersjami" msgstr[2] "Zaimportowano {article} z {count} wersjami" -#: rcgcdw.py:285 +#: rcgcdw.py:311 #, python-brace-format msgid "Restored {article}" msgstr "Przywrócono {article}" -#: rcgcdw.py:288 +#: rcgcdw.py:314 msgid "Changed visibility of log events" msgstr "Zmieniono widoczność logów" -#: rcgcdw.py:291 +#: rcgcdw.py:317 msgid "Imported interwiki" msgstr "Zaimportowano interwiki" -#: rcgcdw.py:294 +#: rcgcdw.py:320 #, python-brace-format msgid "Edited abuse filter number {number}" msgstr "Edytowano filtr nadużyć numer {number}" -#: rcgcdw.py:297 +#: rcgcdw.py:323 #, python-brace-format msgid "Merged revision histories of {article} into {dest}" msgstr "Połączono historie {article} z {dest}" -#: rcgcdw.py:300 +#: rcgcdw.py:326 msgid "Added an entry to the interwiki table" msgstr "Dodano wpis do tabeli interwiki" -#: rcgcdw.py:301 rcgcdw.py:305 +#: rcgcdw.py:327 rcgcdw.py:331 #, python-brace-format msgid "Prefix: {prefix}, website: {website} | {desc}" msgstr "Prefix: {prefix}, strona: {website} | {desc}" -#: rcgcdw.py:304 +#: rcgcdw.py:330 msgid "Edited an entry in interwiki table" msgstr "Edytowano wpis interwiki" -#: rcgcdw.py:308 +#: rcgcdw.py:334 msgid "Deleted an entry in interwiki table" msgstr "Usunięto wpis interwiki" -#: rcgcdw.py:309 +#: rcgcdw.py:335 #, python-brace-format msgid "Prefix: {prefix} | {desc}" msgstr "Prefix: {prefix} | {desc}" -#: rcgcdw.py:312 +#: rcgcdw.py:338 #, python-brace-format msgid "Changed the content model of the page {article}" msgstr "Zmieniono model zawartości {article}" -#: rcgcdw.py:313 +#: rcgcdw.py:339 #, python-brace-format msgid "Model changed from {old} to {new}: {reason}" msgstr "Model został zmieniony z {old} na {new}: {reason}" -#: rcgcdw.py:316 +#: rcgcdw.py:342 #, python-brace-format msgid "Edited the sprite for {article}" msgstr "Edytowano sprite dla {article}" -#: rcgcdw.py:319 +#: rcgcdw.py:345 #, python-brace-format msgid "Created the sprite sheet for {article}" msgstr "Utworzono sprite sheet dla {article}" -#: rcgcdw.py:322 +#: rcgcdw.py:348 #, python-brace-format msgid "Edited the slice for {article}" msgstr "Edytowano część sprite dla {article}" -#: rcgcdw.py:325 +#: rcgcdw.py:351 #, python-brace-format msgid "Created a tag \"{tag}\"" msgstr "Utworzono tag \"{tag}\"" -#: rcgcdw.py:329 +#: rcgcdw.py:355 #, python-brace-format msgid "Deleted a tag \"{tag}\"" msgstr "Usunięto tag \"{tag}\"" -#: rcgcdw.py:333 +#: rcgcdw.py:359 #, python-brace-format msgid "Activated a tag \"{tag}\"" msgstr "Aktywowano tag \"{tag}\"" -#: rcgcdw.py:336 +#: rcgcdw.py:362 #, python-brace-format msgid "Deactivated a tag \"{tag}\"" msgstr "Dezaktywowano tag \"{tag}\"" -#: rcgcdw.py:357 +#: rcgcdw.py:365 +msgid "Action has been hidden by Gamepedia staff." +msgstr "Akcja została ukryta przez personel Gamepedii." + +#: rcgcdw.py:386 msgid "Tags" msgstr "Tagi" -#: rcgcdw.py:480 +#: rcgcdw.py:515 msgid "Unable to process the event" msgstr "Nie udało się odczytać wydarzenia" -#: rcgcdw.py:480 +#: rcgcdw.py:515 msgid "error" msgstr "błąd" -#: rcgcdw.py:560 +#: rcgcdw.py:597 msgid "Daily overview" msgstr "Podsumowanie dnia" -#: rcgcdw.py:576 +#: rcgcdw.py:613 msgid " ({} action)" -msgid_plural "({} actions)" +msgid_plural " ({} actions)" msgstr[0] " ({} akcja)" msgstr[1] " ({} akcje)" msgstr[2] " ({} akcji)" -#: rcgcdw.py:577 +#: rcgcdw.py:614 msgid " UTC ({} action)" msgid_plural " UTC ({} actions)" msgstr[0] " UTC ({} akcja)" msgstr[1] " UTC ({} akcje)" msgstr[2] " UTC ({} akcji)" -#: rcgcdw.py:579 rcgcdw.py:580 +#: rcgcdw.py:616 rcgcdw.py:617 msgid "But nobody came" msgstr "Ale nikt nie przyszedł" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Most active user" msgid_plural "Most active users" msgstr[0] "Najbardziej aktywny użytkownik" msgstr[1] "Najbardziej aktywni użytkownicy" msgstr[2] "Najbardziej aktywni użytkownicy" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Edits made" msgstr "Zrobionych edycji" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "New files" msgstr "Nowych plików" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Admin actions" msgstr "Akcji administratorskich" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Bytes changed" msgstr "Zmienionych bajtów" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "New articles" msgstr "Nowych artykułów" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Unique contributors" msgstr "Unikalnych edytujących" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Most active hour" msgid_plural "Most active hours" msgstr[0] "Najbardziej aktywna godzina" msgstr[1] "Najbardziej aktywne godziny" msgstr[2] "Najbardziej aktywne godziny" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Day score" msgstr "Wynik dnia" -#: rcgcdw.py:674 +#: rcgcdw.py:745 #, python-brace-format msgid "Connection to {wiki} seems to be stable now." msgstr "Połączenie z {wiki} wygląda na stabilne." -#: rcgcdw.py:674 rcgcdw.py:729 +#: rcgcdw.py:745 rcgcdw.py:804 msgid "Connection status" msgstr "Problem z połączeniem" -#: rcgcdw.py:729 +#: rcgcdw.py:804 #, python-brace-format msgid "{wiki} seems to be down or unreachable." msgstr "{wiki} nie działa lub jest nieosiągalna." -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "director" msgstr "Dyrektor" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "bot" msgstr "Bot" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "editor" msgstr "Redaktor" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "directors" msgstr "Dyrektorzy" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "sysop" msgstr "Administrator" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "bureaucrat" msgstr "Biurokrata" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "reviewer" msgstr "Przeglądający" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "autoreview" msgstr "Automatycznie przeglądający" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "autopatrol" msgstr "Automatycznie zatwierdzający" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "wiki_guardian" msgstr "Strażnik wiki" diff --git a/rcgcdw.pot b/rcgcdw.pot index 7f63349..f1e8990 100644 --- a/rcgcdw.pot +++ b/rcgcdw.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-07-12 11:29+0200\n" +"POT-Creation-Date: 2018-09-02 11:39+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,447 +18,451 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: rcgcdw.py:124 +#: rcgcdw.py:150 msgid "(N!) " msgstr "" -#: rcgcdw.py:124 +#: rcgcdw.py:150 msgid "m " msgstr "" -#: rcgcdw.py:142 rcgcdw.py:168 +#: rcgcdw.py:168 rcgcdw.py:194 msgid "Options" msgstr "" -#: rcgcdw.py:142 -#, python-brace-format -msgid "([preview]({link}) | [undo]({undolink}))" -msgstr "" - -#: rcgcdw.py:143 -#, python-brace-format -msgid "Uploaded a new version of {name}" -msgstr "" - -#: rcgcdw.py:145 -#, python-brace-format -msgid "Uploaded {name}" -msgstr "" - -#: rcgcdw.py:158 -msgid "**No license!**" -msgstr "" - #: rcgcdw.py:168 #, python-brace-format -msgid "([preview]({link}))" +msgid "([preview]({link}) | [undo]({undolink}))" msgstr "" #: rcgcdw.py:169 #, python-brace-format +msgid "Uploaded a new version of {name}" +msgstr "" + +#: rcgcdw.py:171 +#, python-brace-format +msgid "Uploaded {name}" +msgstr "" + +#: rcgcdw.py:184 +msgid "**No license!**" +msgstr "" + +#: rcgcdw.py:194 +#, python-brace-format +msgid "([preview]({link}))" +msgstr "" + +#: rcgcdw.py:195 +#, python-brace-format msgid "" "{desc}\n" "License: {license}" msgstr "" -#: rcgcdw.py:172 +#: rcgcdw.py:198 #, python-brace-format msgid "Deleted page {article}" msgstr "" -#: rcgcdw.py:175 +#: rcgcdw.py:201 #, python-brace-format msgid "Deleted redirect {article} by overwriting" msgstr "" -#: rcgcdw.py:178 +#: rcgcdw.py:204 msgid "No redirect has been made" msgstr "" -#: rcgcdw.py:178 +#: rcgcdw.py:204 msgid "A redirect has been made" msgstr "" -#: rcgcdw.py:179 +#: rcgcdw.py:205 #, python-brace-format msgid "Moved {article} to {target}" msgstr "" -#: rcgcdw.py:182 +#: rcgcdw.py:208 #, python-brace-format msgid "Moved {article} to {title} over redirect" msgstr "" -#: rcgcdw.py:185 +#: rcgcdw.py:211 #, python-brace-format msgid "Moved protection settings from {article} to {title}" msgstr "" -#: rcgcdw.py:189 +#: rcgcdw.py:215 msgid "infinity and beyond" msgstr "" -#: rcgcdw.py:190 +#: rcgcdw.py:216 #, python-brace-format msgid "Blocked {blocked_user} for {time}" msgstr "" -#: rcgcdw.py:194 +#: rcgcdw.py:220 #, python-brace-format msgid "Changed block settings for {blocked_user}" msgstr "" -#: rcgcdw.py:198 +#: rcgcdw.py:224 #, python-brace-format msgid "Unblocked {blocked_user}" msgstr "" -#: rcgcdw.py:202 +#: rcgcdw.py:228 #, python-brace-format msgid "Left a comment on {target}'s profile" msgstr "" -#: rcgcdw.py:206 +#: rcgcdw.py:232 #, python-brace-format msgid "Replied to a comment on {target}'s profile" msgstr "" -#: rcgcdw.py:210 +#: rcgcdw.py:236 #, python-brace-format msgid "Edited a comment on {target}'s profile" msgstr "" -#: rcgcdw.py:214 +#: rcgcdw.py:240 msgid "Location" msgstr "" -#: rcgcdw.py:216 +#: rcgcdw.py:242 msgid "About me" msgstr "" -#: rcgcdw.py:218 +#: rcgcdw.py:244 msgid "Google link" msgstr "" -#: rcgcdw.py:220 +#: rcgcdw.py:246 msgid "Facebook link" msgstr "" -#: rcgcdw.py:222 +#: rcgcdw.py:248 msgid "Twitter link" msgstr "" -#: rcgcdw.py:224 +#: rcgcdw.py:250 msgid "Reddit link" msgstr "" -#: rcgcdw.py:226 +#: rcgcdw.py:252 msgid "Twitch link" msgstr "" -#: rcgcdw.py:228 +#: rcgcdw.py:254 msgid "PSN link" msgstr "" -#: rcgcdw.py:230 +#: rcgcdw.py:256 msgid "VK link" msgstr "" -#: rcgcdw.py:232 +#: rcgcdw.py:258 msgid "XVL link" msgstr "" -#: rcgcdw.py:234 +#: rcgcdw.py:260 msgid "Steam link" msgstr "" -#: rcgcdw.py:236 +#: rcgcdw.py:262 msgid "Unknown" msgstr "" -#: rcgcdw.py:237 +#: rcgcdw.py:263 #, python-brace-format msgid "Edited {target}'s profile" msgstr "" -#: rcgcdw.py:238 +#: rcgcdw.py:264 #, python-brace-format msgid "{field} field changed to: {desc}" msgstr "" -#: rcgcdw.py:242 +#: rcgcdw.py:268 #, python-brace-format msgid "Deleted a comment on {target}'s profile" msgstr "" -#: rcgcdw.py:246 +#: rcgcdw.py:272 #, python-brace-format msgid "Changed group membership for {target}" msgstr "" -#: rcgcdw.py:248 +#: rcgcdw.py:274 msgid "System" msgstr "" -#: rcgcdw.py:250 +#: rcgcdw.py:276 #, python-brace-format msgid "{target} got autopromoted to a new usergroup" msgstr "" -#: rcgcdw.py:260 rcgcdw.py:262 +#: rcgcdw.py:286 rcgcdw.py:288 msgid "none" msgstr "" -#: rcgcdw.py:263 rcgcdw.py:385 +#: rcgcdw.py:289 rcgcdw.py:420 msgid "No description provided" msgstr "" -#: rcgcdw.py:264 +#: rcgcdw.py:290 #, python-brace-format msgid "Groups changed from {old_groups} to {new_groups}{reason}" msgstr "" -#: rcgcdw.py:267 +#: rcgcdw.py:293 #, python-brace-format msgid "Protected {target}" msgstr "" -#: rcgcdw.py:271 +#: rcgcdw.py:297 #, python-brace-format msgid "Changed protection level for {article}" msgstr "" -#: rcgcdw.py:275 +#: rcgcdw.py:301 #, python-brace-format msgid "Removed protection from {article}" msgstr "" -#: rcgcdw.py:279 +#: rcgcdw.py:305 #, python-brace-format msgid "Changed visibility of revision on page {article} " msgid_plural "Changed visibility of {amount} revisions on page {article} " msgstr[0] "" msgstr[1] "" -#: rcgcdw.py:282 +#: rcgcdw.py:308 #, python-brace-format msgid "Imported {article} with {count} revision" msgid_plural "Imported {article} with {count} revisions" msgstr[0] "" msgstr[1] "" -#: rcgcdw.py:285 +#: rcgcdw.py:311 #, python-brace-format msgid "Restored {article}" msgstr "" -#: rcgcdw.py:288 +#: rcgcdw.py:314 msgid "Changed visibility of log events" msgstr "" -#: rcgcdw.py:291 +#: rcgcdw.py:317 msgid "Imported interwiki" msgstr "" -#: rcgcdw.py:294 +#: rcgcdw.py:320 #, python-brace-format msgid "Edited abuse filter number {number}" msgstr "" -#: rcgcdw.py:297 +#: rcgcdw.py:323 #, python-brace-format msgid "Merged revision histories of {article} into {dest}" msgstr "" -#: rcgcdw.py:300 +#: rcgcdw.py:326 msgid "Added an entry to the interwiki table" msgstr "" -#: rcgcdw.py:301 rcgcdw.py:305 +#: rcgcdw.py:327 rcgcdw.py:331 #, python-brace-format msgid "Prefix: {prefix}, website: {website} | {desc}" msgstr "" -#: rcgcdw.py:304 +#: rcgcdw.py:330 msgid "Edited an entry in interwiki table" msgstr "" -#: rcgcdw.py:308 +#: rcgcdw.py:334 msgid "Deleted an entry in interwiki table" msgstr "" -#: rcgcdw.py:309 +#: rcgcdw.py:335 #, python-brace-format msgid "Prefix: {prefix} | {desc}" msgstr "" -#: rcgcdw.py:312 +#: rcgcdw.py:338 #, python-brace-format msgid "Changed the content model of the page {article}" msgstr "" -#: rcgcdw.py:313 +#: rcgcdw.py:339 #, python-brace-format msgid "Model changed from {old} to {new}: {reason}" msgstr "" -#: rcgcdw.py:316 +#: rcgcdw.py:342 #, python-brace-format msgid "Edited the sprite for {article}" msgstr "" -#: rcgcdw.py:319 +#: rcgcdw.py:345 #, python-brace-format msgid "Created the sprite sheet for {article}" msgstr "" -#: rcgcdw.py:322 +#: rcgcdw.py:348 #, python-brace-format msgid "Edited the slice for {article}" msgstr "" -#: rcgcdw.py:325 +#: rcgcdw.py:351 #, python-brace-format msgid "Created a tag \"{tag}\"" msgstr "" -#: rcgcdw.py:329 +#: rcgcdw.py:355 #, python-brace-format msgid "Deleted a tag \"{tag}\"" msgstr "" -#: rcgcdw.py:333 +#: rcgcdw.py:359 #, python-brace-format msgid "Activated a tag \"{tag}\"" msgstr "" -#: rcgcdw.py:336 +#: rcgcdw.py:362 #, python-brace-format msgid "Deactivated a tag \"{tag}\"" msgstr "" -#: rcgcdw.py:357 +#: rcgcdw.py:365 +msgid "Action has been hidden by Gamepedia staff." +msgstr "" + +#: rcgcdw.py:386 msgid "Tags" msgstr "" -#: rcgcdw.py:480 +#: rcgcdw.py:515 msgid "Unable to process the event" msgstr "" -#: rcgcdw.py:480 +#: rcgcdw.py:515 msgid "error" msgstr "" -#: rcgcdw.py:560 +#: rcgcdw.py:597 msgid "Daily overview" msgstr "" -#: rcgcdw.py:576 +#: rcgcdw.py:613 msgid " ({} action)" -msgid_plural "({} actions)" +msgid_plural " ({} actions)" msgstr[0] "" msgstr[1] "" -#: rcgcdw.py:577 +#: rcgcdw.py:614 msgid " UTC ({} action)" msgid_plural " UTC ({} actions)" msgstr[0] "" msgstr[1] "" -#: rcgcdw.py:579 rcgcdw.py:580 +#: rcgcdw.py:616 rcgcdw.py:617 msgid "But nobody came" msgstr "" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Most active user" msgid_plural "Most active users" msgstr[0] "" msgstr[1] "" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Edits made" msgstr "" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "New files" msgstr "" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Admin actions" msgstr "" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Bytes changed" msgstr "" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "New articles" msgstr "" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Unique contributors" msgstr "" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Most active hour" msgid_plural "Most active hours" msgstr[0] "" msgstr[1] "" -#: rcgcdw.py:584 +#: rcgcdw.py:621 msgid "Day score" msgstr "" -#: rcgcdw.py:674 +#: rcgcdw.py:745 #, python-brace-format msgid "Connection to {wiki} seems to be stable now." msgstr "" -#: rcgcdw.py:674 rcgcdw.py:729 +#: rcgcdw.py:745 rcgcdw.py:804 msgid "Connection status" msgstr "" -#: rcgcdw.py:729 +#: rcgcdw.py:804 #, python-brace-format msgid "{wiki} seems to be down or unreachable." msgstr "" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "director" msgstr "" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "bot" msgstr "" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "editor" msgstr "" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "directors" msgstr "" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "sysop" msgstr "" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "bureaucrat" msgstr "" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "reviewer" msgstr "" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "autoreview" msgstr "" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "autopatrol" msgstr "" -#: rcgcdw.py:751 +#: rcgcdw.py:828 msgid "wiki_guardian" msgstr "" diff --git a/rcgcdw.py b/rcgcdw.py index 83b373c..e7ec827 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -347,19 +347,22 @@ def webhook_formatter(action, STATIC, **params): link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) embed["title"] = _("Edited the slice for {article}").format(article=params["title"]) elif action == "managetags/create": - link = "https://{wiki}.gamepedia.com/Special:Tags" + link = "https://{wiki}.gamepedia.com/Special:Tags".format(wiki=settings["wiki"]) embed["title"] = _("Created a tag \"{tag}\"").format(tag=params["additional"]["tag"]) recent_changes.update_tags() elif action == "managetags/delete": - link = "https://{wiki}.gamepedia.com/Special:Tags" + link = "https://{wiki}.gamepedia.com/Special:Tags".format(wiki=settings["wiki"]) embed["title"] = _("Deleted a tag \"{tag}\"").format(tag=params["additional"]["tag"]) recent_changes.update_tags() elif action == "managetags/activate": - link = "https://{wiki}.gamepedia.com/Special:Tags" + link = "https://{wiki}.gamepedia.com/Special:Tags".format(wiki=settings["wiki"]) embed["title"] = _("Activated a tag \"{tag}\"").format(tag=params["additional"]["tag"]) elif action == "managetags/deactivate": - link = "https://{wiki}.gamepedia.com/Special:Tags" + link = "https://{wiki}.gamepedia.com/Special:Tags".format(wiki=settings["wiki"]) embed["title"] = _("Deactivated a tag \"{tag}\"").format(tag=params["additional"]["tag"]) + elif action == "suppressed": + link = "https://{wiki}.gamepedia.com/".format(wiki=settings["wiki"]) + embed["title"] = _("Action has been hidden by Gamepedia staff.") else: logging.warning("No entry for {event} with params: {params}".format(event=action, params=params)) embed["author"]["name"] = params["user"] @@ -404,6 +407,9 @@ def handle_discord_http(code, formatted_embed): return 3 def first_pass(change): #I've decided to split the embed formatter and change handler, maybe it's more messy this way, I don't know + if "actionhidden" in change or "suppressed" in change and "suppressed" not in settings["ignored"]: + webhook_formatter("suppressed", {"timestamp": change["timestamp"], "color": settings["appearance"]["suppressed"]["color"], "icon": settings["appearance"]["suppressed"]["icon"]}, user=change["user"]) + return parse_output = HTMLParse.feed(change["parsedcomment"]) #parsedcomment = (BeautifulSoup(change["parsedcomment"], "lxml")).get_text() parsedcomment = HTMLParse.new_string @@ -574,6 +580,8 @@ def day_overview(): #time.strftime('%Y-%m-%dT%H:%M:%S.000Z', time.gmtime(time.ti for item in result[0]: activity = add_to_dict(activity, item["user"]) hours = add_to_dict(hours, datetime.datetime.strptime(item["timestamp"], "%Y-%m-%dT%H:%M:%SZ").hour) + if "actionhidden" in item or "suppressed" in item: + continue #while such actions have type value (edit/new/log) many other values are hidden and therefore can crash with key error, let's not process such events if item["type"]=="edit": edits += 1 changed_bytes += item["newlen"]-item["oldlen"] diff --git a/settings.json.example b/settings.json.example index b4fa637..611e305 100644 --- a/settings.json.example +++ b/settings.json.example @@ -192,6 +192,10 @@ "tag/update":{ "icon":"", "color":null + }, + "suppressed":{ + "icon": "", + "color": 8092539 } } } From c95f99a5dfe4fd1c2495df2ceaf533ce6465df16 Mon Sep 17 00:00:00 2001 From: Frisk Date: Sat, 8 Sep 2018 00:10:38 +0200 Subject: [PATCH 03/25] Fixed possible issue with linking to interwiki --- rcgcdw.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rcgcdw.py b/rcgcdw.py index e7ec827..e0085d6 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -49,7 +49,9 @@ class MyHTMLParser(HTMLParser): for attr in attrs: if attr[0] == 'href': self.recent_href=attr[1] - if not self.recent_href.startswith("https"): + if self.recent_href.startswith("//"): + self.recent_href = "https:{rest}".format(rest=self.recent_href) + elif not self.recent_href.startswith("https"): self.recent_href = "https://{wiki}.gamepedia.com".format(wiki=settings["wiki"]) + self.recent_href def handle_data(self, data): if self.recent_href: From 688d176a00fe4d8f24505bef88292d827d95dea2 Mon Sep 17 00:00:00 2001 From: Frisk Date: Sun, 30 Sep 2018 18:06:14 +0200 Subject: [PATCH 04/25] Fixed #28 --- rcgcdw.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rcgcdw.py b/rcgcdw.py index e0085d6..151e272 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -53,6 +53,7 @@ class MyHTMLParser(HTMLParser): self.recent_href = "https:{rest}".format(rest=self.recent_href) elif not self.recent_href.startswith("https"): self.recent_href = "https://{wiki}.gamepedia.com".format(wiki=settings["wiki"]) + self.recent_href + self.recent_href = self.recent_href.replace(")", "\)") def handle_data(self, data): if self.recent_href: self.new_string = self.new_string+"[{}]({})".format(data, self.recent_href) From 82d8157a946ff5513ae072f170857fce7db00c6a Mon Sep 17 00:00:00 2001 From: Frisk Date: Sun, 30 Sep 2018 18:14:44 +0200 Subject: [PATCH 05/25] Fixed a fix, code refactoring --- rcgcdw.py | 665 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 419 insertions(+), 246 deletions(-) diff --git a/rcgcdw.py b/rcgcdw.py index 151e272..dfae8bf 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -1,24 +1,24 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -#Recent changes Gamepedia compatible Discord webhook is a project for using a webhook as recent changes page from MediaWiki. -#Copyright (C) 2018 Frisk +# Recent changes Gamepedia compatible Discord webhook is a project for using a webhook as recent changes page from MediaWiki. +# Copyright (C) 2018 Frisk -#This program is free software: you can redistribute it and/or modify -#it under the terms of the GNU Affero General Public License as published -#by the Free Software Foundation, either version 3 of the License, or -#(at your option) any later version. +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. -#This program is distributed in the hope that it will be useful, -#but WITHOUT ANY WARRANTY; without even the implied warranty of -#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -#GNU Affero General Public License for more details. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. -#You should have received a copy of the GNU Affero General Public License -#along with this program. If not, see . +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . -#WARNING! SHITTY CODE AHEAD. ENTER ONLY IF YOU ARE SURE YOU CAN TAKE IT -#You have been warned +# WARNING! SHITTY CODE AHEAD. ENTER ONLY IF YOU ARE SURE YOU CAN TAKE IT +# You have been warned import time, logging, json, requests, datetime, re, gettext, math, random, os.path, schedule, sys from bs4 import BeautifulSoup @@ -28,7 +28,7 @@ from html.parser import HTMLParser with open("settings.json") as sfile: settings = json.load(sfile) - if settings["limitrefetch"] < settings["limit"] and settings["limitrefetch"]!=-1: + if settings["limitrefetch"] < settings["limit"] and settings["limitrefetch"] != -1: settings["limitrefetch"] = settings["limit"] logging.basicConfig(level=settings["verbose_level"]) if settings["limitrefetch"] != -1 and os.path.exists("lastchange.txt") == False: @@ -39,37 +39,46 @@ lang = gettext.translation('rcgcdw', localedir='locale', languages=[settings["la lang.install() ngettext = lang.ngettext + class MWError(Exception): - pass + pass + class MyHTMLParser(HTMLParser): new_string = "" recent_href = "" + def handle_starttag(self, tag, attrs): for attr in attrs: if attr[0] == 'href': - self.recent_href=attr[1] + self.recent_href = attr[1] if self.recent_href.startswith("//"): self.recent_href = "https:{rest}".format(rest=self.recent_href) elif not self.recent_href.startswith("https"): self.recent_href = "https://{wiki}.gamepedia.com".format(wiki=settings["wiki"]) + self.recent_href - self.recent_href = self.recent_href.replace(")", "\)") + self.recent_href = self.recent_href.replace(")", "\\)") + def handle_data(self, data): if self.recent_href: - self.new_string = self.new_string+"[{}]({})".format(data, self.recent_href) + self.new_string = self.new_string + "[{}]({})".format(data, self.recent_href) self.recent_href = "" else: - self.new_string = self.new_string+data + self.new_string = self.new_string + data + def handle_comment(self, data): - self.new_string = self.new_string+data + self.new_string = self.new_string + data + def handle_endtag(self, tag): - print (self.new_string) - + print(self.new_string) + + HTMLParse = MyHTMLParser() + def send(message, name, avatar): send_to_discord({"content": message, "avatar_url": avatar, "username": name}) - + + def safe_read(request, *keys): if request is None: return None @@ -78,16 +87,19 @@ def safe_read(request, *keys): for item in keys: request = request[item] except KeyError: - logging.warning("Failure while extracting data from request on key {key} in {change}".format(key=item, change=request)) + logging.warning( + "Failure while extracting data from request on key {key} in {change}".format(key=item, change=request)) return None except ValueError: logging.warning("Failure while extracting data from request in {change}".format(change=request)) return None return request + def send_to_discord_webhook(data): try: - result = requests.post(settings["webhookURL"], data=data, headers={**{'Content-Type': 'application/json'}, **settings["header"]}, timeout=10) + result = requests.post(settings["webhookURL"], data=data, + headers={**{'Content-Type': 'application/json'}, **settings["header"]}, timeout=10) except requests.exceptions.Timeout: logging.warning("Timeouted while sending data to the webhook.") return 3 @@ -96,7 +108,8 @@ def send_to_discord_webhook(data): return 3 else: return handle_discord_http(result.status_code, data) - + + def send_to_discord(data): if recent_changes.unsent_messages: recent_changes.unsent_messages.append(data) @@ -110,7 +123,8 @@ def send_to_discord(data): elif code < 2: time.sleep(2.5) pass - + + def webhook_formatter(action, STATIC, **params): logging.debug("Received things: {thing}".format(thing=params)) colornumber = None if isinstance(STATIC["color"], str) else STATIC["color"] @@ -120,45 +134,59 @@ def webhook_formatter(action, STATIC, **params): if "title" in params: 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["user"]) is not None: - author_url = "https://{wiki}.gamepedia.com/Special:Contributions/{user}".format(wiki=settings["wiki"], user=params["user"]) + author_url = "https://{wiki}.gamepedia.com/Special:Contributions/{user}".format(wiki=settings["wiki"], + user=params["user"]) 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["user"])), "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: - 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["user"] = params["user"] + "(?)" else: params["user"] = "{author} ({contribs})".format(author=params["user"], contribs=len(contibs)) - recent_changes.map_ips[params["user"]]=len(contibs) + recent_changes.map_ips[params["user"]] = len(contibs) else: - recent_changes.map_ips[params["user"]]+=1 - params["user"] = "{author} ({amount})".format(author=params["user"], amount=recent_changes.map_ips[params["user"]]) + recent_changes.map_ips[params["user"]] += 1 + params["user"] = "{author} ({amount})".format(author=params["user"], + amount=recent_changes.map_ips[params["user"]]) else: - author_url = "https://{wiki}.gamepedia.com/User:{user}".format(wiki=settings["wiki"], user=params["user"].replace(" ", "_")) - if action in ("edit", "new"): #edit or new page + author_url = "https://{wiki}.gamepedia.com/User:{user}".format(wiki=settings["wiki"], + user=params["user"].replace(" ", "_")) + if action in ("edit", "new"): # edit or new page editsize = params["size"] - print (editsize) + print(editsize) if editsize > 0: if editsize > 6032: colornumber = 65280 else: - colornumber = 35840 + (math.floor(editsize/(52)))*256 + colornumber = 35840 + (math.floor(editsize / (52))) * 256 elif editsize < 0: if editsize < -6032: colornumber = 16711680 else: - colornumber = 9175040 + (math.floor((editsize*-1)/(52)))*65536 + colornumber = 9175040 + (math.floor((editsize * -1) / (52))) * 65536 elif editsize == 0: colornumber = 8750469 - link = "https://{wiki}.gamepedia.com/index.php?title={article}&curid={pageid}&diff={diff}&oldid={oldrev}".format(wiki=settings["wiki"], pageid=params["pageid"], diff=params["diff"], oldrev=params["oldrev"], article=params["title"].replace(" ", "_")) - embed["title"] = "{article} ({new}{minor}{editsize})".format(article=params["title"], editsize="+"+str(editsize) if editsize>0 else editsize, new= _("(N!) ") if action == "new" else "", minor=_("m ") if action == "edit" and params["minor"] else "") - elif action in ("upload/overwrite", "upload/upload"): #sending files + link = "https://{wiki}.gamepedia.com/index.php?title={article}&curid={pageid}&diff={diff}&oldid={oldrev}".format( + wiki=settings["wiki"], pageid=params["pageid"], diff=params["diff"], oldrev=params["oldrev"], + article=params["title"].replace(" ", "_")) + embed["title"] = "{article} ({new}{minor}{editsize})".format(article=params["title"], editsize="+" + str( + editsize) if editsize > 0 else editsize, new=_("(N!) ") if action == "new" else "", + minor=_("m ") if action == "edit" and params[ + "minor"] else "") + elif action in ("upload/overwrite", "upload/upload"): # sending files license = None - urls = safe_read(recent_changes.safe_request("https://{wiki}.gamepedia.com/api.php?action=query&format=json&prop=imageinfo&list=&meta=&titles={filename}&iiprop=timestamp%7Curl&iilimit=2".format(wiki=settings["wiki"], filename=params["title"])), "query", "pages") + urls = safe_read(recent_changes.safe_request( + "https://{wiki}.gamepedia.com/api.php?action=query&format=json&prop=imageinfo&list=&meta=&titles={filename}&iiprop=timestamp%7Curl&iilimit=2".format( + wiki=settings["wiki"], filename=params["title"])), "query", "pages") undolink = "" - link ="https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], + article=params["title"].replace(" ", "_")) additional_info_retrieved = False if urls is not None: - if "-1" not in urls: #oage removed before we asked for it + if "-1" not in urls: # oage removed before we asked for it img_info = next(iter(urls.values()))["imageinfo"] embed["image"]["url"] = img_info[0]["url"] additional_info_retrieved = True @@ -167,12 +195,17 @@ def webhook_formatter(action, STATIC, **params): if params["overwrite"]: if additional_info_retrieved: img_timestamp = [x for x in img_info[1]["timestamp"] if x.isdigit()] - undolink = "https://{wiki}.gamepedia.com/index.php?title={filename}&action=revert&oldimage={timestamp}%21{filenamewon}".format(wiki=settings["wiki"], filename=article_encoded, timestamp="".join(img_timestamp), filenamewon = article_encoded[5:]) - embed["fields"] = [{"name": _("Options"), "value": _("([preview]({link}) | [undo]({undolink}))").format(link=embed["image"]["url"], undolink=undolink)}] + undolink = "https://{wiki}.gamepedia.com/index.php?title={filename}&action=revert&oldimage={timestamp}%21{filenamewon}".format( + wiki=settings["wiki"], filename=article_encoded, timestamp="".join(img_timestamp), + filenamewon=article_encoded[5:]) + embed["fields"] = [{"name": _("Options"), "value": _("([preview]({link}) | [undo]({undolink}))").format( + link=embed["image"]["url"], undolink=undolink)}] embed["title"] = _("Uploaded a new version of {name}").format(name=params["title"]) else: embed["title"] = _("Uploaded {name}").format(name=params["title"]) - article_content = safe_read(recent_changes.safe_request("https://{wiki}.gamepedia.com/api.php?action=query&format=json&prop=revisions&titles={article}&rvprop=content".format(wiki=settings["wiki"], article=quote_plus(params["title"], safe=''))), "query", "pages") + article_content = safe_read(recent_changes.safe_request( + "https://{wiki}.gamepedia.com/api.php?action=query&format=json&prop=revisions&titles={article}&rvprop=content".format( + wiki=settings["wiki"], article=quote_plus(params["title"], safe=''))), "query", "pages") if article_content is None: logging.warning("Something went wrong when getting license for the image") return 0 @@ -188,57 +221,83 @@ def webhook_formatter(action, STATIC, **params): else: license = "?" except IndexError: - logging.error("Given regex for the license detection is incorrect. It does not have a capturing group called \"license\" specified. Please fix license_regex value in the config!") + logging.error( + "Given regex for the license detection is incorrect. It does not have a capturing group called \"license\" specified. Please fix license_regex value in the config!") license = "?" except re.error: - logging.error("Given regex for the license detection is incorrect. Please fix license_regex or license_regex_detect values in the config!") + logging.error( + "Given regex for the license detection is incorrect. Please fix license_regex or license_regex_detect values in the config!") license = "?" if additional_info_retrieved: - embed["fields"] = [{"name": _("Options"), "value": _("([preview]({link}))").format(link=embed["image"]["url"])}] - params["desc"] = _("{desc}\nLicense: {license}").format(desc=params["desc"], license=license if license is not None else "?") + embed["fields"] = [ + {"name": _("Options"), "value": _("([preview]({link}))").format(link=embed["image"]["url"])}] + params["desc"] = _("{desc}\nLicense: {license}").format(desc=params["desc"], + license=license if license is not None else "?") elif action == "delete/delete": - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], + article=params["title"].replace(" ", "_")) embed["title"] = _("Deleted page {article}").format(article=params["title"]) elif action == "delete/delete_redir": - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], + article=params["title"].replace(" ", "_")) embed["title"] = _("Deleted redirect {article} by overwriting").format(article=params["title"]) elif action == "move/move": - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["target"].replace(" ", "_")) - 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"]) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], + article=params["target"].replace(" ", "_")) + 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"]) elif action == "move/move_redir": - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["target"].replace(" ", "_")) - embed["title"] = _("Moved {article} to {title} over redirect").format(article=params["title"], title=params["target"]) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], + article=params["target"].replace(" ", "_")) + embed["title"] = _("Moved {article} to {title} over redirect").format(article=params["title"], + title=params["target"]) elif action == "protect/move_prot": - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) - embed["title"] = _("Moved protection settings from {article} to {title}").format(article=params["title"], title=params["target"]) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], + article=params["title"].replace(" ", "_")) + embed["title"] = _("Moved protection settings from {article} to {title}").format(article=params["title"], + title=params["target"]) elif action == "block/block": - 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] - 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=time) elif action == "block/reblock": - 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] embed["title"] = _("Changed block settings for {blocked_user}").format(blocked_user=user) elif action == "block/unblock": - 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] embed["title"] = _("Unblocked {blocked_user}").format(blocked_user=user) elif action == "curseprofile/comment-created": - link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"], commentid=params["commentid"]) - #link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)')) old way of linking + link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"], + commentid=params["commentid"]) + # link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)')) old way of linking embed["title"] = _("Left a comment on {target}'s profile").format(target=params["target"]) elif action == "curseprofile/comment-replied": - #link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)')) - link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"], commentid=params["commentid"]) + # link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)')) + link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"], + commentid=params["commentid"]) embed["title"] = _("Replied to a comment on {target}'s profile").format(target=params["target"]) elif action == "curseprofile/comment-edited": - #link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)')) - link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"], commentid=params["commentid"]) + # link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)')) + link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"], + commentid=params["commentid"]) embed["title"] = _("Edited a comment on {target}'s profile").format(target=params["target"]) elif action == "curseprofile/profile-edited": - 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": field = _("Location") elif params["field"] == "profile-aboutme": @@ -266,17 +325,19 @@ def webhook_formatter(action, STATIC, **params): embed["title"] = _("Edited {target}'s profile").format(target=params["target"]) params["desc"] = _("{field} field changed to: {desc}").format(field=field, desc=params["desc"]) elif action == "curseprofile/comment-deleted": - link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"], commentid=params["commentid"]) - #link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)')) + link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"], + commentid=params["commentid"]) + # link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)')) embed["title"] = _("Deleted a comment on {target}'s profile").format(target=params["target"]) elif action in ("rights/rights", "rights/autopromote"): - link = "https://{wiki}.gamepedia.com/User:".format(wiki=settings["wiki"])+params["title"].split(":")[1] + link = "https://{wiki}.gamepedia.com/User:".format(wiki=settings["wiki"]) + params["title"].split(":")[1] if action == "rights/rights": embed["title"] = _("Changed group membership for {target}").format(target=params["title"].split(":")[1]) else: params["user"] = _("System") author_url = "" - embed["title"] = _("{target} got autopromoted to a new usergroup").format(target=params["title"].split(":")[1]) + embed["title"] = _("{target} got autopromoted to a new usergroup").format( + target=params["title"].split(":")[1]) if len(params["old_groups"]) < len(params["new_groups"]): embed["thumbnail"]["url"] = "https://i.imgur.com/WnGhF5g.gif" old_groups = [] @@ -289,28 +350,39 @@ def webhook_formatter(action, STATIC, **params): old_groups = [_("none")] if len(new_groups) == 0: new_groups = [_("none")] - reason = ": {desc}".format(desc=params["desc"]) if params["desc"]!=_("No description provided") else "" - params["desc"] = _("Groups changed from {old_groups} to {new_groups}{reason}").format(old_groups=", ".join(old_groups), new_groups=', '.join(new_groups), reason=reason) + reason = ": {desc}".format(desc=params["desc"]) if params["desc"] != _("No description provided") else "" + params["desc"] = _("Groups changed from {old_groups} to {new_groups}{reason}").format( + old_groups=", ".join(old_groups), new_groups=', '.join(new_groups), reason=reason) elif action == "protect/protect": - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], + article=params["title"].replace(" ", "_")) embed["title"] = _("Protected {target}").format(target=params["title"]) params["desc"] = params["settings"] + " | " + params["desc"] elif action == "protect/modify": - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], + article=params["title"].replace(" ", "_")) embed["title"] = _("Changed protection level for {article}").format(article=params["title"]) params["desc"] = params["settings"] + " | " + params["desc"] elif action == "protect/unprotect": - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], + article=params["title"].replace(" ", "_")) embed["title"] = _("Removed protection from {article}").format(article=params["title"]) elif action == "delete/revision": amount = len(params["amount"]) - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) - embed["title"] = ngettext("Changed visibility of revision on page {article} ", "Changed visibility of {amount} revisions on page {article} ", amount).format(article=params["title"], amount=amount) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], + article=params["title"].replace(" ", "_")) + embed["title"] = ngettext("Changed visibility of revision on page {article} ", + "Changed visibility of {amount} revisions on page {article} ", amount).format( + article=params["title"], amount=amount) elif action == "import/upload": - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) - embed["title"] = ngettext("Imported {article} with {count} revision", "Imported {article} with {count} revisions", params["amount"]).format(article=params["title"], count=params["amount"]) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], + article=params["title"].replace(" ", "_")) + embed["title"] = ngettext("Imported {article} with {count} revision", + "Imported {article} with {count} revisions", params["amount"]).format( + article=params["title"], count=params["amount"]) elif action == "delete/restore": - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], + article=params["title"].replace(" ", "_")) embed["title"] = _("Restored {article}").format(article=params["title"]) elif action == "delete/event": link = "https://{wiki}.gamepedia.com/Special:RecentChanges".format(wiki=settings["wiki"]) @@ -322,32 +394,44 @@ def webhook_formatter(action, STATIC, **params): link = "https://{wiki}.gamepedia.com/Special:RecentChanges".format(wiki=settings["wiki"]) embed["title"] = _("Edited abuse filter number {number}").format(number=params["filternr"]) elif action == "merge/merge": - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) - embed["title"] = _("Merged revision histories of {article} into {dest}").format(article=params["title"], dest=params["destination"]) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], + article=params["title"].replace(" ", "_")) + embed["title"] = _("Merged revision histories of {article} into {dest}").format(article=params["title"], + dest=params["destination"]) elif action == "interwiki/iw_add": link = "https://{wiki}.gamepedia.com/Special:Interwiki".format(wiki=settings["wiki"]) embed["title"] = _("Added an entry to the interwiki table") - 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 action == "interwiki/iw_edit": link = "https://{wiki}.gamepedia.com/Special:Interwiki".format(wiki=settings["wiki"]) embed["title"] = _("Edited an entry in interwiki table") - 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 action == "interwiki/iw_delete": link = "https://{wiki}.gamepedia.com/Special:Interwiki".format(wiki=settings["wiki"]) embed["title"] = _("Deleted an entry in interwiki table") - 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 action == "contentmodel/change": - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], + article=params["title"].replace(" ", "_")) embed["title"] = _("Changed the content model of the page {article}").format(article=params["title"]) - params["desc"] = _("Model changed from {old} to {new}: {reason}").format(old=params["oldmodel"], new=params["newmodel"], reason=params["desc"]) + params["desc"] = _("Model changed from {old} to {new}: {reason}").format(old=params["oldmodel"], + new=params["newmodel"], + reason=params["desc"]) elif action == "sprite/sprite": - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], + article=params["title"].replace(" ", "_")) embed["title"] = _("Edited the sprite for {article}").format(article=params["title"]) elif action == "sprite/sheet": - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], + article=params["title"].replace(" ", "_")) embed["title"] = _("Created the sprite sheet for {article}").format(article=params["title"]) elif action == "sprite/slice": - link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], article=params["title"].replace(" ", "_")) + link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], + article=params["title"].replace(" ", "_")) embed["title"] = _("Edited the slice for {article}").format(article=params["title"]) elif action == "managetags/create": link = "https://{wiki}.gamepedia.com/Special:Tags".format(wiki=settings["wiki"]) @@ -391,30 +475,38 @@ def webhook_formatter(action, STATIC, **params): data['avatar_url'] = settings["avatars"]["embed"] formatted_embed = json.dumps(data, indent=4) send_to_discord(formatted_embed) - + + def handle_discord_http(code, formatted_embed): - if 300 > code > 199: #message went through + if 300 > code > 199: # message went through return 0 - elif code == 400: #HTTP BAD REQUEST - logging.error("Following message has been rejected by Discord, please submit a bug on our bugtracker adding it:") + elif code == 400: # HTTP BAD REQUEST + logging.error( + "Following message has been rejected by Discord, please submit a bug on our bugtracker adding it:") logging.error(formatted_embed) return 1 - elif code == 401 or code == 404: #HTTP UNAUTHORIZED AND NOT FOUND + elif code == 401 or code == 404: # HTTP UNAUTHORIZED AND NOT FOUND logging.error("Webhook URL is invalid or no longer in use, please replace it with proper one.") sys.exit(1) elif code == 429: logging.error("We are sending too many requests to the Discord, slowing down...") return 2 elif 499 < code < 600: - logging.error("Discord have trouble processing the event, and because the HTTP code returned is {} it means we blame them.".format(code)) + logging.error( + "Discord have trouble processing the event, and because the HTTP code returned is {} it means we blame them.".format( + code)) return 3 - -def first_pass(change): #I've decided to split the embed formatter and change handler, maybe it's more messy this way, I don't know + + +def first_pass( + change): # I've decided to split the embed formatter and change handler, maybe it's more messy this way, I don't know if "actionhidden" in change or "suppressed" in change and "suppressed" not in settings["ignored"]: - webhook_formatter("suppressed", {"timestamp": change["timestamp"], "color": settings["appearance"]["suppressed"]["color"], "icon": settings["appearance"]["suppressed"]["icon"]}, user=change["user"]) + webhook_formatter("suppressed", + {"timestamp": change["timestamp"], "color": settings["appearance"]["suppressed"]["color"], + "icon": settings["appearance"]["suppressed"]["icon"]}, user=change["user"]) return parse_output = HTMLParse.feed(change["parsedcomment"]) - #parsedcomment = (BeautifulSoup(change["parsedcomment"], "lxml")).get_text() + # parsedcomment = (BeautifulSoup(change["parsedcomment"], "lxml")).get_text() parsedcomment = HTMLParse.new_string HTMLParse.new_string = "" logging.debug(change) @@ -422,120 +514,160 @@ def first_pass(change): #I've decided to split the embed formatter and change ha if not parsedcomment: parsedcomment = _("No description provided") if change["type"] == "edit" and "edit" not in settings["ignored"]: - STATIC_VARS = {**STATIC_VARS ,**{"color": settings["appearance"]["edit"]["color"], "icon": settings["appearance"]["edit"]["icon"]}} - webhook_formatter("edit", STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, oldrev=change["old_revid"], pageid=change["pageid"], diff=change["revid"], size=change["newlen"]-change["oldlen"], minor= True if "minor" in change else False) + STATIC_VARS = {**STATIC_VARS, **{"color": settings["appearance"]["edit"]["color"], + "icon": settings["appearance"]["edit"]["icon"]}} + webhook_formatter("edit", STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, + oldrev=change["old_revid"], pageid=change["pageid"], diff=change["revid"], + size=change["newlen"] - change["oldlen"], minor=True if "minor" in change else False) elif change["type"] == "log": combination = "{logtype}/{logaction}".format(logtype=change["logtype"], logaction=change["logaction"]) if combination in settings["ignored"]: return logging.debug("combination is {}".format(combination)) try: - STATIC_VARS = {**STATIC_VARS ,**{"color": settings["appearance"][combination]["color"], "icon": settings["appearance"][combination]["icon"]}} + STATIC_VARS = {**STATIC_VARS, **{"color": settings["appearance"][combination]["color"], + "icon": settings["appearance"][combination]["icon"]}} except KeyError: - STATIC_VARS = {**STATIC_VARS ,**{"color": "", "icon": ""}} + STATIC_VARS = {**STATIC_VARS, **{"color": "", "icon": ""}} logging.error("No value in the settings has been given for {}".format(combination)) if combination == "protect/protect": - webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, settings=change["logparams"]["description"]) - elif combination=="protect/modify": - webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, settings=change["logparams"]["description"]) - elif combination=="protect/unprotect": + webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, + settings=change["logparams"]["description"]) + elif combination == "protect/modify": + webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, + settings=change["logparams"]["description"]) + elif combination == "protect/unprotect": webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment) - elif combination=="upload/overwrite": - webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, overwrite=True) - elif combination=="upload/upload": - webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, overwrite=False) - elif combination=="delete/delete": + elif combination == "upload/overwrite": + webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, + overwrite=True) + elif combination == "upload/upload": + webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, + overwrite=False) + elif combination == "delete/delete": webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment) - elif combination=="delete/delete_redir": + elif combination == "delete/delete_redir": webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment) - elif combination=="delete/restore": + elif combination == "delete/restore": webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment) - elif combination=="delete/revision": - webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, amount=change["logparams"]["ids"]) - elif combination=="delete/event": + elif combination == "delete/revision": + webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, + amount=change["logparams"]["ids"]) + elif combination == "delete/event": webhook_formatter(combination, STATIC_VARS, user=change["user"], desc=parsedcomment) - elif combination=="import/upload": - webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, amount=change["logparams"]["count"]) - elif combination=="import/interwiki": + elif combination == "import/upload": + webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, + amount=change["logparams"]["count"]) + elif combination == "import/interwiki": webhook_formatter(combination, STATIC_VARS, user=change["user"], desc=parsedcomment) - elif combination=="merge/merge" : - webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, destination=change["logparams"]["dest_title"]) - elif combination=="move/move": - webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, supress=True if "suppressredirect" in change["logparams"] else False, target=change["logparams"]['target_title']) - elif combination=="move/move_redir": - webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, target=change["logparams"]["target_title"]) - elif combination=="protect/move_prot": - webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, target=change["logparams"]["oldtitle_title"]) - elif combination=="block/block": - webhook_formatter(combination, STATIC_VARS, user=change["user"], blocked_user=change["title"], desc=parsedcomment, duration=change["logparams"]["duration"]) - elif combination=="block/unblock": - webhook_formatter(combination, STATIC_VARS, user=change["user"], blocked_user=change["title"], desc=parsedcomment) - elif combination=="block/reblock": - webhook_formatter(combination, STATIC_VARS, user=change["user"], blocked_user=change["title"], desc=parsedcomment) - elif combination=="rights/rights": - webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, old_groups=change["logparams"]["oldgroups"], new_groups=change["logparams"]["newgroups"]) - elif combination=="rights/autopromote": - webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, old_groups=change["logparams"]["oldgroups"], new_groups=change["logparams"]["newgroups"]) - elif combination=="abusefilter/modify": - webhook_formatter(combination, STATIC_VARS, user=change["user"], desc=parsedcomment, filternr=change["logparams"]['1']) - elif combination=="interwiki/iw_add": - webhook_formatter(combination, STATIC_VARS, user=change["user"], desc=parsedcomment, prefix=change["logparams"]['0'], website=change["logparams"]['1']) - elif combination=="interwiki/iw_edit": - webhook_formatter(combination, STATIC_VARS, user=change["user"], desc=parsedcomment, prefix=change["logparams"]['0'], website=change["logparams"]['1']) - elif combination=="interwiki/iw_delete": - webhook_formatter(combination, STATIC_VARS, user=change["user"], desc=parsedcomment, prefix=change["logparams"]['0']) - elif combination=="curseprofile/comment-created": - webhook_formatter(combination, STATIC_VARS, user=change["user"], target=change["title"].split(':')[1], commentid=change["logparams"]["0"]) - elif combination=="curseprofile/comment-edited": - webhook_formatter(combination, STATIC_VARS, user=change["user"], target=change["title"].split(':')[1], commentid=change["logparams"]["0"]) - elif combination=="curseprofile/comment-deleted": - webhook_formatter(combination, STATIC_VARS, user=change["user"], target=change["title"].split(':')[1], commentid=change["logparams"]["0"]) - elif combination=="curseprofile/profile-edited": - webhook_formatter(combination, STATIC_VARS, user=change["user"], target=change["title"].split(':')[1], field=change["logparams"]['0'], desc=change["parsedcomment"]) - elif combination=="curseprofile/comment-replied": - webhook_formatter(combination, STATIC_VARS, user=change["user"], target=change["title"].split(':')[1], commentid=change["logparams"]["0"]) - elif combination=="contentmodel/change": - webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, oldmodel=change["logparams" ]["oldmodel"], newmodel=change["logparams" ]["newmodel"]) - elif combination=="sprite/sprite": + elif combination == "merge/merge": + webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, + destination=change["logparams"]["dest_title"]) + elif combination == "move/move": + webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, + supress=True if "suppressredirect" in change["logparams"] else False, + target=change["logparams"]['target_title']) + elif combination == "move/move_redir": + webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, + target=change["logparams"]["target_title"]) + elif combination == "protect/move_prot": + webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, + target=change["logparams"]["oldtitle_title"]) + elif combination == "block/block": + webhook_formatter(combination, STATIC_VARS, user=change["user"], blocked_user=change["title"], + desc=parsedcomment, duration=change["logparams"]["duration"]) + elif combination == "block/unblock": + webhook_formatter(combination, STATIC_VARS, user=change["user"], blocked_user=change["title"], + desc=parsedcomment) + elif combination == "block/reblock": + webhook_formatter(combination, STATIC_VARS, user=change["user"], blocked_user=change["title"], + desc=parsedcomment) + elif combination == "rights/rights": + webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, + old_groups=change["logparams"]["oldgroups"], new_groups=change["logparams"]["newgroups"]) + elif combination == "rights/autopromote": + webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, + old_groups=change["logparams"]["oldgroups"], new_groups=change["logparams"]["newgroups"]) + elif combination == "abusefilter/modify": + webhook_formatter(combination, STATIC_VARS, user=change["user"], desc=parsedcomment, + filternr=change["logparams"]['1']) + elif combination == "interwiki/iw_add": + webhook_formatter(combination, STATIC_VARS, user=change["user"], desc=parsedcomment, + prefix=change["logparams"]['0'], website=change["logparams"]['1']) + elif combination == "interwiki/iw_edit": + webhook_formatter(combination, STATIC_VARS, user=change["user"], desc=parsedcomment, + prefix=change["logparams"]['0'], website=change["logparams"]['1']) + elif combination == "interwiki/iw_delete": + webhook_formatter(combination, STATIC_VARS, user=change["user"], desc=parsedcomment, + prefix=change["logparams"]['0']) + elif combination == "curseprofile/comment-created": + webhook_formatter(combination, STATIC_VARS, user=change["user"], target=change["title"].split(':')[1], + commentid=change["logparams"]["0"]) + elif combination == "curseprofile/comment-edited": + webhook_formatter(combination, STATIC_VARS, user=change["user"], target=change["title"].split(':')[1], + commentid=change["logparams"]["0"]) + elif combination == "curseprofile/comment-deleted": + webhook_formatter(combination, STATIC_VARS, user=change["user"], target=change["title"].split(':')[1], + commentid=change["logparams"]["0"]) + elif combination == "curseprofile/profile-edited": + webhook_formatter(combination, STATIC_VARS, user=change["user"], target=change["title"].split(':')[1], + field=change["logparams"]['0'], desc=change["parsedcomment"]) + elif combination == "curseprofile/comment-replied": + webhook_formatter(combination, STATIC_VARS, user=change["user"], target=change["title"].split(':')[1], + commentid=change["logparams"]["0"]) + elif combination == "contentmodel/change": + webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, + oldmodel=change["logparams"]["oldmodel"], newmodel=change["logparams"]["newmodel"]) + elif combination == "sprite/sprite": webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment) - elif combination=="sprite/sheet": + elif combination == "sprite/sheet": webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment) - elif combination=="sprite/slice": + elif combination == "sprite/slice": webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment) - elif combination=="managetags/create": - webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, additional=change["logparams"]) - elif combination=="managetags/delete": - webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, additional=change["logparams"]) - elif combination=="managetags/activate": - webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, additional=change["logparams"]) - elif combination=="managetags/deactivate": - webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, additional=change["logparams"]) - elif combination=="tag/update": + elif combination == "managetags/create": + webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, + additional=change["logparams"]) + elif combination == "managetags/delete": + webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, + additional=change["logparams"]) + elif combination == "managetags/activate": + webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, + additional=change["logparams"]) + elif combination == "managetags/deactivate": + webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, + additional=change["logparams"]) + elif combination == "tag/update": webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment) else: logging.warning("No entry matches given change!") - print (change) + print(change) send(_("Unable to process the event"), _("error"), settings["avatars"]["no_event"]) return - if change["type"] == "external": #not sure what happens then, but it's listed as possible type + if change["type"] == "external": # not sure what happens then, but it's listed as possible type logging.warning("External event happened, ignoring.") - print (change) + print(change) return - elif change["type"] == "new" and "new" not in settings["ignored"]: #new page - STATIC_VARS = {**STATIC_VARS ,**{"color": settings["appearance"]["new"]["color"], "icon": settings["appearance"]["new"]["icon"]}} - webhook_formatter("new", STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, oldrev=change["old_revid"], pageid=change["pageid"], diff=change["revid"], size=change["newlen"]) - + elif change["type"] == "new" and "new" not in settings["ignored"]: # new page + STATIC_VARS = {**STATIC_VARS, **{"color": settings["appearance"]["new"]["color"], + "icon": settings["appearance"]["new"]["icon"]}} + webhook_formatter("new", STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, + oldrev=change["old_revid"], pageid=change["pageid"], diff=change["revid"], + size=change["newlen"]) + + def day_overview_request(): logging.info("Fetching daily overview... This may take up to 30 seconds!") - timestamp = (datetime.datetime.utcnow()-datetime.timedelta(hours=24)).isoformat(timespec='milliseconds') + timestamp = (datetime.datetime.utcnow() - datetime.timedelta(hours=24)).isoformat(timespec='milliseconds') logging.debug("timestamp is {}".format(timestamp)) complete = False result = [] passes = 0 continuearg = "" while not complete and passes < 10: - request = recent_changes.safe_request("https://{wiki}.gamepedia.com/api.php?action=query&format=json&list=recentchanges&rcend={timestamp}Z&rcprop=title%7Ctimestamp%7Csizes%7Cloginfo%7Cuser&rcshow=!bot&rclimit=500&rctype=edit%7Cnew%7Clog{continuearg}".format(wiki=settings["wiki"], timestamp=timestamp, continuearg=continuearg)) - if request: + request = recent_changes.safe_request( + "https://{wiki}.gamepedia.com/api.php?action=query&format=json&list=recentchanges&rcend={timestamp}Z&rcprop=title%7Ctimestamp%7Csizes%7Cloginfo%7Cuser&rcshow=!bot&rclimit=500&rctype=edit%7Cnew%7Clog{continuearg}".format( + wiki=settings["wiki"], timestamp=timestamp, continuearg=continuearg)) + if request: try: request = request.json() rc = request['query']['recentchanges'] @@ -548,11 +680,13 @@ def day_overview_request(): logging.warning("Wiki returned %s" % (request.json())) complete = 2 else: - result+= rc + result += rc if continuearg: continuearg = "&rccontinue={}".format(continuearg) - passes+=1 - logging.debug("continuing requesting next pages of recent changes with {} passes and continuearg being {}".format(passes, continuearg)) + passes += 1 + logging.debug( + "continuing requesting next pages of recent changes with {} passes and continuearg being {}".format( + passes, continuearg)) time.sleep(3.0) else: complete = 1 @@ -562,15 +696,17 @@ def day_overview_request(): logging.debug("quit the loop because there been too many passes") return (result, complete) + def add_to_dict(dictionary, key): if key in dictionary: - dictionary[key]+=1 + dictionary[key] += 1 else: - dictionary[key]=1 + dictionary[key] = 1 return dictionary -def day_overview(): #time.strftime('%Y-%m-%dT%H:%M:%S.000Z', time.gmtime(time.time())) - #(datetime.datetime.utcnow()+datetime.timedelta(hours=0)).isoformat(timespec='milliseconds')+'Z' + +def day_overview(): # time.strftime('%Y-%m-%dT%H:%M:%S.000Z', time.gmtime(time.time())) + # (datetime.datetime.utcnow()+datetime.timedelta(hours=0)).isoformat(timespec='milliseconds')+'Z' result = day_overview_request() if result[1] == 1: activity = defaultdict(dict) @@ -584,18 +720,19 @@ def day_overview(): #time.strftime('%Y-%m-%dT%H:%M:%S.000Z', time.gmtime(time.ti activity = add_to_dict(activity, item["user"]) hours = add_to_dict(hours, datetime.datetime.strptime(item["timestamp"], "%Y-%m-%dT%H:%M:%SZ").hour) if "actionhidden" in item or "suppressed" in item: - continue #while such actions have type value (edit/new/log) many other values are hidden and therefore can crash with key error, let's not process such events - if item["type"]=="edit": + continue # while such actions have type value (edit/new/log) many other values are hidden and therefore can crash with key error, let's not process such events + if item["type"] == "edit": edits += 1 - changed_bytes += item["newlen"]-item["oldlen"] + changed_bytes += item["newlen"] - item["oldlen"] if item["type"] == "new": if item["ns"] == 0: - new_articles+=1 + new_articles += 1 changed_bytes += item["newlen"] if item["type"] == "log": - files = files+1 if item["logtype"] == item["logaction"] == "upload" else files - admin = admin+1 if item["logtype"] in ["delete", "merge", "block", "protect", "import", "rights", "abusefilter", "interwiki", "managetags"] else admin - overall = round(new_articles+edits*0.1+files*0.3+admin*0.1+math.fabs(changed_bytes*0.001), 2) + files = files + 1 if item["logtype"] == item["logaction"] == "upload" else files + admin = admin + 1 if item["logtype"] in ["delete", "merge", "block", "protect", "import", "rights", + "abusefilter", "interwiki", "managetags"] else admin + overall = round(new_articles + edits * 0.1 + files * 0.3 + admin * 0.1 + math.fabs(changed_bytes * 0.001), 2) embed = defaultdict(dict) embed["title"] = _("Daily overview") embed["url"] = "https://{wiki}.gamepedia.com/Special:Statistics".format(wiki=settings["wiki"]) @@ -606,22 +743,28 @@ def day_overview(): #time.strftime('%Y-%m-%dT%H:%M:%S.000Z', time.gmtime(time.ti if activity: v = activity.values() active_users = [] - for user, numberu in Counter(activity).most_common(list(v).count(max(v))): #find most active users + for user, numberu in Counter(activity).most_common(list(v).count(max(v))): # find most active users active_users.append(user) the_one = random.choice(active_users) v = hours.values() active_hours = [] - for hour, numberh in Counter(hours).most_common(list(v).count(max(v))): #find most active users + for hour, numberh in Counter(hours).most_common(list(v).count(max(v))): # find most active users active_hours.append(str(hour)) usramount = ngettext(" ({} action)", " ({} actions)", numberu).format(numberu) houramount = ngettext(" UTC ({} action)", " UTC ({} actions)", numberh).format(numberh) else: - active_users = [_("But nobody came")] #a reference to my favorite game of all the time, sorry ^_^ + active_users = [_("But nobody came")] # a reference to my favorite game of all the time, sorry ^_^ active_hours = [_("But nobody came")] usramount = "" houramount = "" embed["fields"] = [] - fields = ((ngettext("Most active user", "Most active users", len(active_users)), ', '.join(active_users) + usramount), (_("Edits made"), edits), (_("New files"), files), (_("Admin actions"), admin), (_("Bytes changed"), changed_bytes), (_("New articles"), new_articles), (_("Unique contributors"), str(len(activity))), (ngettext("Most active hour", "Most active hours", len(active_hours)), ', '.join(active_hours) + houramount), (_("Day score"), str(overall))) + fields = ( + (ngettext("Most active user", "Most active users", len(active_users)), ', '.join(active_users) + usramount), + (_("Edits made"), edits), (_("New files"), files), (_("Admin actions"), admin), + (_("Bytes changed"), changed_bytes), (_("New articles"), new_articles), + (_("Unique contributors"), str(len(activity))), + (ngettext("Most active hour", "Most active hours", len(active_hours)), ', '.join(active_hours) + houramount), + (_("Day score"), str(overall))) for name, value in fields: embed["fields"].append({"name": name, "value": value}) data = {} @@ -631,6 +774,7 @@ def day_overview(): #time.strftime('%Y-%m-%dT%H:%M:%S.000Z', time.gmtime(time.ti else: logging.debug("function requesting changes for day overview returned with error code") + class recent_changes_class(object): starttime = time.time() ids = [] @@ -653,10 +797,10 @@ class recent_changes_class(object): logging.debug("File_id is {val}".format(val=file_id)) else: logging.debug("File is empty") - file_id = 999999999 + file_id = 999999999 else: - file_id = 999999999 #such value won't cause trouble, and it will make sure no refetch happen - + file_id = 999999999 # such value won't cause trouble, and it will make sure no refetch happen + def handle_mw_errors(self, request): if "errors" in request: print(request["errors"]) @@ -664,17 +808,29 @@ class recent_changes_class(object): return request def log_in(self): - #session.cookies.clear() + # session.cookies.clear() if '@' not in settings["wiki_bot_login"]: - logging.error("Please provide proper nickname for login from https://{wiki}.gamepedia.com/Special:BotPasswords".format(wiki=settings["wiki"])) + logging.error( + "Please provide proper nickname for login from https://{wiki}.gamepedia.com/Special:BotPasswords".format( + wiki=settings["wiki"])) return if len(settings["wiki_bot_password"]) != 32: - logging.error("Password seems incorrect. It should be 32 characters long! Grab it from https://{wiki}.gamepedia.com/Special:BotPasswords".format(wiki=settings["wiki"])) + logging.error( + "Password seems incorrect. It should be 32 characters long! Grab it from https://{wiki}.gamepedia.com/Special:BotPasswords".format( + wiki=settings["wiki"])) return logging.info("Trying to log in to https://{wiki}.gamepedia.com...".format(wiki=settings["wiki"])) try: - response = self.handle_mw_errors(self.session.post("https://{wiki}.gamepedia.com/api.php".format(wiki=settings["wiki"]), data={'action': 'query', 'format': 'json', 'utf8': '', 'meta': 'tokens', 'type': 'login'})) - response = self.handle_mw_errors(self.session.post("https://{wiki}.gamepedia.com/api.php".format(wiki=settings["wiki"]), data={'action': 'login', 'format': 'json', 'utf8': '', 'lgname': settings["wiki_bot_login"], 'lgpassword':settings["wiki_bot_password"], 'lgtoken': response.json()['query']['tokens']['logintoken']})) + response = self.handle_mw_errors( + self.session.post("https://{wiki}.gamepedia.com/api.php".format(wiki=settings["wiki"]), + data={'action': 'query', 'format': 'json', 'utf8': '', 'meta': 'tokens', + 'type': 'login'})) + response = self.handle_mw_errors( + self.session.post("https://{wiki}.gamepedia.com/api.php".format(wiki=settings["wiki"]), + data={'action': 'login', 'format': 'json', 'utf8': '', + 'lgname': settings["wiki_bot_login"], + 'lgpassword': settings["wiki_bot_password"], + 'lgtoken': response.json()['query']['tokens']['logintoken']})) except ValueError: logging.error("Logging in have not succeeded") return @@ -682,24 +838,28 @@ class recent_changes_class(object): logging.error("Logging in have not succeeded") return try: - if response.json()['login']['result']=="Success": + if response.json()['login']['result'] == "Success": logging.info("Logging to the wiki succeeded") else: logging.error("Logging in have not succeeded") except: logging.error("Logging in have not succeeded") - + def add_cache(self, change): self.ids.append(change["rcid"]) - #self.recent_id = change["rcid"] - if len(self.ids) > settings["limitrefetch"]+5: + # self.recent_id = change["rcid"] + if len(self.ids) > settings["limitrefetch"] + 5: self.ids.pop(0) - + def fetch(self, amount=settings["limit"]): if self.unsent_messages: - logging.info("{} messages waiting to be delivered to Discord due to Discord throwing errors/no connection to Discord servers.".format(len(self.unsent_messages))) + logging.info( + "{} messages waiting to be delivered to Discord due to Discord throwing errors/no connection to Discord servers.".format( + len(self.unsent_messages))) for num, item in enumerate(self.unsent_messages): - logging.debug("Trying to send a message to Discord from the queue with id of {} and content {}".format(str(num), str(item))) + logging.debug( + "Trying to send a message to Discord from the queue with id of {} and content {}".format(str(num), + str(item))) if send_to_discord_webhook(item) < 2: logging.debug("Sending message succeeded") time.sleep(2.5) @@ -718,12 +878,14 @@ class recent_changes_class(object): with open("lastchange.txt", "w") as record: record.write(str(self.file_id)) logging.debug("Most recent rcid is: {}".format(self.recent_id)) - + def fetch_changes(self, amount, clean=False): if len(self.ids) == 0: logging.debug("ids is empty, triggering clean fetch") 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: try: changes = changes.json()['query']['recentchanges'] @@ -731,7 +893,8 @@ class recent_changes_class(object): except ValueError: logging.warning("ValueError in fetching changes") if changes.url == "https://www.gamepedia.com": - logging.critical("The wiki specified in the settings most probably doesn't exist, got redirected to gamepedia.com") + logging.critical( + "The wiki specified in the settings most probably doesn't exist, got redirected to gamepedia.com") sys.exit(1) self.downtime_controller() return None @@ -742,13 +905,15 @@ class recent_changes_class(object): if self.downtimecredibility > 0: self.downtimecredibility -= 1 if self.streak > -1: - self.streak+=1 + self.streak += 1 if self.streak > 8: self.streak = -1 - send(_("Connection to {wiki} seems to be stable now.").format(wiki=settings["wikiname"]), _("Connection status"), settings["avatars"]["connection_restored"]) + send(_("Connection to {wiki} seems to be stable now.").format(wiki=settings["wikiname"]), + _("Connection status"), settings["avatars"]["connection_restored"]) for change in changes: if change["rcid"] in self.ids or change["rcid"] < self.recent_id: - logging.debug("Change ({}) is in ids or is lower than recent_id {}".format(change["rcid"], self.recent_id)) + logging.debug("Change ({}) is in ids or is lower than recent_id {}".format(change["rcid"], + self.recent_id)) continue logging.debug(self.ids) logging.debug(self.recent_id) @@ -758,7 +923,7 @@ class recent_changes_class(object): continue first_pass(change) return change["rcid"] - + def safe_request(self, url): try: request = self.session.get(url, timeout=10) @@ -772,7 +937,7 @@ class recent_changes_class(object): return None else: return request - + def check_connection(self, looped=False): online = 0 for website in ["https://google.com", "https://instagram.com", "https://steamcommunity.com"]: @@ -784,56 +949,64 @@ class recent_changes_class(object): except requests.exceptions.Timeout: pass if online < 1: - logging.error("Failure when checking Internet connection at {time}".format(time=time.strftime("%a, %d %b %Y %H:%M:%S", time.localtime()))) + logging.error("Failure when checking Internet connection at {time}".format( + time=time.strftime("%a, %d %b %Y %H:%M:%S", time.localtime()))) self.downtimecredibility = 0 if looped == False: - while 1: #recursed loop, check for connection (every 10 seconds) as long as three services are down, don't do anything else + while 1: # recursed loop, check for connection (every 10 seconds) as long as three services are down, don't do anything else if self.check_connection(looped=True): recent_changes.fetch(amount=settings["limitrefetch"]) break time.sleep(10) return False return True - + def downtime_controller(self): if settings["show_updown_messages"] == False: return - if self.streak > -1: #reset the streak of successful connections when bad one happens + if self.streak > -1: # reset the streak of successful connections when bad one happens self.streak = 0 - if self.downtimecredibility<60: - self.downtimecredibility+=15 + if self.downtimecredibility < 60: + self.downtimecredibility += 15 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 - send(_("{wiki} seems to be down or unreachable.").format(wiki=settings["wikiname"]), _("Connection status"), settings["avatars"]["connection_failed"]) + if ( + time.time() - self.last_downtime) > 1800 and self.check_connection(): # check if last downtime happened within 30 minutes, if yes, don't send a message + send(_("{wiki} seems to be down or unreachable.").format(wiki=settings["wikiname"]), + _("Connection status"), settings["avatars"]["connection_failed"]) self.last_downtime = time.time() self.streak = 0 - + def clear_cache(self): self.map_ips = {} - + def update_tags(self): - tags_read = safe_read(self.safe_request("https://{wiki}.gamepedia.com/api.php?action=query&format=json&list=tags&tglimit=max&tgprop=name|displayname".format(wiki=settings["wiki"])), "query", "tags") + tags_read = safe_read(self.safe_request( + "https://{wiki}.gamepedia.com/api.php?action=query&format=json&list=tags&tglimit=max&tgprop=name|displayname".format( + wiki=settings["wiki"])), "query", "tags") if tags_read: for tag in tags_read: self.tags[tag["name"]] = (BeautifulSoup(tag["displayname"], "lxml")).get_text() else: logging.warning("Could not retrive tags. Internal names will be used!") - + + recent_changes = recent_changes_class() if settings["wiki_bot_login"] and settings["wiki_bot_password"]: recent_changes.log_in() recent_changes.update_tags() time.sleep(1.0) -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"]) + schedule.every(settings["cooldown"]).seconds.do(recent_changes.fetch) -if 1==2: - print (_("director"), _("bot"), _("editor"), _("directors"), _("sysop"), _("bureaucrat"), _("reviewer"), _("autoreview"), _("autopatrol"), _("wiki_guardian")) +if 1 == 2: + print(_("director"), _("bot"), _("editor"), _("directors"), _("sysop"), _("bureaucrat"), _("reviewer"), + _("autoreview"), _("autopatrol"), _("wiki_guardian")) if settings["overview"]: - schedule.every().day.at("{}:{}".format(time.strptime(settings["overview_time"], '%H:%M').tm_hour, time.strptime(settings["overview_time"], '%H:%M').tm_min)).do(day_overview) + schedule.every().day.at("{}:{}".format(time.strptime(settings["overview_time"], '%H:%M').tm_hour, + time.strptime(settings["overview_time"], '%H:%M').tm_min)).do(day_overview) schedule.every().day.at("00:00").do(recent_changes.clear_cache) - + while 1: time.sleep(1.0) schedule.run_pending() From 1c2433f3cf539d7e077a48729cab8cbce44113a1 Mon Sep 17 00:00:00 2001 From: Frisk Date: Sun, 30 Sep 2018 22:40:48 +0200 Subject: [PATCH 06/25] Added #29 --- rcgcdw.py | 2 ++ settings.json.example | 1 + 2 files changed, 3 insertions(+) diff --git a/rcgcdw.py b/rcgcdw.py index dfae8bf..f06a312 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -716,6 +716,8 @@ def day_overview(): # time.strftime('%Y-%m-%dT%H:%M:%S.000Z', time.gmtime(time. admin = 0 changed_bytes = 0 new_articles = 0 + if not result[0] and not settings["send_empty_overview"]: + return # no changes in this day for item in result[0]: activity = add_to_dict(activity, item["user"]) hours = add_to_dict(hours, datetime.datetime.strptime(item["timestamp"], "%Y-%m-%dT%H:%M:%SZ").hour) diff --git a/settings.json.example b/settings.json.example index 611e305..c0c3c75 100644 --- a/settings.json.example +++ b/settings.json.example @@ -20,6 +20,7 @@ "show_updown_messages": true, "overview": false, "overview_time": "00:00", + "send_empty_overview": false, "license_regex_detect": "\\{\\{(license|lizenz|licence|copyright)", "license_regex": "\\{\\{(license|lizenz|licence|copyright)(\\ |\\|)(?P.*?)\\}\\}", "wiki_bot_login": "", From 307acc24c196bcc0f52d02a0c5a9e853006a9860 Mon Sep 17 00:00:00 2001 From: Frisk Date: Sun, 30 Sep 2018 23:48:12 +0200 Subject: [PATCH 07/25] Some small changes to the code to improve clarity --- rcgcdw.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/rcgcdw.py b/rcgcdw.py index f06a312..396a1e2 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -128,8 +128,7 @@ def send_to_discord(data): def webhook_formatter(action, STATIC, **params): logging.debug("Received things: {thing}".format(thing=params)) colornumber = None if isinstance(STATIC["color"], str) else STATIC["color"] - data = {} - data["embeds"] = [] + data = {"embeds": []} embed = defaultdict(dict) if "title" in params: article_encoded = params["title"].replace(" ", "_").replace(')', '\)') @@ -161,7 +160,7 @@ def webhook_formatter(action, STATIC, **params): if editsize > 6032: colornumber = 65280 else: - colornumber = 35840 + (math.floor(editsize / (52))) * 256 + colornumber = 35840 + (math.floor(editsize / 52)) * 256 elif editsize < 0: if editsize < -6032: colornumber = 16711680 @@ -264,8 +263,8 @@ def webhook_formatter(action, STATIC, **params): user=params["blocked_user"].replace(" ", "_").replace(')', '\)')) user = params["blocked_user"].split(':')[1] - time = _("infinity and beyond") if params["duration"] == "infinite" else params["duration"] - embed["title"] = _("Blocked {blocked_user} for {time}").format(blocked_user=user, time=time) + block_time = _("infinity and beyond") if params["duration"] == "infinite" else params["duration"] + embed["title"] = _("Blocked {blocked_user} for {time}").format(blocked_user=user, time=block_time) elif action == "block/reblock": link = "https://{wiki}.gamepedia.com/{user}".format(wiki=settings["wiki"], user=params["blocked_user"].replace(" ", "_").replace(')', @@ -505,7 +504,7 @@ def first_pass( {"timestamp": change["timestamp"], "color": settings["appearance"]["suppressed"]["color"], "icon": settings["appearance"]["suppressed"]["icon"]}, user=change["user"]) return - parse_output = HTMLParse.feed(change["parsedcomment"]) + HTMLParse.feed(change["parsedcomment"]) # parsedcomment = (BeautifulSoup(change["parsedcomment"], "lxml")).get_text() parsedcomment = HTMLParse.new_string HTMLParse.new_string = "" @@ -674,7 +673,7 @@ def day_overview_request(): continuearg = request["continue"]["rccontinue"] if "continue" in request else None except ValueError: logging.warning("ValueError in fetching changes") - self.downtime_controller() + recent_changes.downtime_controller() complete = 2 except KeyError: logging.warning("Wiki returned %s" % (request.json())) @@ -747,7 +746,7 @@ def day_overview(): # time.strftime('%Y-%m-%dT%H:%M:%S.000Z', time.gmtime(time. active_users = [] for user, numberu in Counter(activity).most_common(list(v).count(max(v))): # find most active users active_users.append(user) - the_one = random.choice(active_users) + # the_one = random.choice(active_users) v = hours.values() active_hours = [] for hour, numberh in Counter(hours).most_common(list(v).count(max(v))): # find most active users @@ -769,8 +768,7 @@ def day_overview(): # time.strftime('%Y-%m-%dT%H:%M:%S.000Z', time.gmtime(time. (_("Day score"), str(overall))) for name, value in fields: embed["fields"].append({"name": name, "value": value}) - data = {} - data["embeds"] = [dict(embed)] + data = {"embeds": [dict(embed)]} formatted_embed = json.dumps(data, indent=4) send_to_discord(formatted_embed) else: @@ -954,7 +952,7 @@ class recent_changes_class(object): logging.error("Failure when checking Internet connection at {time}".format( time=time.strftime("%a, %d %b %Y %H:%M:%S", time.localtime()))) self.downtimecredibility = 0 - if looped == False: + if not looped: while 1: # recursed loop, check for connection (every 10 seconds) as long as three services are down, don't do anything else if self.check_connection(looped=True): recent_changes.fetch(amount=settings["limitrefetch"]) @@ -964,7 +962,7 @@ class recent_changes_class(object): return True def downtime_controller(self): - if settings["show_updown_messages"] == False: + if not settings["show_updown_messages"]: return if self.streak > -1: # reset the streak of successful connections when bad one happens self.streak = 0 From b597e21e00c1d8cd7569cfec0a9fff6d19ba0a41 Mon Sep 17 00:00:00 2001 From: Frisk Date: Tue, 2 Oct 2018 01:06:55 +0200 Subject: [PATCH 08/25] Added #30 --- rcgcdw.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/rcgcdw.py b/rcgcdw.py index 396a1e2..71f5063 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -281,17 +281,29 @@ def webhook_formatter(action, STATIC, **params): link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"], commentid=params["commentid"]) # link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)')) old way of linking - 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"]) if params[ + "target"] != \ + params[ + "user"] else _( + "Left a comment on their own profile") elif action == "curseprofile/comment-replied": # link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)')) link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"], commentid=params["commentid"]) - 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"]) if params[ + "target"] != \ + params[ + "user"] else _( + "Replied to a comment on their own profile") elif action == "curseprofile/comment-edited": # link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", "_").replace(')', '\)')) link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"], commentid=params["commentid"]) - 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"]) if params[ + "target"] != \ + params[ + "user"] else _( + "Edited a comment on their own profile") elif action == "curseprofile/profile-edited": link = "https://{wiki}.gamepedia.com/UserProfile:{target}".format(wiki=settings["wiki"], target=params["target"].replace(" ", @@ -321,7 +333,8 @@ def webhook_formatter(action, STATIC, **params): field = _("Steam link") else: field = _("Unknown") - embed["title"] = _("Edited {target}'s profile").format(target=params["target"]) + embed["title"] = _("Edited {target}'s profile").format(target=params["target"]) if params["user"] != params[ + "target"] else _("Left a comment on their own profile") params["desc"] = _("{field} field changed to: {desc}").format(field=field, desc=params["desc"]) elif action == "curseprofile/comment-deleted": link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"], From 9eef8eb5495385232b656ea0f44077f90fa4c379 Mon Sep 17 00:00:00 2001 From: Frisk Date: Tue, 2 Oct 2018 01:24:02 +0200 Subject: [PATCH 09/25] Updated .pot, changed string --- rcgcdw.pot | 362 ++++++++++++++++++++++++++++------------------------- rcgcdw.py | 2 +- 2 files changed, 190 insertions(+), 174 deletions(-) diff --git a/rcgcdw.pot b/rcgcdw.pot index f1e8990..0a663a0 100644 --- a/rcgcdw.pot +++ b/rcgcdw.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-09-02 11:39+0200\n" +"POT-Creation-Date: 2018-10-02 01:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,451 +18,467 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: rcgcdw.py:150 +#: rcgcdw.py:175 msgid "(N!) " msgstr "" -#: rcgcdw.py:150 +#: rcgcdw.py:176 msgid "m " msgstr "" -#: rcgcdw.py:168 rcgcdw.py:194 +#: rcgcdw.py:200 rcgcdw.py:232 msgid "Options" msgstr "" -#: rcgcdw.py:168 +#: rcgcdw.py:200 #, python-brace-format msgid "([preview]({link}) | [undo]({undolink}))" msgstr "" -#: rcgcdw.py:169 +#: rcgcdw.py:202 #, python-brace-format msgid "Uploaded a new version of {name}" msgstr "" -#: rcgcdw.py:171 +#: rcgcdw.py:204 #, python-brace-format msgid "Uploaded {name}" msgstr "" -#: rcgcdw.py:184 +#: rcgcdw.py:219 msgid "**No license!**" msgstr "" -#: rcgcdw.py:194 +#: rcgcdw.py:232 #, python-brace-format msgid "([preview]({link}))" msgstr "" -#: rcgcdw.py:195 +#: rcgcdw.py:233 #, python-brace-format msgid "" "{desc}\n" "License: {license}" msgstr "" -#: rcgcdw.py:198 +#: rcgcdw.py:238 #, python-brace-format msgid "Deleted page {article}" msgstr "" -#: rcgcdw.py:201 +#: rcgcdw.py:242 #, python-brace-format msgid "Deleted redirect {article} by overwriting" msgstr "" -#: rcgcdw.py:204 +#: rcgcdw.py:247 msgid "No redirect has been made" msgstr "" -#: rcgcdw.py:204 +#: rcgcdw.py:249 msgid "A redirect has been made" msgstr "" -#: rcgcdw.py:205 +#: rcgcdw.py:250 #, python-brace-format msgid "Moved {article} to {target}" msgstr "" -#: rcgcdw.py:208 +#: rcgcdw.py:254 #, python-brace-format msgid "Moved {article} to {title} over redirect" msgstr "" -#: rcgcdw.py:211 +#: rcgcdw.py:259 #, python-brace-format msgid "Moved protection settings from {article} to {title}" msgstr "" -#: rcgcdw.py:215 +#: rcgcdw.py:266 msgid "infinity and beyond" msgstr "" -#: rcgcdw.py:216 +#: rcgcdw.py:267 #, python-brace-format msgid "Blocked {blocked_user} for {time}" msgstr "" -#: rcgcdw.py:220 +#: rcgcdw.py:273 #, python-brace-format msgid "Changed block settings for {blocked_user}" msgstr "" -#: rcgcdw.py:224 +#: rcgcdw.py:279 #, python-brace-format msgid "Unblocked {blocked_user}" msgstr "" -#: rcgcdw.py:228 +#: rcgcdw.py:284 #, python-brace-format msgid "Left a comment on {target}'s profile" msgstr "" -#: rcgcdw.py:232 -#, python-brace-format -msgid "Replied to a comment on {target}'s profile" -msgstr "" - -#: rcgcdw.py:236 -#, python-brace-format -msgid "Edited a comment on {target}'s profile" -msgstr "" - -#: rcgcdw.py:240 -msgid "Location" -msgstr "" - -#: rcgcdw.py:242 -msgid "About me" -msgstr "" - -#: rcgcdw.py:244 -msgid "Google link" -msgstr "" - -#: rcgcdw.py:246 -msgid "Facebook link" -msgstr "" - -#: rcgcdw.py:248 -msgid "Twitter link" -msgstr "" - -#: rcgcdw.py:250 -msgid "Reddit link" -msgstr "" - -#: rcgcdw.py:252 -msgid "Twitch link" -msgstr "" - -#: rcgcdw.py:254 -msgid "PSN link" -msgstr "" - -#: rcgcdw.py:256 -msgid "VK link" -msgstr "" - -#: rcgcdw.py:258 -msgid "XVL link" -msgstr "" - -#: rcgcdw.py:260 -msgid "Steam link" -msgstr "" - -#: rcgcdw.py:262 -msgid "Unknown" -msgstr "" - -#: rcgcdw.py:263 -#, python-brace-format -msgid "Edited {target}'s profile" -msgstr "" - -#: rcgcdw.py:264 -#, python-brace-format -msgid "{field} field changed to: {desc}" -msgstr "" - -#: rcgcdw.py:268 -#, python-brace-format -msgid "Deleted a comment on {target}'s profile" -msgstr "" - -#: rcgcdw.py:272 -#, python-brace-format -msgid "Changed group membership for {target}" -msgstr "" - -#: rcgcdw.py:274 -msgid "System" -msgstr "" - -#: rcgcdw.py:276 -#, python-brace-format -msgid "{target} got autopromoted to a new usergroup" -msgstr "" - -#: rcgcdw.py:286 rcgcdw.py:288 -msgid "none" -msgstr "" - -#: rcgcdw.py:289 rcgcdw.py:420 -msgid "No description provided" -msgstr "" - -#: rcgcdw.py:290 -#, python-brace-format -msgid "Groups changed from {old_groups} to {new_groups}{reason}" +#: rcgcdw.py:288 +msgid "Left a comment on their own profile" msgstr "" #: rcgcdw.py:293 #, python-brace-format -msgid "Protected {target}" +msgid "Replied to a comment on {target}'s profile" msgstr "" #: rcgcdw.py:297 +msgid "Replied to a comment on their own profile" +msgstr "" + +#: rcgcdw.py:302 +#, python-brace-format +msgid "Edited a comment on {target}'s profile" +msgstr "" + +#: rcgcdw.py:306 +msgid "Edited a comment on their own profile" +msgstr "" + +#: rcgcdw.py:313 +msgid "Location" +msgstr "" + +#: rcgcdw.py:315 +msgid "About me" +msgstr "" + +#: rcgcdw.py:317 +msgid "Google link" +msgstr "" + +#: rcgcdw.py:319 +msgid "Facebook link" +msgstr "" + +#: rcgcdw.py:321 +msgid "Twitter link" +msgstr "" + +#: rcgcdw.py:323 +msgid "Reddit link" +msgstr "" + +#: rcgcdw.py:325 +msgid "Twitch link" +msgstr "" + +#: rcgcdw.py:327 +msgid "PSN link" +msgstr "" + +#: rcgcdw.py:329 +msgid "VK link" +msgstr "" + +#: rcgcdw.py:331 +msgid "XVL link" +msgstr "" + +#: rcgcdw.py:333 +msgid "Steam link" +msgstr "" + +#: rcgcdw.py:335 +msgid "Unknown" +msgstr "" + +#: rcgcdw.py:336 +#, python-brace-format +msgid "Edited {target}'s profile" +msgstr "" + +#: rcgcdw.py:337 +msgid "Edited their own profile" +msgstr "" + +#: rcgcdw.py:338 +#, python-brace-format +msgid "{field} field changed to: {desc}" +msgstr "" + +#: rcgcdw.py:343 +#, python-brace-format +msgid "Deleted a comment on {target}'s profile" +msgstr "" + +#: rcgcdw.py:347 +#, python-brace-format +msgid "Changed group membership for {target}" +msgstr "" + +#: rcgcdw.py:349 +msgid "System" +msgstr "" + +#: rcgcdw.py:351 +#, python-brace-format +msgid "{target} got autopromoted to a new usergroup" +msgstr "" + +#: rcgcdw.py:362 rcgcdw.py:364 +msgid "none" +msgstr "" + +#: rcgcdw.py:365 rcgcdw.py:527 +msgid "No description provided" +msgstr "" + +#: rcgcdw.py:366 +#, python-brace-format +msgid "Groups changed from {old_groups} to {new_groups}{reason}" +msgstr "" + +#: rcgcdw.py:371 +#, python-brace-format +msgid "Protected {target}" +msgstr "" + +#: rcgcdw.py:376 #, python-brace-format msgid "Changed protection level for {article}" msgstr "" -#: rcgcdw.py:301 +#: rcgcdw.py:381 #, python-brace-format msgid "Removed protection from {article}" msgstr "" -#: rcgcdw.py:305 +#: rcgcdw.py:386 #, python-brace-format msgid "Changed visibility of revision on page {article} " msgid_plural "Changed visibility of {amount} revisions on page {article} " msgstr[0] "" msgstr[1] "" -#: rcgcdw.py:308 +#: rcgcdw.py:392 #, python-brace-format msgid "Imported {article} with {count} revision" msgid_plural "Imported {article} with {count} revisions" msgstr[0] "" msgstr[1] "" -#: rcgcdw.py:311 +#: rcgcdw.py:398 #, python-brace-format msgid "Restored {article}" msgstr "" -#: rcgcdw.py:314 +#: rcgcdw.py:401 msgid "Changed visibility of log events" msgstr "" -#: rcgcdw.py:317 +#: rcgcdw.py:404 msgid "Imported interwiki" msgstr "" -#: rcgcdw.py:320 +#: rcgcdw.py:407 #, python-brace-format msgid "Edited abuse filter number {number}" msgstr "" -#: rcgcdw.py:323 +#: rcgcdw.py:411 #, python-brace-format msgid "Merged revision histories of {article} into {dest}" msgstr "" -#: rcgcdw.py:326 +#: rcgcdw.py:415 msgid "Added an entry to the interwiki table" msgstr "" -#: rcgcdw.py:327 rcgcdw.py:331 +#: rcgcdw.py:416 rcgcdw.py:422 #, python-brace-format msgid "Prefix: {prefix}, website: {website} | {desc}" msgstr "" -#: rcgcdw.py:330 +#: rcgcdw.py:421 msgid "Edited an entry in interwiki table" msgstr "" -#: rcgcdw.py:334 +#: rcgcdw.py:427 msgid "Deleted an entry in interwiki table" msgstr "" -#: rcgcdw.py:335 +#: rcgcdw.py:428 #, python-brace-format msgid "Prefix: {prefix} | {desc}" msgstr "" -#: rcgcdw.py:338 +#: rcgcdw.py:432 #, python-brace-format msgid "Changed the content model of the page {article}" msgstr "" -#: rcgcdw.py:339 +#: rcgcdw.py:433 #, python-brace-format msgid "Model changed from {old} to {new}: {reason}" msgstr "" -#: rcgcdw.py:342 +#: rcgcdw.py:439 #, python-brace-format msgid "Edited the sprite for {article}" msgstr "" -#: rcgcdw.py:345 +#: rcgcdw.py:443 #, python-brace-format msgid "Created the sprite sheet for {article}" msgstr "" -#: rcgcdw.py:348 +#: rcgcdw.py:447 #, python-brace-format msgid "Edited the slice for {article}" msgstr "" -#: rcgcdw.py:351 +#: rcgcdw.py:450 #, python-brace-format msgid "Created a tag \"{tag}\"" msgstr "" -#: rcgcdw.py:355 +#: rcgcdw.py:454 #, python-brace-format msgid "Deleted a tag \"{tag}\"" msgstr "" -#: rcgcdw.py:359 +#: rcgcdw.py:458 #, python-brace-format msgid "Activated a tag \"{tag}\"" msgstr "" -#: rcgcdw.py:362 +#: rcgcdw.py:461 #, python-brace-format msgid "Deactivated a tag \"{tag}\"" msgstr "" -#: rcgcdw.py:365 +#: rcgcdw.py:464 msgid "Action has been hidden by Gamepedia staff." msgstr "" -#: rcgcdw.py:386 +#: rcgcdw.py:485 msgid "Tags" msgstr "" -#: rcgcdw.py:515 +#: rcgcdw.py:656 msgid "Unable to process the event" msgstr "" -#: rcgcdw.py:515 +#: rcgcdw.py:656 msgid "error" msgstr "" -#: rcgcdw.py:597 +#: rcgcdw.py:751 msgid "Daily overview" msgstr "" -#: rcgcdw.py:613 +#: rcgcdw.py:767 msgid " ({} action)" msgid_plural " ({} actions)" msgstr[0] "" msgstr[1] "" -#: rcgcdw.py:614 +#: rcgcdw.py:768 msgid " UTC ({} action)" msgid_plural " UTC ({} actions)" msgstr[0] "" msgstr[1] "" -#: rcgcdw.py:616 rcgcdw.py:617 +#: rcgcdw.py:770 rcgcdw.py:771 msgid "But nobody came" msgstr "" -#: rcgcdw.py:621 +#: rcgcdw.py:776 msgid "Most active user" msgid_plural "Most active users" msgstr[0] "" msgstr[1] "" -#: rcgcdw.py:621 +#: rcgcdw.py:777 msgid "Edits made" msgstr "" -#: rcgcdw.py:621 +#: rcgcdw.py:777 msgid "New files" msgstr "" -#: rcgcdw.py:621 +#: rcgcdw.py:777 msgid "Admin actions" msgstr "" -#: rcgcdw.py:621 +#: rcgcdw.py:778 msgid "Bytes changed" msgstr "" -#: rcgcdw.py:621 +#: rcgcdw.py:778 msgid "New articles" msgstr "" -#: rcgcdw.py:621 +#: rcgcdw.py:779 msgid "Unique contributors" msgstr "" -#: rcgcdw.py:621 +#: rcgcdw.py:780 msgid "Most active hour" msgid_plural "Most active hours" msgstr[0] "" msgstr[1] "" -#: rcgcdw.py:621 +#: rcgcdw.py:781 msgid "Day score" msgstr "" -#: rcgcdw.py:745 +#: rcgcdw.py:924 #, python-brace-format msgid "Connection to {wiki} seems to be stable now." msgstr "" -#: rcgcdw.py:745 rcgcdw.py:804 +#: rcgcdw.py:925 rcgcdw.py:988 msgid "Connection status" msgstr "" -#: rcgcdw.py:804 +#: rcgcdw.py:987 #, python-brace-format msgid "{wiki} seems to be down or unreachable." msgstr "" -#: rcgcdw.py:828 +#: rcgcdw.py:1015 msgid "director" msgstr "" -#: rcgcdw.py:828 +#: rcgcdw.py:1015 msgid "bot" msgstr "" -#: rcgcdw.py:828 +#: rcgcdw.py:1015 msgid "editor" msgstr "" -#: rcgcdw.py:828 +#: rcgcdw.py:1015 msgid "directors" msgstr "" -#: rcgcdw.py:828 +#: rcgcdw.py:1015 msgid "sysop" msgstr "" -#: rcgcdw.py:828 +#: rcgcdw.py:1015 msgid "bureaucrat" msgstr "" -#: rcgcdw.py:828 +#: rcgcdw.py:1015 msgid "reviewer" msgstr "" -#: rcgcdw.py:828 +#: rcgcdw.py:1016 msgid "autoreview" msgstr "" -#: rcgcdw.py:828 +#: rcgcdw.py:1016 msgid "autopatrol" msgstr "" -#: rcgcdw.py:828 +#: rcgcdw.py:1016 msgid "wiki_guardian" msgstr "" diff --git a/rcgcdw.py b/rcgcdw.py index 71f5063..202d618 100644 --- a/rcgcdw.py +++ b/rcgcdw.py @@ -334,7 +334,7 @@ def webhook_formatter(action, STATIC, **params): else: field = _("Unknown") embed["title"] = _("Edited {target}'s profile").format(target=params["target"]) if params["user"] != params[ - "target"] else _("Left a comment on their own profile") + "target"] else _("Edited their own profile") params["desc"] = _("{field} field changed to: {desc}").format(field=field, desc=params["desc"]) elif action == "curseprofile/comment-deleted": link = "https://{wiki}.gamepedia.com/Special:CommentPermalink/{commentid}".format(wiki=settings["wiki"], From f1cef5214700bbdcda4cf9be041697379ac4612b Mon Sep 17 00:00:00 2001 From: Frisk Date: Wed, 3 Oct 2018 16:22:01 +0200 Subject: [PATCH 10/25] Added pl, en, de, fr and pt-br translations --- locale/de/LC_MESSAGES/rcgcdw.mo | Bin 7788 -> 8311 bytes locale/de/LC_MESSAGES/rcgcdw.po | 222 +++++++++++++++------------- locale/en/LC_MESSAGES/rcgcdw.mo | Bin 7545 -> 7891 bytes locale/en/LC_MESSAGES/rcgcdw.po | 216 ++++++++++++++------------- locale/fr/LC_MESSAGES/rcgcdw.mo | Bin 8125 -> 8510 bytes locale/fr/LC_MESSAGES/rcgcdw.po | 216 ++++++++++++++------------- locale/pl/LC_MESSAGES/rcgcdw.mo | Bin 8193 -> 8553 bytes locale/pl/LC_MESSAGES/rcgcdw.po | 216 ++++++++++++++------------- locale/pt-br/LC_MESSAGES/rcgcdw.mo | Bin 7764 -> 8267 bytes locale/pt-br/LC_MESSAGES/rcgcdw.po | 226 ++++++++++++++++------------- 10 files changed, 592 insertions(+), 504 deletions(-) diff --git a/locale/de/LC_MESSAGES/rcgcdw.mo b/locale/de/LC_MESSAGES/rcgcdw.mo index e1743768c6ccce09b0fdcabae10ce0e8297f818d..cca51f219250809f3912fb39873e7674bc08301c 100644 GIT binary patch delta 2592 zcma*oe@xVM9LMnwcVHACa)1a5eEAW-1mq3{BU4le3_?IelPnH6@Mio-h;**qSj)!B zkzQ?PTZ`2y{&3dL+M07RT4gQl$JW*=ZPU#^q-D8&thTnEue)!XTeS5V?|XdjbN9W^ z`}_X9zh8dX@Oy3GvMc%p!x$h|5gkrrCh^%NyfEI1H6{b!#$5aqWAFwR;jfsCS+^UL zh#p*lTab@T7nWcjrr{LciEm(nF#$8rK@Jn&qJH47$Ok6j4r7XWzY=vqJr>}8T!Y8a z!Z{qotC)msamJKlFQ(#isPkUOr8ti)VZOt3);HHUC}hIKM@}fhJl<}^<=BHtNYl!htf3U&i8CfLf>= zHD8To*oI0lfE3LfM{V89s0z(u30_BiFO~h!6&In}sS=~H26g_XBnwU_gyHO<@ zLp9Y=R6^5e;S7?i`NW?829@X))Itlkzaf2WqR2w?F{tk?LtS|~Dxo|V^;b8SFrfu2 z(1CTROdC)qHlx0`6WJxxg{q7nEqoG7@ikO0eSwov#{7Yq`aC7lJJYD&`3OBYAK-w$ zaOaVvPqV-cRV z=L27JaFB^u8bJw6p!PC|7M??O`(;$3G3<{@n1O1}eAJaRqPqUD?MukTo3mJr7f}f< zp=|50201@qMmW%I^So^c^+R9U-b5|r;whxkSD~)F4%It5uo=6NBA8RS1K&q2m_}o1 z!6sBMO<)yHVwvv$Sq>~Fenj17i981H#^B}16Y`sM-$%4h-CV=m?3H%%AniVvc?^$03~qo@j;L|yR=YKzXJ z9#Gd%y%0}!+Nw;X`lb-I#kHurq8$TTV6Q!~-*z0G%uk?x;3?FVP1&A6B{XgOChB)i zqwbz_s4kyHo%f;r`DeD5Pzfz$Q-57)v=zC1a!}pbf>EfkD}vc;D@utnqL)zfY1~EZ zBwC08qK;7C{4-Rs2MBG!L-u5s_P?Ju+Ap?0Jht(=hfrxXbVVB7;aC12;KM`>p{vx; zvqEDlp~`4zE87WGMnhYqpBLPjCl^`$J9MN9ef_P(yi%4uZZ3@0SzT5^5H8u9~Hspg+wf zLc>SogpVT4+r+VYMT195`01!F-%hjOS?<*~LRgK#n-0r&SbeFqB>yqQ5io?18uZ%aQoOGs+`usz_ vLCfbK@C|Wgt>LtT@1=c^tWWIuQF}i0=!*QP#ZL*1r_VY56t9vzTb}g&f%U&QDxzvbW z6uF{e2D6}3Bg!I43ZtO9O|Tpm1Z9LlP#RGhy+9xsHK>?H-`}}sKJ0%#&pBt$dEWld z`K#|@Z{~;aoac=)OjHt$A+vqhJC`3yYQ9-HuES~^!K?59#&8@XIEh7g8W-cY$e;be zPZ`c&Ek^Rp3a}fOnPn_VMGZ&&2Tx!<*H5Avyo)RFEH>kR=wQ>;W@Ffo#W;nH_$8L& zWmLOxzF8r5BTX%Znot_+=-;+dQG@5O2H(U*cn0h77u1W27UZ6S`su`s9`sRJg#)OO9Yl@zC1j864P1$*{pZuD8O~d1 zrZfrT94tq*t3nNAC2D}3sGQh@%9X9Cf$Ukx`a4t(a)Wo;G5^5{)CfODb@aLK*GPWa z1^@bI)c;*V&G>KBfPy51k~9z1VG#zg1~t$XsCEs-tiS%Tog1vO^`KTHg$@p5BksdG zdUvFviuQB}*(TfXU%SX; z>^N#=KE*aXi_Mr%#%e$bjNu6C{y094Cs7@D(3_Gti4N{SCG)e$t1NSZik9vSD*Ml& zW^fsm)y-s(>__FsHtfW`*nuCQ+Wn3?4JB-}Y(uq6qn=(c44RDM+F^Nc-1=z7JxE`;Vg9??g>#zwaT`fF^uj zM!n}KW^^pxqoVAcL^b@-|A$X}zd{Y@0y0+n2ODt_8?EG9ivd)*KF5{c