Fixed wrong undo link for new images, fixed license info being escaped

This commit is contained in:
Frisk 2019-01-26 18:42:30 +01:00
parent 867858acdd
commit 0a03ce755d
3 changed files with 129 additions and 116 deletions

Binary file not shown.

View file

@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-13 14:36+0100\n"
"PO-Revision-Date: 2018-11-13 14:45+0100\n"
"POT-Creation-Date: 2018-12-20 15:47+0100\n"
"PO-Revision-Date: 2019-01-07 15:08+0100\n"
"Last-Translator: Frisk <piotrex43@protonmail.ch>\n"
"Language-Team: \n"
"Language: pt_BR\n"
@ -18,43 +18,43 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Poedit 2.2\n"
#: rcgcdw.py:176
#: rcgcdw.py:180
msgid "(N!) "
msgstr "(N!) "
#: rcgcdw.py:177
#: rcgcdw.py:181
msgid "m "
msgstr "m "
#: rcgcdw.py:202 rcgcdw.py:234
#: rcgcdw.py:206 rcgcdw.py:238
msgid "Options"
msgstr "Opções"
#: rcgcdw.py:202
#: rcgcdw.py:206
#, python-brace-format
msgid "([preview]({link}) | [undo]({undolink}))"
msgstr "([visualização]({link}) | [desfazer]({undolink}))"
#: rcgcdw.py:204
#: rcgcdw.py:208
#, python-brace-format
msgid "Uploaded a new version of {name}"
msgstr "Carregou uma nova versão de {name}"
#: rcgcdw.py:206
#: rcgcdw.py:210
#, python-brace-format
msgid "Uploaded {name}"
msgstr "Carregado {name}"
#: rcgcdw.py:221
#: rcgcdw.py:225
msgid "**No license!**"
msgstr "* * Sem licença!* *"
#: rcgcdw.py:234
#: rcgcdw.py:238
#, python-brace-format
msgid "([preview]({link}))"
msgstr "([visualização]({link}))"
#: rcgcdw.py:235
#: rcgcdw.py:239
#, python-brace-format
msgid ""
"{desc}\n"
@ -63,444 +63,457 @@ msgstr ""
"{desc}\n"
"Licença: {license}"
#: rcgcdw.py:240
#: rcgcdw.py:244
#, python-brace-format
msgid "Deleted page {article}"
msgstr "Página {article} excluída"
#: rcgcdw.py:244
#: rcgcdw.py:248
#, python-brace-format
msgid "Deleted redirect {article} by overwriting"
msgstr "Redirecionado {article} excluído por sobrescrevendo"
#: rcgcdw.py:249
#: rcgcdw.py:253
msgid "No redirect has been made"
msgstr "Nenhum redirecionamento foi feito"
#: rcgcdw.py:251
#: rcgcdw.py:255
msgid "A redirect has been made"
msgstr "Foi feito um redirecionamento"
#: rcgcdw.py:252
#: rcgcdw.py:256
#, python-brace-format
msgid "Moved {redirect}{article} to {target}"
msgstr "Movido {redirect}{article} para {target}"
#: rcgcdw.py:256
#: rcgcdw.py:260
#, python-brace-format
msgid "Moved {redirect}{article} to {title} over redirect"
msgstr "Movido {redirect}{article} para {title} ao redirecionar"
#: rcgcdw.py:261
#: rcgcdw.py:265
#, python-brace-format
msgid "Moved protection settings from {redirect}{article} to {title}"
msgstr "Configurações de proteção movidos de {redirect}{article} para {title}"
#: rcgcdw.py:268
#: rcgcdw.py:272
msgid "infinity and beyond"
msgstr "infinito e além"
#: rcgcdw.py:269
#: rcgcdw.py:273
#, python-brace-format
msgid "Blocked {blocked_user} for {time}"
msgstr "Bloqueado {blocked_user} por {time}"
#: rcgcdw.py:275
#: rcgcdw.py:279
#, python-brace-format
msgid "Changed block settings for {blocked_user}"
msgstr "Configurações de bloqueio alteradas para {blocked_user}"
#: rcgcdw.py:281
#: rcgcdw.py:285
#, python-brace-format
msgid "Unblocked {blocked_user}"
msgstr "Desbloqueado {blocked_user}"
#: rcgcdw.py:286
#: rcgcdw.py:290
#, python-brace-format
msgid "Left a comment on {target}'s profile"
msgstr "Deixou um comentário no perfil de {target}"
#: rcgcdw.py:290
#: rcgcdw.py:294
msgid "Left a comment on their own profile"
msgstr "Deixou um comentário em seu próprio perfil "
msgstr "Deixou um comentário em seu próprio perfil"
#: rcgcdw.py:295
#: rcgcdw.py:299
#, python-brace-format
msgid "Replied to a comment on {target}'s profile"
msgstr "Respondeu a um comentário no perfil de {target}"
#: rcgcdw.py:299
#: rcgcdw.py:303
msgid "Replied to a comment on their own profile"
msgstr "Respondeu a um comentário em seu próprio perfil "
msgstr "Respondeu a um comentário em seu próprio perfil"
#: rcgcdw.py:304
#: rcgcdw.py:308
#, python-brace-format
msgid "Edited a comment on {target}'s profile"
msgstr "Editou um comentário no perfil de {target}"
#: rcgcdw.py:308
#: rcgcdw.py:312
msgid "Edited a comment on their own profile"
msgstr "Editou um comentário em seu próprio perfil "
msgstr "Editou um comentário em seu próprio perfil"
#: rcgcdw.py:315
#: rcgcdw.py:319
msgid "Location"
msgstr "Localização"
#: rcgcdw.py:317
#: rcgcdw.py:321
msgid "About me"
msgstr "Sobre mim"
#: rcgcdw.py:319
#: rcgcdw.py:323
msgid "Google link"
msgstr "Link do Google"
#: rcgcdw.py:321
#: rcgcdw.py:325
msgid "Facebook link"
msgstr "Facebook link"
#: rcgcdw.py:323
#: rcgcdw.py:327
msgid "Twitter link"
msgstr "Link do Twitter"
#: rcgcdw.py:325
#: rcgcdw.py:329
msgid "Reddit link"
msgstr "Link do Reddit"
#: rcgcdw.py:327
#: rcgcdw.py:331
msgid "Twitch link"
msgstr "Link do Twitch"
#: rcgcdw.py:329
#: rcgcdw.py:333
msgid "PSN link"
msgstr "Link do PSN"
#: rcgcdw.py:331
#: rcgcdw.py:335
msgid "VK link"
msgstr "Link do VK"
#: rcgcdw.py:333
#: rcgcdw.py:337
msgid "XVL link"
msgstr "Link do XVL"
#: rcgcdw.py:335
#: rcgcdw.py:339
msgid "Steam link"
msgstr "Link do Steam"
#: rcgcdw.py:337
#: rcgcdw.py:341
msgid "Unknown"
msgstr "Desconhecido"
#: rcgcdw.py:338
#: rcgcdw.py:342
#, python-brace-format
msgid "Edited {target}'s profile"
msgstr "Editado perfil {target}"
#: rcgcdw.py:339
#: rcgcdw.py:343
msgid "Edited their own profile"
msgstr "Editou seu próprio perfil"
#: rcgcdw.py:340
#: rcgcdw.py:344
#, python-brace-format
msgid "{field} field changed to: {desc}"
msgstr "campo {field} alterado para: {desc}"
#: rcgcdw.py:345
#: rcgcdw.py:349
#, python-brace-format
msgid "Deleted a comment on {target}'s profile"
msgstr "Excluiu um comentário no perfil de {target}"
#: rcgcdw.py:349
#: rcgcdw.py:353
#, python-brace-format
msgid "Changed group membership for {target}"
msgstr "Alterado grupo do membro de {target}"
#: rcgcdw.py:351
#: rcgcdw.py:355
msgid "System"
msgstr "Sistema"
#: rcgcdw.py:353
#: rcgcdw.py:357
#, python-brace-format
msgid "{target} got autopromoted to a new usergroup"
msgstr "{target} recebeu um promovido para um novo grupo de usuários"
#: rcgcdw.py:364 rcgcdw.py:366
#: rcgcdw.py:368 rcgcdw.py:370
msgid "none"
msgstr "nenhum"
#: rcgcdw.py:367 rcgcdw.py:537
#: rcgcdw.py:371 rcgcdw.py:547
msgid "No description provided"
msgstr "Nenhuma descrição fornecida"
#: rcgcdw.py:368
#: rcgcdw.py:372
#, python-brace-format
msgid "Groups changed from {old_groups} to {new_groups}{reason}"
msgstr "Grupos alterados de {old_groups} para {new_groups} {reason}"
#: rcgcdw.py:373
#: rcgcdw.py:377
#, python-brace-format
msgid "Protected {target}"
msgstr "Protegido {target}"
#: rcgcdw.py:378
#: rcgcdw.py:382
#, python-brace-format
msgid "Changed protection level for {article}"
msgstr "Nível de proteção alterado para {article}"
#: rcgcdw.py:383
#: rcgcdw.py:387
#, python-brace-format
msgid "Removed protection from {article}"
msgstr "Removida a proteção de {article}"
#: rcgcdw.py:388
#: rcgcdw.py:392
#, python-brace-format
msgid "Changed visibility of revision on page {article} "
msgid_plural "Changed visibility of {amount} revisions on page {article} "
msgstr[0] "Visibilidade alterada da revisão na página {article} "
msgstr[1] "Visibilidade alterada de {amount} revisões na página {article} "
#: rcgcdw.py:394
#: rcgcdw.py:398
#, python-brace-format
msgid "Imported {article} with {count} revision"
msgid_plural "Imported {article} with {count} revisions"
msgstr[0] "Importou {article} com {count} revisão"
msgstr[1] "{article} importado com {count} revisões"
#: rcgcdw.py:400
#: rcgcdw.py:404
#, python-brace-format
msgid "Restored {article}"
msgstr "Página {article} excluída"
#: rcgcdw.py:403
#: rcgcdw.py:407
msgid "Changed visibility of log events"
msgstr "Visibilidade alterada de eventos de registros"
#: rcgcdw.py:406
#: rcgcdw.py:410
msgid "Imported interwiki"
msgstr "Interwiki importado"
#: rcgcdw.py:409
#: rcgcdw.py:413
#, python-brace-format
msgid "Edited abuse filter number {number}"
msgstr "Número de filtro de abuso editado {number}"
#: rcgcdw.py:413
#: rcgcdw.py:416
#, python-brace-format
msgid "Created abuse filter number {number}"
msgstr "Criado filtro de abuso número {number}"
#: rcgcdw.py:420
#, python-brace-format
msgid "Merged revision histories of {article} into {dest}"
msgstr "Históricos de revisão mesclados de {article} em {dest}"
#: rcgcdw.py:417
#: rcgcdw.py:424
msgid "Added an entry to the interwiki table"
msgstr "Adicionado uma entrada para a tabela interwiki"
#: rcgcdw.py:418 rcgcdw.py:424
#: rcgcdw.py:425 rcgcdw.py:431
#, python-brace-format
msgid "Prefix: {prefix}, website: {website} | {desc}"
msgstr "Prefixo: {prefix}, site: {website} | {desc}"
#: rcgcdw.py:423
#: rcgcdw.py:430
msgid "Edited an entry in interwiki table"
msgstr "Editou uma entrada na tabela interwiki"
#: rcgcdw.py:429
#: rcgcdw.py:436
msgid "Deleted an entry in interwiki table"
msgstr "Excluiu uma entrada na tabela interwiki"
#: rcgcdw.py:430
#: rcgcdw.py:437
#, python-brace-format
msgid "Prefix: {prefix} | {desc}"
msgstr "Prefixo: {prefix} | {desc}"
#: rcgcdw.py:434
#: rcgcdw.py:441
#, python-brace-format
msgid "Changed the content model of the page {article}"
msgstr "Alterou o modelo de conteúdo da página {article}"
#: rcgcdw.py:435
#: rcgcdw.py:442
#, python-brace-format
msgid "Model changed from {old} to {new}: {reason}"
msgstr "Modelo alterado de {old} para {new}: {reason}"
#: rcgcdw.py:441
#: rcgcdw.py:448
#, python-brace-format
msgid "Edited the sprite for {article}"
msgstr "Editou o sprite para {article}"
#: rcgcdw.py:445
#: rcgcdw.py:452
#, python-brace-format
msgid "Created the sprite sheet for {article}"
msgstr "Criou a folha de sprites para {article}"
#: rcgcdw.py:449
#: rcgcdw.py:456
#, python-brace-format
msgid "Edited the slice for {article}"
msgstr "Editou a fatia de {article}"
#: rcgcdw.py:452
#: rcgcdw.py:459
#, python-brace-format
msgid "Created a tag \"{tag}\""
msgstr "Criei uma etiqueta \"{tag}\""
#: rcgcdw.py:456
#: rcgcdw.py:463
#, python-brace-format
msgid "Deleted a tag \"{tag}\""
msgstr "Excluiu uma etiqueta \"{tag}\""
#: rcgcdw.py:460
#: rcgcdw.py:467
#, python-brace-format
msgid "Activated a tag \"{tag}\""
msgstr "Ativou uma etiqueta \"{tag}\""
#: rcgcdw.py:463
#: rcgcdw.py:470
#, python-brace-format
msgid "Deactivated a tag \"{tag}\""
msgstr "Desativou uma etiqueta \"{tag}\""
#: rcgcdw.py:466
msgid "Action has been hidden by Gamepedia staff."
msgstr "Action has been hidden by Gamepedia staff."
#: rcgcdw.py:473
msgid "Action has been hidden by administration."
msgstr ""
#: rcgcdw.py:487
#: rcgcdw.py:494
msgid "Tags"
msgstr "Etiquetas"
#: rcgcdw.py:493
#: rcgcdw.py:500
msgid "**Added**: "
msgstr "**Adicionado**: "
#: rcgcdw.py:493
#: rcgcdw.py:500
msgid " and {} more\n"
msgstr " e {} mais\n"
#: rcgcdw.py:494
#: rcgcdw.py:501
msgid "**Removed**: "
msgstr "**Removida**: "
#: rcgcdw.py:494
#: rcgcdw.py:501
msgid " and {} more"
msgstr " e {} mais"
#: rcgcdw.py:495
#: rcgcdw.py:502
msgid "Changed categories"
msgstr "Mudanças de categorias"
#: rcgcdw.py:667
#: rcgcdw.py:543
msgid "~~hidden~~"
msgstr ""
#: rcgcdw.py:551
msgid "hidden"
msgstr ""
#: rcgcdw.py:682
msgid "Unable to process the event"
msgstr "Não é possível processar o evento"
#: rcgcdw.py:667
#: rcgcdw.py:682
msgid "error"
msgstr "erro"
#: rcgcdw.py:766
#: rcgcdw.py:783
msgid "Daily overview"
msgstr "Visão geral diária"
#: rcgcdw.py:782
#: rcgcdw.py:793
msgid " ({} action)"
msgid_plural " ({} actions)"
msgstr[0] " ({} açao)"
msgstr[1] " ({} ações)"
#: rcgcdw.py:783
#: rcgcdw.py:799
msgid " UTC ({} action)"
msgid_plural " UTC ({} actions)"
msgstr[0] " UTC ({} ação)"
msgstr[1] " UTC ({} ações)"
#: rcgcdw.py:785 rcgcdw.py:786
#: rcgcdw.py:801 rcgcdw.py:802
msgid "But nobody came"
msgstr "Mas ninguém veio"
#: rcgcdw.py:791
#: rcgcdw.py:807
msgid "Most active user"
msgid_plural "Most active users"
msgstr[0] "Usuário mais ativo"
msgstr[1] "Usuários mais ativos"
#: rcgcdw.py:792
#: rcgcdw.py:808
msgid "Edits made"
msgstr "Edições feitas"
#: rcgcdw.py:792
#: rcgcdw.py:808
msgid "New files"
msgstr "Novos arquivos"
#: rcgcdw.py:792
#: rcgcdw.py:808
msgid "Admin actions"
msgstr "Ações de administração"
#: rcgcdw.py:793
#: rcgcdw.py:809
msgid "Bytes changed"
msgstr "Bytes alterados"
#: rcgcdw.py:793
#: rcgcdw.py:809
msgid "New articles"
msgstr "Novos artigos"
#: rcgcdw.py:794
#: rcgcdw.py:810
msgid "Unique contributors"
msgstr "Contribuidores exclusivos"
#: rcgcdw.py:795
#: rcgcdw.py:811
msgid "Most active hour"
msgid_plural "Most active hours"
msgstr[0] "Hora mais ativa"
msgstr[1] "Horas mais ativas"
#: rcgcdw.py:796
#: rcgcdw.py:812
msgid "Day score"
msgstr "Pontuação do dia"
#: rcgcdw.py:944
#: rcgcdw.py:957
#, python-brace-format
msgid "Connection to {wiki} seems to be stable now."
msgstr "A conexão com {wiki} parece estar estável agora."
#: rcgcdw.py:945 rcgcdw.py:1044
#: rcgcdw.py:958 rcgcdw.py:1063
msgid "Connection status"
msgstr "Status da conexão"
#: rcgcdw.py:1043
#: rcgcdw.py:1062
#, python-brace-format
msgid "{wiki} seems to be down or unreachable."
msgstr "{wiki} parece estar inativo ou inacessível."
#: rcgcdw.py:1074
#: rcgcdw.py:1097
msgid "director"
msgstr "diretor"
#: rcgcdw.py:1074
#: rcgcdw.py:1097
msgid "bot"
msgstr "robô"
#: rcgcdw.py:1074
#: rcgcdw.py:1097
msgid "editor"
msgstr "editor"
#: rcgcdw.py:1074
#: rcgcdw.py:1097
msgid "directors"
msgstr "diretores"
#: rcgcdw.py:1074
#: rcgcdw.py:1097
msgid "sysop"
msgstr "administrador"
#: rcgcdw.py:1074
#: rcgcdw.py:1097
msgid "bureaucrat"
msgstr "burocrata"
#: rcgcdw.py:1074
#: rcgcdw.py:1097
msgid "reviewer"
msgstr "revisor"
#: rcgcdw.py:1075
#: rcgcdw.py:1098
msgid "autoreview"
msgstr "revisão automática"
#: rcgcdw.py:1075
#: rcgcdw.py:1098
msgid "autopatrol"
msgstr "patrulha automatica"
#: rcgcdw.py:1075
#: rcgcdw.py:1098
msgid "wiki_guardian"
msgstr "guardião_wiki"

View file

@ -212,7 +212,7 @@ def webhook_formatter(action, STATIC, **params):
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:])
filenamewon=article_encoded.split(":", 1)[1])
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"])
@ -489,7 +489,7 @@ def webhook_formatter(action, STATIC, **params):
embed["url"] = link
if "desc" not in params:
params["desc"] = ""
embed["description"] = re.sub(r"(`|_|\*|~|<|>|{|})", "\\\\\\1", params["desc"], 0)
embed["description"] = params["desc"]
embed["color"] = random.randrange(1, 16777215) if colornumber is None else math.floor(colornumber)
embed["timestamp"] = STATIC["timestamp"]
if STATIC["tags"]: