Skip to content

Commit

Permalink
fix: escape html in more texts
Browse files Browse the repository at this point in the history
  • Loading branch information
HitaloM committed Sep 11, 2024
1 parent b0b2fd4 commit 8ae826a
Show file tree
Hide file tree
Showing 15 changed files with 118 additions and 90 deletions.
138 changes: 69 additions & 69 deletions locales/bot.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2024-09-10 21:35-0300\n"
"POT-Creation-Date: 2024-09-10 22:39-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -415,7 +415,7 @@ msgstr ""
msgid "No recent tracks found for your LastFM account."
msgstr ""

#: src/korone/modules/lastfm/handlers/collage.py:47
#: src/korone/modules/lastfm/handlers/collage.py:49
msgid "No top albums found for your LastFM account."
msgstr ""

Expand All @@ -436,7 +436,7 @@ msgid "Bots won't have music taste!"
msgstr ""

#: src/korone/modules/lastfm/handlers/compat.py:76
#: src/korone/modules/lastfm/utils/commons.py:15
#: src/korone/modules/lastfm/utils/commons.py:17
msgid ""
"You need to set your LastFM username first! Example: <code>/setlfm "
"username</code>."
Expand All @@ -459,21 +459,21 @@ msgid ""
"Compatibility score is {score}%, based on {period}"
msgstr ""

#: src/korone/modules/lastfm/handlers/recent.py:30
#: src/korone/modules/lastfm/handlers/recent.py:32
msgid "No recent tracks found."
msgstr ""

#: src/korone/modules/lastfm/handlers/recent.py:40
#: src/korone/modules/lastfm/handlers/recent.py:44
msgid "{user} is listening to:\n"
msgstr ""

#: src/korone/modules/lastfm/handlers/recent.py:42
#: src/korone/modules/lastfm/handlers/recent.py:47
msgid ""
"\n"
"Last 5 plays:"
msgstr ""

#: src/korone/modules/lastfm/handlers/recent.py:45
#: src/korone/modules/lastfm/handlers/recent.py:50
msgid "{user} was listening to:\n"
msgstr ""

Expand All @@ -491,33 +491,33 @@ msgstr ""
msgid "LastFM username set successfully!"
msgstr ""

#: src/korone/modules/lastfm/handlers/top.py:35
#: src/korone/modules/lastfm/handlers/top.py:37
msgid "Invalid entry type! Use one of the following: artist, track, album"
msgstr ""

#: src/korone/modules/lastfm/handlers/top.py:53
#: src/korone/modules/lastfm/handlers/top.py:55
msgid "No top items found."
msgstr ""

#: src/korone/modules/lastfm/handlers/top.py:57
#: src/korone/modules/lastfm/handlers/top.py:61
msgid ""
"{user}'s top 5 {entry} for {period}:\n"
"\n"
msgstr ""

#: src/korone/modules/lastfm/handlers/top.py:59
#: src/korone/modules/lastfm/handlers/top.py:63
msgid "artists"
msgstr ""

#: src/korone/modules/lastfm/handlers/top.py:61
#: src/korone/modules/lastfm/handlers/top.py:65
msgid "tracks"
msgstr ""

#: src/korone/modules/lastfm/handlers/top.py:63
#: src/korone/modules/lastfm/handlers/top.py:67
msgid "albums"
msgstr ""

#: src/korone/modules/lastfm/handlers/top.py:72
#: src/korone/modules/lastfm/handlers/top.py:76
msgid " -> {scrobbles} plays\n"
msgstr ""

Expand All @@ -533,25 +533,25 @@ msgid ""
"Registered: <i>{registered}</i>"
msgstr ""

#: src/korone/modules/lastfm/utils/commons.py:26
#: src/korone/modules/lastfm/utils/commons.py:28
msgid "Your LastFM username was not found! Try setting it again."
msgstr ""

#: src/korone/modules/lastfm/utils/commons.py:29
#: src/korone/modules/lastfm/utils/commons.py:31
msgid ""
"An error occurred while fetching your LastFM data!\n"
"<blockquote>{error}</blockquote>"
msgstr ""

#: src/korone/modules/lastfm/utils/commons.py:45
#: src/korone/modules/lastfm/utils/commons.py:47
msgid "{user}'s is listening to:\n"
msgstr ""

#: src/korone/modules/lastfm/utils/commons.py:47
#: src/korone/modules/lastfm/utils/commons.py:49
msgid "{user}'s was listening to:\n"
msgstr ""

#: src/korone/modules/lastfm/utils/commons.py:51
#: src/korone/modules/lastfm/utils/commons.py:53
msgid " ∙ <code>{playcount} plays</code>"
msgstr ""

Expand Down Expand Up @@ -595,108 +595,108 @@ msgstr ""
msgid "All time"
msgstr ""

#: src/korone/modules/medias/handlers/bluesky.py:59
#: src/korone/modules/medias/handlers/bluesky.py:60
msgid "Open in BueSky"
msgstr ""

#: src/korone/modules/medias/handlers/bluesky.py:66
#: src/korone/modules/medias/handlers/bluesky.py:67
msgid "Open in BlueSky"
msgstr ""

#: src/korone/modules/medias/handlers/instagram.py:65
#: src/korone/modules/medias/handlers/instagram.py:72
#: src/korone/modules/medias/handlers/instagram.py:66
#: src/korone/modules/medias/handlers/instagram.py:73
msgid "Open in Instagram"
msgstr ""

#: src/korone/modules/medias/handlers/threads.py:65
#: src/korone/modules/medias/handlers/threads.py:72
#: src/korone/modules/medias/handlers/threads.py:66
#: src/korone/modules/medias/handlers/threads.py:73
msgid "Open in Threads"
msgstr ""

#: src/korone/modules/medias/handlers/tiktok.py:148
#: src/korone/modules/medias/handlers/tiktok.py:194
#: src/korone/modules/medias/handlers/tiktok.py:149
#: src/korone/modules/medias/handlers/tiktok.py:195
msgid "Open in TikTok"
msgstr ""

#: src/korone/modules/medias/handlers/twitter.py:51
#: src/korone/modules/medias/handlers/twitter.py:163
#: src/korone/modules/medias/handlers/twitter.py:52
#: src/korone/modules/medias/handlers/twitter.py:164
msgid "Open in Twitter"
msgstr ""

#: src/korone/modules/medias/handlers/twitter.py:73
#: src/korone/modules/medias/handlers/twitter.py:74
msgid ""
"\n"
"<b>Sent from:</b> <i>{source}</i>"
msgstr ""

#: src/korone/modules/medias/handlers/youtube.py:38
#: src/korone/modules/medias/handlers/youtube.py:39
msgid "Invalid YouTube URL!"
msgstr ""

#: src/korone/modules/medias/handlers/youtube.py:60
#: src/korone/modules/medias/handlers/youtube.py:61
msgid "No YouTube URL found in the replied message."
msgstr ""

#: src/korone/modules/medias/handlers/youtube.py:63
#: src/korone/modules/medias/handlers/youtube.py:64
msgid ""
"You need to provide a URL or reply to a message that contains a URL. "
"Example: <code>/ytdl https://www.youtube.com/watch?v=dQw4w9WgXcQ</code>"
msgstr ""

#: src/korone/modules/medias/handlers/youtube.py:75
#: src/korone/modules/medias/handlers/youtube.py:76
msgid "Failed to extract video info!"
msgstr ""

#: src/korone/modules/medias/handlers/youtube.py:80
#: src/korone/modules/medias/handlers/youtube.py:81
msgid "<b>Title:</b> {title}\n"
msgstr ""

#: src/korone/modules/medias/handlers/youtube.py:81
#: src/korone/modules/medias/handlers/youtube.py:82
msgid "<b>Uploader:</b> {uploader}\n"
msgstr ""

#: src/korone/modules/medias/handlers/youtube.py:87
#: src/korone/modules/medias/handlers/youtube.py:88
msgid "<b>Duration:</b> {hours}h {minutes}m {seconds}s\n"
msgstr ""

#: src/korone/modules/medias/handlers/youtube.py:92
#: src/korone/modules/medias/handlers/youtube.py:93
msgid "<b>Duration:</b> {minutes}m {seconds}s\n"
msgstr ""

#: src/korone/modules/medias/handlers/youtube.py:96
#: src/korone/modules/medias/handlers/youtube.py:97
msgid "<b>Duration:</b> {seconds}s\n"
msgstr ""

#: src/korone/modules/medias/handlers/youtube.py:100
#: src/korone/modules/medias/handlers/youtube.py:101
msgid "<b>Views:</b> {view_count}\n"
msgstr ""

#: src/korone/modules/medias/handlers/youtube.py:103
#: src/korone/modules/medias/handlers/youtube.py:104
msgid "<b>Likes:</b> Unknown\n"
msgstr ""

#: src/korone/modules/medias/handlers/youtube.py:106
#: src/korone/modules/medias/handlers/youtube.py:107
msgid "<b>Likes:</b> {like_count}\n"
msgstr ""

#: src/korone/modules/medias/handlers/youtube.py:114
#: src/korone/modules/medias/handlers/youtube.py:115
msgid "Download video"
msgstr ""

#: src/korone/modules/medias/handlers/youtube.py:118
#: src/korone/modules/medias/handlers/youtube.py:119
msgid "Download audio"
msgstr ""

#: src/korone/modules/medias/handlers/youtube.py:147
#: src/korone/modules/medias/handlers/youtube.py:148
msgid "Downloading..."
msgstr ""

#: src/korone/modules/medias/handlers/youtube.py:153
#: src/korone/modules/medias/handlers/youtube.py:154
msgid "Uploading..."
msgstr ""

#: src/korone/modules/medias/handlers/youtube.py:170
#: src/korone/modules/medias/handlers/youtube.py:185
#: src/korone/modules/medias/handlers/youtube.py:171
#: src/korone/modules/medias/handlers/youtube.py:186
msgid "Failed to download the media."
msgstr ""

Expand Down Expand Up @@ -766,26 +766,26 @@ msgstr ""
msgid "Shader pack"
msgstr ""

#: src/korone/modules/minecraft/handlers/servers.py:26
#: src/korone/modules/minecraft/handlers/servers.py:27
msgid ""
"You need to provide a server address. Example: <code>/mcserver "
"mc.hypixel.net</code>."
msgstr ""

#: src/korone/modules/minecraft/handlers/servers.py:37
#: src/korone/modules/minecraft/handlers/servers.py:38
msgid ""
"Invalid server address. Please provide a valid IP address or hostname, "
"optionally with a port. Example: <code>/mcserver mc.hypixel.net</code> or"
" <code>/mcserver mc.hypixel.net:25565</code>."
msgstr ""

#: src/korone/modules/minecraft/handlers/servers.py:49
#: src/korone/modules/minecraft/handlers/servers.py:50
msgid ""
"This Minecraft server is currently offline or is not a valid Minecraft "
"server. Please check the address and try again."
msgstr ""

#: src/korone/modules/minecraft/handlers/servers.py:56
#: src/korone/modules/minecraft/handlers/servers.py:57
msgid ""
"<b>Server Status for {address}</b>:\n"
"<b>Players</b>: {player_count}\n"
Expand Down Expand Up @@ -1089,71 +1089,71 @@ msgid ""
"Forwarded user ID: <code>{id}</code>"
msgstr ""

#: src/korone/modules/users/handlers/users.py:23
#: src/korone/modules/users/handlers/users.py:25
msgid "Invalid identifier provided."
msgstr ""

#: src/korone/modules/users/handlers/users.py:30
#: src/korone/modules/users/handlers/users.py:32
msgid "No user found with the provided identifier"
msgstr ""

#: src/korone/modules/users/handlers/users.py:41
#: src/korone/modules/users/handlers/users.py:43
msgid "The provided user ID is invalid."
msgstr ""

#: src/korone/modules/users/handlers/users.py:42
#: src/korone/modules/users/handlers/users.py:44
msgid "The provided username is invalid."
msgstr ""

#: src/korone/modules/users/handlers/users.py:43
#: src/korone/modules/users/handlers/users.py:45
msgid "The provided username does not exist."
msgstr ""

#: src/korone/modules/users/handlers/users.py:44
#: src/korone/modules/users/handlers/users.py:46
msgid "No entity found with the provided identifier."
msgstr ""

#: src/korone/modules/users/handlers/users.py:45
#: src/korone/modules/users/handlers/users.py:47
msgid "Error accessing data."
msgstr ""

#: src/korone/modules/users/handlers/users.py:46
#: src/korone/modules/users/handlers/users.py:48
msgid "The provided value is not valid."
msgstr ""

#: src/korone/modules/users/handlers/users.py:53
#: src/korone/modules/users/handlers/users.py:55
msgid "An unexpected error occurred."
msgstr ""

#: src/korone/modules/users/handlers/users.py:58
#: src/korone/modules/users/handlers/users.py:60
msgid "Identifier must be a number"
msgstr ""

#: src/korone/modules/users/handlers/users.py:62
#: src/korone/modules/users/handlers/users.py:64
msgid "Identifier out of range for SQLite INTEGER"
msgstr ""

#: src/korone/modules/users/handlers/users.py:74
#: src/korone/modules/users/handlers/users.py:76
msgid "<b>User info</b>:\n"
msgstr ""

#: src/korone/modules/users/handlers/users.py:75
#: src/korone/modules/users/handlers/users.py:77
msgid "<b>ID</b>: <code>{id}</code>\n"
msgstr ""

#: src/korone/modules/users/handlers/users.py:76
#: src/korone/modules/users/handlers/users.py:78
msgid "<b>First Name</b>: {first_name}\n"
msgstr ""

#: src/korone/modules/users/handlers/users.py:79
#: src/korone/modules/users/handlers/users.py:83
msgid "<b>Last Name</b>: {last_name}\n"
msgstr ""

#: src/korone/modules/users/handlers/users.py:82
#: src/korone/modules/users/handlers/users.py:86
msgid "<b>Username</b>: @{username}\n"
msgstr ""

#: src/korone/modules/users/handlers/users.py:84
#: src/korone/modules/users/handlers/users.py:88
msgid "<b>User link</b>: <a href='tg://user?id={id}'>link</a>\n"
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion src/korone/modules/afk/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async def is_afk(user_id: int) -> bool:
return bool(doc[0]["state"]) if doc else False


async def get_afk_reason(user_id: int) -> Documents | None:
async def get_afk_reason(user_id: int) -> str | None:
async with SQLite3Connection() as conn:
table = await conn.table("Afk")
doc = await table.query(Query().id == user_id)
Expand Down
Loading

0 comments on commit 8ae826a

Please sign in to comment.