Add localized response strings for normalize, bassboost, speed, and pitch across all 6 locales

This commit is contained in:
NoLogicAlan committed 2026-10-22 02:10:42 +03:00
1 parent 351336ea19
commit ee1b9be917
10 files changed
+269 -24

No files matched your search

+3 -3
View File
@@ -85,7 +85,7 @@ export async function run(message, data) {
if (levelArg === "off" || levelArg === "none" || levelArg === "reset") {
await p.applyFilter({}, null);
embed.setDescription("🔇 Bass boost disabled — restored original audio balance.");
embed.setDescription(this.t(message, "responses.bassboost.disabled"));
return message.reply({ embeds: [embed] }).catch(() => {});
}
@@ -98,10 +98,10 @@ export async function run(message, data) {
const res = await p.applyFilter({ equalizer: preset.equalizer }, filterMeta);
if (!res.ok) {
embed.setDescription(`❌ Failed to apply bass boost: ${res.reason || "Unknown error"}`);
embed.setDescription(this.t(message, "responses.bassboost.failed", { reason: res.reason || "Unknown error" }));
return message.reply({ embeds: [embed] }).catch(() => {});
}
embed.setDescription(`🔊 Applied **Bass Boost (${preset.label})**! Real-time equalizer active.`);
embed.setDescription(this.t(message, "responses.bassboost.applied", { level: preset.label }));
message.reply({ embeds: [embed] }).catch(() => {});
}
+11 -8
View File
@@ -70,11 +70,12 @@ export async function run(message, data) {
}
const embed = new EmbedBuilder().setColor(getGlobalColor());
const statusEmoji = newState ? "🔊" : "🔇";
const statusText = newState ? "**Enabled**" : "**Disabled**";
const statusMsg = newState
? this.t(message, "responses.normalize.statusEnabled")
: this.t(message, "responses.normalize.statusDisabled");
const infoMsg = this.t(message, "responses.normalize.info");
let desc = `${statusEmoji} Volume normalization (ReplayGain) is currently ${statusText} for this server.\n\n` +
`*When enabled, playback loudness is dynamically leveled to the international -14 LUFS standard so quiet acoustic songs and loud EDM/SoundCloud tracks play at a balanced listening volume.*`;
let desc = `${statusMsg}\n\n*${infoMsg}*`;
if (p) {
const current = p.queue?.getCurrent?.();
@@ -83,10 +84,12 @@ export async function run(message, data) {
const gain = calculateNormalizationGain(current);
const gainDb = (20 * Math.log10(gain)).toFixed(1);
const gainSign = gain >= 1 ? "+" : "";
desc += `\n\n**Current Track Info:**\n` +
`• Source: \`${source}\`\n` +
`• Gain adjustment: \`${gainSign}${gainDb} dB\` (${(gain * 100).toFixed(0)}%)\n` +
`• Effective volume: \`${Math.round(p.getEffectiveVolume())}%\``;
desc += "\n\n" + this.t(message, "responses.normalize.trackInfo", {
source,
gainDb: `${gainSign}${gainDb}`,
gainPct: (gain * 100).toFixed(0),
effective: Math.round(p.getEffectiveVolume()),
});
}
}
+5 -4
View File
@@ -44,9 +44,10 @@ export async function run(message, data) {
const existingPayload = { ...(p.activeFilterPayload || {}) };
delete existingPayload.timescale;
await p.applyFilter(existingPayload, Object.keys(existingPayload).length > 0 ? p.activeFilter : null);
embed.setDescription("🎵 Audio pitch reset to normal **1.0×**.");
embed.setDescription(this.t(message, "responses.pitch.reset"));
} else {
embed.setDescription(`🎵 Current audio pitch: **1.0×**.\nUse \`%pitch <0.5-2.0>\` to change pitch.`);
const prefix = this.handler?.getPrefix?.(message.message?.guildId ?? message.guild?.id) ?? "%";
embed.setDescription(this.t(message, "responses.pitch.current", { pitch: "1.0", prefix }));
}
return message.reply({ embeds: [embed] }).catch(() => {});
}
@@ -74,10 +75,10 @@ export async function run(message, data) {
const res = await p.applyFilter(payload, filterMeta);
if (!res.ok) {
embed.setDescription(`❌ Failed to adjust pitch: ${res.reason || "Unknown error"}`);
embed.setDescription(this.t(message, "responses.pitch.failed", { reason: res.reason || "Unknown error" }));
return message.reply({ embeds: [embed] }).catch(() => {});
}
embed.setDescription(`🎵 Audio pitch set to **${pitch}×**.`);
embed.setDescription(this.t(message, "responses.pitch.set", { pitch }));
message.reply({ embeds: [embed] }).catch(() => {});
}
+5 -4
View File
@@ -46,9 +46,10 @@ export async function run(message, data) {
const existingPayload = { ...(p.activeFilterPayload || {}) };
delete existingPayload.timescale;
await p.applyFilter(existingPayload, Object.keys(existingPayload).length > 0 ? p.activeFilter : null);
embed.setDescription("⏩ Playback speed reset to normal **1.0×**.");
embed.setDescription(this.t(message, "responses.speed.reset"));
} else {
embed.setDescription(`⏩ Current playback speed: **1.0×**.\nUse \`%speed <0.5-2.0>\` to change playback speed.`);
const prefix = this.handler?.getPrefix?.(message.message?.guildId ?? message.guild?.id) ?? "%";
embed.setDescription(this.t(message, "responses.speed.current", { speed: "1.0", prefix }));
}
return message.reply({ embeds: [embed] }).catch(() => {});
}
@@ -77,10 +78,10 @@ export async function run(message, data) {
const res = await p.applyFilter(payload, filterMeta);
if (!res.ok) {
embed.setDescription(`❌ Failed to adjust speed: ${res.reason || "Unknown error"}`);
embed.setDescription(this.t(message, "responses.speed.failed", { reason: res.reason || "Unknown error" }));
return message.reply({ embeds: [embed] }).catch(() => {});
}
embed.setDescription(`${speed > 1 ? "⏩" : "🐢"} Playback speed set to **${speed}×**.`);
embed.setDescription(this.t(message, "responses.speed.set", { emoji: speed > 1 ? "⏩" : "🐢", speed }));
message.reply({ embeds: [embed] }).catch(() => {});
}