i18n: replace hardcoded strings with locale keys across all commands

- Add locale keys for gateway/MessageHandler permission error messages
- Add locale support to settings command (prettifySettingLabel now accepts t/guildId)
- Replace all hardcoded strings in player, search, seek, trackopt, vote, autoplay, debug, lastfm commands with this.t() calls
- Add new locale keys: command suggestions, vote descriptions, debug pagination, lastfm auth/link/profile/whoknows/leaderboard/playlists/artists strings
- Fix typos in en.json: broken backtick in alreadyLinked, extra $ in unlovedTrack artist template
- Add new locale key for command suggestion ("Did you mean...?")
- Remove "React to refresh" suffix from controls expired footer (now just uses locale key)
This commit is contained in:
NoLogicAlan committed 2026-05-25 20:47:58 +03:00
1 parent b581722c46
commit eeb27de9bb
19 files changed
+1476 -5862

No files matched your search

+4 -3
View File
@@ -137,10 +137,11 @@ export class GatewayHandler {
} catch (e) {
logger.warn(`[GuildCreate] Cannot send permission warning to server ${guildId}: ${e.message}`);
try {
const t = this.remix.locale?.translate?.bind(this.remix.locale);
const guildIdStr = String(guildId).replace(/\D/g, "");
await targetChannel.send(
"⚠️ I'm missing permissions I need to work properly! " +
"Missing: **" + missingNames.join("**, **") + "**. " +
"Please ask a server administrator to grant these permissions in Server Settings → Roles."
t ? t(guildIdStr, "responses.gateway.missingPermsFallback", { perms: missingNames.join("**, **") }) :
"⚠️ I'm missing permissions I need to work properly! Missing: **" + missingNames.join("**, **") + "**. Please ask a server administrator to grant these permissions in Server Settings → Roles."
);
} catch (_) {
logger.warn(`[GuildCreate] Cannot send ANY notification to server ${guildId} — bot is missing SendMessages permission.`);