Fixed curseprofile extension translations and removed unnecessary language files

This commit is contained in:
Frisk 2022-11-10 15:21:16 +01:00
parent ab710f5f77
commit 1742e8fbd0
No known key found for this signature in database
GPG key ID: 213F7C15068AF8AC
15 changed files with 10 additions and 16511 deletions

View file

@ -36,9 +36,9 @@ def embed_curseprofile_profile_edited(ctx: Context, change: dict) -> DiscordMess
else:
embed["title"] = ctx._("Edited their own profile")
if ctx.parsedcomment is None: # If the field is empty
embed["description"] = ctx._("Cleared the {field} field").format(field=profile_field_name(change["logparams"]['4:section'], True))
embed["description"] = ctx._("Cleared the {field} field").format(field=profile_field_name(change["logparams"]['4:section'], True, ctx._))
else:
embed["description"] = ctx._("{field} field changed to: {desc}").format(field=profile_field_name(change["logparams"]['4:section'], True), desc=ctx.parsedcomment)
embed["description"] = ctx._("{field} field changed to: {desc}").format(field=profile_field_name(change["logparams"]['4:section'], True, ctx._), desc=ctx.parsedcomment)
embed["url"] = ctx.client.create_article_path("UserProfile:" + sanitize_to_url(target_user))
return embed

View file

@ -20,7 +20,6 @@ import datetime, logging
from urllib.parse import quote_plus
from src.api.util import clean_link, sanitize_to_markdown
from src.api.context import Context
from src.discord.queue import send_to_discord
from src.discord.message import DiscordMessage, DiscordMessageMetadata
from src.api import formatter

File diff suppressed because it is too large Load diff

View file

@ -1,183 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the RcGcDw package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: RcGcDw\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-11-18 14:13+0100\n"
"PO-Revision-Date: 2020-12-22 00:13+0000\n"
"Last-Translator: Tamara Carvallo <carvallotamara@hotmail.com>\n"
"Language-Team: Spanish <https://translate.wikibot.de/projects/rcgcdw/"
"discussion_formatters-1/es/>\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.2.1\n"
#: src/discussion_formatters.py:25 src/discussion_formatters.py:81
msgid "Unregistered user"
msgstr "Usuario no registrado"
#: src/discussion_formatters.py:34
#, python-brace-format
msgid ""
"[{author}]({author_url}) created [{title}](<{url}f/p/{threadId}>) in "
"{forumName}"
msgstr ""
"[{author}]({author_url}) creó [{title}](<{url}f/p/{threadId}>) en {forumName}"
#: src/discussion_formatters.py:36
#, python-brace-format
msgid ""
"[{author}]({author_url}) created a poll [{title}](<{url}f/p/{threadId}>) in "
"{forumName}"
msgstr ""
"[{author}]({author_url}) creó una encuesta [{title}](<{url}f/p/{threadId}>) "
"en {forumName}"
#: src/discussion_formatters.py:38
#, python-brace-format
msgid ""
"[{author}]({author_url}) created a quiz [{title}](<{url}f/p/{threadId}>) in "
"{forumName}"
msgstr ""
"[{author}]({author_url}) creó un cuestionario [{title}](<{url}f/p/"
"{threadId}>) en {forumName}"
#: src/discussion_formatters.py:43
#, python-brace-format
msgid ""
"[{author}]({author_url}) created a [reply](<{url}f/p/{threadId}/r/{postId}>) "
"to [{title}](<{url}f/p/{threadId}>) in {forumName}"
msgstr ""
"[{author}]({author_url}) creó una [respuesta](<{url}f/p/{threadId}/r/"
"{postId}>) a [{title}](<{url}f/p/{threadId}>) en {forumName}"
#: src/discussion_formatters.py:45 src/discussion_formatters.py:54
#: src/discussion_formatters.py:137 src/discussion_formatters.py:150
msgid "unknown"
msgstr "desconocido"
#: src/discussion_formatters.py:49
#, python-brace-format
msgid ""
"[{author}]({author_url}) created [{title}](<{url}wiki/Message_Wall:"
"{user_wall}?threadId={threadId}>) on [{user}'s Message Wall](<{url}wiki/"
"Message_Wall:{user_wall}>)"
msgstr ""
"[{author}]({author_url}) creó [{title}](<{url}wiki/"
"Message_Wall:{user_wall}?threadId={threadId}>) en [{user}'s Message "
"Wall](<{url}wiki/Message_Wall:{user_wall}>)"
#: src/discussion_formatters.py:51
#, python-brace-format
msgid ""
"[{author}]({author_url}) created a [reply](<{url}wiki/Message_Wall:"
"{user_wall}?threadId={threadId}#{replyId}>) to [{title}](<{url}wiki/"
"Message_Wall:{user_wall}?threadId={threadId}>) on [{user}'s Message Wall]"
"(<{url}wiki/Message_Wall:{user_wall}>)"
msgstr ""
"[{author}]({author_url}) creó una [respuesta](<{url}wiki/"
"Message_Wall:{user_wall}?threadId={threadId}#{replyId}>) a [{title}](<{url}"
"wiki/Message_Wall:{user_wall}?threadId={threadId}>) en el [{user} Muro de "
"Mensajes](<{url}wiki/Message_Wall:{user_wall}>)"
#: src/discussion_formatters.py:57
#, python-brace-format
msgid ""
"[{author}]({author_url}) created a [comment](<{url}?commentId={commentId}>) "
"on [{article}](<{url}>)"
msgstr ""
"[{author}]({author_url}) creó un [comentario](<{url}?commentId={commentId}>) "
"en [{article}](<{url}>)"
#: src/discussion_formatters.py:62
#, python-brace-format
msgid ""
"[{author}]({author_url}) created a [reply](<{url}?commentId={commentId}"
"&replyId={replyId}>) to a [comment](<{url}?commentId={commentId}>) on "
"[{article}](<{url}>)"
msgstr ""
"[{author}]({author_url}) creó una "
"[respuesta](<{url}?commentId={commentId}&replyId={replyId}>) a un "
"[comentario](<{url}?commentId={commentId}>) en [{article}](<{url}>)"
#: src/discussion_formatters.py:70
#, python-brace-format
msgid ""
"Unknown event `{event}` by [{author}]({author_url}), report it on the "
"[support server](<{support}>)."
msgstr ""
"Evento desconocido `{event}` por [{author}]({author_url}), repórtalo en el ["
"servidor de soporte](<{support}>)."
#: src/discussion_formatters.py:98
#, python-brace-format
msgid "Created \"{title}\""
msgstr "Creó \"{title}\""
#: src/discussion_formatters.py:102
#, python-brace-format
msgid "Created a poll \"{title}\""
msgstr "Creó una encuesta \"{title}\""
#: src/discussion_formatters.py:109
msgid "Option {}"
msgstr "Opción {}"
#: src/discussion_formatters.py:110
#, python-brace-format
msgid "__[View image]({image_url})__"
msgstr "__[Ver imagen]({image_url})__"
#: src/discussion_formatters.py:114
#, python-brace-format
msgid "Created a quiz \"{title}\""
msgstr "Creó un cuestionario \"{title}\""
#: src/discussion_formatters.py:129 src/discussion_formatters.py:131
msgid "Tags"
msgstr "Etiquetas"
#: src/discussion_formatters.py:129
msgid "{} tags"
msgstr "{} etiquetas"
#: src/discussion_formatters.py:134
#, python-brace-format
msgid "Replied to \"{title}\""
msgstr "Respondió a \"{title}\""
#: src/discussion_formatters.py:143
#, python-brace-format
msgid "Created \"{title}\" on {user}'s Message Wall"
msgstr "Creó \"{title}\" en el muro de mensajes de {user}"
#: src/discussion_formatters.py:147
#, python-brace-format
msgid "Replied to \"{title}\" on {user}'s Message Wall"
msgstr "Respondió a \"{title}\" en el muro de mensajes de {user}"
#: src/discussion_formatters.py:154
#, python-brace-format
msgid "Commented on {article}"
msgstr "Comentó en {article}"
#: src/discussion_formatters.py:158
#, python-brace-format
msgid "Replied to a comment on {article}"
msgstr "Respondió a un comentario en {article}"
#: src/discussion_formatters.py:162
#, python-brace-format
msgid "Unknown event `{event}`"
msgstr "Evento desconocido `{event}`"
#: src/discussion_formatters.py:168 src/discussion_formatters.py:170
msgid "Report this on the support server"
msgstr "Reporta esto en el servidor de soporte"

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -42,9 +42,6 @@ WIKI_ARTICLE_PATH: str = ""
WIKI_SCRIPT_PATH: str = ""
WIKI_JUST_DOMAIN: str = ""
profile_fields = {"profile-location": _("Location"), "profile-aboutme": _("About me"), "profile-link-google": _("Google link"), "profile-link-facebook":_("Facebook link"), "profile-link-twitter": _("Twitter link"), "profile-link-reddit": _("Reddit link"), "profile-link-twitch": _("Twitch link"), "profile-link-psn": _("PSN link"), "profile-link-vk": _("VK link"), "profile-link-xbl": _("XBL link"), "profile-link-steam": _("Steam link"), "profile-link-discord": _("Discord handle"), "profile-link-battlenet": _("Battle.net handle")}
class DataFile:
"""Data class which instance of is shared by multiple modules to remain consistent and do not cause too many IO operations."""
def __init__(self):
@ -322,7 +319,14 @@ def run_hooks(hooks, *arguments):
raise
def profile_field_name(name, embed):
def profile_field_name(name, embed, _):
profile_fields = {"profile-location": _("Location"), "profile-aboutme": _("About me"),
"profile-link-google": _("Google link"), "profile-link-facebook": _("Facebook link"),
"profile-link-twitter": _("Twitter link"), "profile-link-reddit": _("Reddit link"),
"profile-link-twitch": _("Twitch link"), "profile-link-psn": _("PSN link"),
"profile-link-vk": _("VK link"), "profile-link-xbl": _("XBL link"),
"profile-link-steam": _("Steam link"), "profile-link-discord": _("Discord handle"),
"profile-link-battlenet": _("Battle.net handle")}
try:
return profile_fields[name]
except KeyError: