Add missing translation keys for plugins (#856)

Add translations to equicord.json:
- voiceButtons: settings and options
- triviaAI: description, settings, ui
- noPushToTalk: description
- hideMessages: description, settings, ui
- voiceChatUtils: contextMenu labels
- equicordHelper: restoreFileDownloadButton setting

Add translations to vencord.json:
- messageClickActions: ReactEmojiSetting UI labels

Update source files to use t():
- voiceButtons/settings.ts
- triviaAI/settings.ts, index.tsx
- noPushToTalk/index.ts
- hideMessages/index.tsx
- voiceChatUtils/index.tsx
- equicordHelper/index.tsx
- messageClickActions/ReactEmojiSetting.tsx
This commit is contained in:
M 2026-03-02 02:47:35 +06:00 • committed by GitHub
parent 2070466829
commit fcdbbbcffd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 105 additions and 50 deletions

View file

@ -722,6 +722,9 @@
"noNitroUpsell": {
"description": "Removes Nitro upsells by overriding your premium type"
},
"noPushToTalk": {
"description": "Bypasses the push-to-talk requirement for voice activity in channels that enforce it."
},
"noRPC": {
"description": "Disables Discord's Rich Presence (RPC) feature"
},
@ -770,7 +773,8 @@
"noDefaultHangStatus": "Disable the default hang status when joining voice channels",
"refreshSlashCommands": "Refreshes Slash Commands to show newly added commands without restarting your client.",
"forceRoleIcon": "Forces role icons to display next to messages in compact mode",
"accountStandingButton": "Show an account standing button in the header bar"
"accountStandingButton": "Show an account standing button in the header bar",
"restoreFileDownloadButton": "Adds back the Download button at the top right corner of files"
},
"standing": {
"allGood": "All good!",
@ -1137,6 +1141,15 @@
"open": "Open"
}
},
"hideMessages": {
"description": "A plugin to temporarily hide messages until you restart.",
"settings": {
"hidePopoverButton": "Hide the hide button in the message popover."
},
"ui": {
"hide": "Hide"
}
},
"hideServers": {
"description": "Allows you to hide servers from the guild list and quick switcher by right clicking them",
"ui": {
@ -1902,6 +1915,21 @@
"openThemeLibrary": "Open Theme Library"
}
},
"triviaAI": {
"description": "A plugin that helps you answer trivia questions using AI.",
"settings": {
"apiKey": "API Key.",
"model": "AI Model to use.",
"systemPrompt": "System Prompt for the AI.",
"maxTokens": "Maximum number of tokens in the response.",
"endpoint": "OpenAI Compatible AI Endpoint.",
"autoRespond": "Automatically respond to messages on receiving a response.",
"supportImages": "Pass images to the AI for context (if any). This is not supported by all models."
},
"ui": {
"answerWithAI": "Answer With AI"
}
},
"tidalEmbeds": {
"description": "Embeds Tidal music links with a custom player"
},
@ -2163,9 +2191,26 @@
"voiceButtons": {
"description": "Adds quick action buttons (chat, mute, deafen) to voice channel users",
"settings": {
"showChatButton": "Show chat button",
"showMuteButton": "Show mute button",
"showDeafenButton": "Show deafen button"
"showChatButton": "Whether you want to display the chat button",
"showMuteButton": "Whether you want to display the mute button",
"showDeafenButton": "Whether you want to display the deafen button",
"muteSoundboard": "Toggles their soundboard upon clicking deafen button.",
"disableVideo": "Toggles their video upon clicking deafen button.",
"useServer": "Use server mute/deafen instead of local when you have permission.",
"serverSelf": "Deafen / Mute yourself on the server when using mute/deafen.",
"showButtonsSelf": "Whether you want to display buttons for your own user. Same functionality as other button(s) except it'll open DMs panel and mute/deafen for yourself upon clicking button(s).",
"whichNameToShow": "Choose whether to show nickname or username in tooltip.",
"buttonPosition": "Choose where to place voice buttons in the voice user row."
},
"options": {
"display": "Display",
"hide": "Hide",
"disable": "Disable",
"both": "Both",
"globalName": "Global Name",
"username": "Username",
"left": "Left",
"right": "Right"
}
},
"voiceChannelLog": {
@ -2194,6 +2239,7 @@
},
"contextMenu": {
"voiceTools": "Voice Tools",
"mentionAllUsers": "Mention all Users",
"disconnectAll": "Disconnect all",
"muteAll": "Mute all",
"unmuteAll": "Unmute all",

View file

@ -915,7 +915,10 @@
"linkCopied":"Link copied!",
"messageContentCopied":"Message content copied!",
"messageIdCopied":"Message ID copied!",
"userIdCopied":"User ID copied!"
"userIdCopied":"User ID copied!",
"selectEmojiForReactions": "Select Emoji For Reactions",
"selectAdditionalEmojis": "Select Additional Emojis",
"maxAdditionalEmojis": "comma/newline separated, max {count}"
}
},
"messageDecorationsAPI":{

View file

@ -103,7 +103,7 @@ const settings = definePluginSettings({
},
restoreFileDownloadButton: {
type: OptionType.BOOLEAN,
description: "Adds back the Download button at the top right corner of files",
description: t("equicordHelper.settings.restoreFileDownloadButton"),
restartNeeded: true,
default: false
},

View file

@ -7,6 +7,7 @@
import { findGroupChildrenByChildId, NavContextMenuPatchCallback } from "@api/ContextMenu";
import { definePluginSettings } from "@api/Settings";
import { EquicordDevs } from "@utils/constants";
import { t } from "@utils/translation";
import definePlugin, { IconComponent, OptionType } from "@utils/types";
import { Message } from "@vencord/discord-types";
import { findExportedComponentLazy } from "@webpack";
@ -31,7 +32,7 @@ const messageCtxPatch: NavContextMenuPatchCallback = (children, { message }: { m
group.splice(group.findIndex(c => c?.props?.id === "copy-text") + 1, 0, (
<Menu.MenuItem
id="vc-hidemessages"
label="Hide"
label={t("hideMessages.ui.hide")}
icon={EyeIcon}
action={() => hideMessage(message.id, message.channel_id)}
/>
@ -41,14 +42,14 @@ const messageCtxPatch: NavContextMenuPatchCallback = (children, { message }: { m
const settings = definePluginSettings({
hidePopoverButton: {
type: OptionType.BOOLEAN,
description: "Hide the hide button in the message popover.",
description: t("hideMessages.settings.hidePopoverButton"),
default: false
}
});
export default definePlugin({
name: "HideMessages",
description: "A plugin to temporarily hide messages until you restart.",
description: t("hideMessages.description"),
authors: [EquicordDevs.yash],
contextMenus: {
"message": messageCtxPatch
@ -59,7 +60,7 @@ export default definePlugin({
render(message: Message) {
if (settings.store.hidePopoverButton) return null;
return {
label: "Hide",
label: t("hideMessages.ui.hide"),
icon: EyeIcon,
message,
channel: ChannelStore.getChannel(message.channel_id),

View file

@ -5,11 +5,12 @@
*/
import { EquicordDevs } from "@utils/constants";
import { t } from "@utils/translation";
import definePlugin from "@utils/types";
export default definePlugin({
name: "NoPushToTalk",
description: "Bypasses the push-to-talk requirement for voice activity in channels that enforce it.",
description: t("noPushToTalk.description"),
authors: [EquicordDevs.omaw],
patches: [
{

View file

@ -6,6 +6,7 @@
import { findGroupChildrenByChildId, NavContextMenuPatchCallback } from "@api/ContextMenu";
import { EquicordDevs } from "@utils/constants";
import { t } from "@utils/translation";
import definePlugin, { IconComponent } from "@utils/types";
import { Message } from "@vencord/discord-types";
import { findExportedComponentLazy } from "@webpack";
@ -27,7 +28,7 @@ const messageCtxPatch: NavContextMenuPatchCallback = (children, { message }: { m
group.splice(group.findIndex(c => c?.props?.id === "copy-text") + 1, 0, (
<Menu.MenuItem
id="vc-trivia-ai"
label="Answer With AI"
label={t("triviaAI.ui.answerWithAI")}
icon={RobotIcon}
action={async () => {
const ans = await getResponse(payload);
@ -39,7 +40,7 @@ const messageCtxPatch: NavContextMenuPatchCallback = (children, { message }: { m
export default definePlugin({
name: "TriviaAI",
description: "A plugin that helps you answer trivia questions using AI.",
description: t("triviaAI.description"),
authors: [EquicordDevs.yash],
settings,
contextMenus: {
@ -52,7 +53,7 @@ export default definePlugin({
if (!payload) return null;
return {
label: "Answer With AI",
label: t("triviaAI.ui.answerWithAI"),
icon: RobotIcon,
message,
channel: ChannelStore.getChannel(message.channel_id),

View file

@ -5,12 +5,13 @@
*/
import { definePluginSettings } from "@api/Settings";
import { t } from "@utils/translation";
import { OptionType } from "@utils/types";
export const settings = definePluginSettings({
apiKey: {
type: OptionType.STRING,
description: "API Key.",
description: t("triviaAI.settings.apiKey"),
default: "",
placeholder: "Enter API Key here for your AI endpoint.",
componentProps: {
@ -19,35 +20,35 @@ export const settings = definePluginSettings({
},
model: {
type: OptionType.STRING,
description: "AI Model to use.",
description: t("triviaAI.settings.model"),
default: "google/gemini-3-flash-preview",
placeholder: "e.g. google/gemini-3-flash-preview, inception/mercury, openai/gpt-5.2-chat, etc."
},
systemPrompt: {
type: OptionType.STRING,
description: "System Prompt for the AI.",
description: t("triviaAI.settings.systemPrompt"),
default: "You are a helpful assistant who answers questions for the user in a concise and short way while using the least amount of words and punctuation.",
placeholder: "Enter system prompt."
},
maxTokens: {
type: OptionType.NUMBER,
description: "Maximum number of tokens in the response.",
description: t("triviaAI.settings.maxTokens"),
default: 500
},
endpoint: {
type: OptionType.STRING,
description: "OpenAI Compatible AI Endpoint.",
description: t("triviaAI.settings.endpoint"),
default: "https://openrouter.ai/api/v1/chat/completions",
placeholder: "Enter your OpenAI compatible AI endpoint here."
},
autoRespond: {
type: OptionType.BOOLEAN,
description: "Automatically respond to messages on receiving a response.",
description: t("triviaAI.settings.autoRespond"),
default: false
},
supportImages: {
type: OptionType.BOOLEAN,
description: "Pass images to the AI for context (if any). This is not supported by all models.",
description: t("triviaAI.settings.supportImages"),
default: true
}
});

View file

@ -5,72 +5,73 @@
*/
import { definePluginSettings } from "@api/Settings";
import { t } from "@utils/translation";
import { OptionType } from "@utils/types";
export const settings = definePluginSettings({
showChatButton: {
type: OptionType.BOOLEAN,
default: true,
description: "Whether you want to display the chat button",
description: t("voiceButtons.settings.showChatButton"),
restartNeeded: true,
},
showMuteButton: {
type: OptionType.BOOLEAN,
default: true,
description: "Whether you want to display the mute button",
description: t("voiceButtons.settings.showMuteButton"),
restartNeeded: true,
},
showDeafenButton: {
type: OptionType.BOOLEAN,
default: true,
description: "Whether you want to display the deafen button",
description: t("voiceButtons.settings.showDeafenButton"),
restartNeeded: true,
},
muteSoundboard: {
type: OptionType.BOOLEAN,
default: true,
description: "Toggles their soundboard upon clicking deafen button.",
description: t("voiceButtons.settings.muteSoundboard"),
},
disableVideo: {
type: OptionType.BOOLEAN,
default: true,
description: "Toggles their video upon clicking deafen button.",
description: t("voiceButtons.settings.disableVideo"),
},
useServer: {
type: OptionType.BOOLEAN,
description: "Use server mute/deafen instead of local when you have permission.",
description: t("voiceButtons.settings.useServer"),
default: false,
},
serverSelf: {
type: OptionType.BOOLEAN,
description: "Deafen / Mute yourself on the server when using mute/deafen.",
description: t("voiceButtons.settings.serverSelf"),
default: false,
},
showButtonsSelf: {
type: OptionType.SELECT,
description: "Whether you want to display buttons for your own user. Same functionality as other button(s) except it'll open DMs panel and mute/deafen for yourself upon clicking button(s).",
description: t("voiceButtons.settings.showButtonsSelf"),
restartNeeded: true,
options: [
{ label: "Display", value: "display", default: true },
{ label: "Hide", value: "hide" },
{ label: "Disable", value: "disable" },
{ label: t("voiceButtons.options.display"), value: "display", default: true },
{ label: t("voiceButtons.options.hide"), value: "hide" },
{ label: t("voiceButtons.options.disable"), value: "disable" },
],
},
whichNameToShow: {
type: OptionType.SELECT,
description: "Choose whether to show nickname or username in tooltip.",
description: t("voiceButtons.settings.whichNameToShow"),
options: [
{ label: "Both", value: "both", default: true },
{ label: "Global Name", value: "global" },
{ label: "Username", value: "username" },
{ label: t("voiceButtons.options.both"), value: "both", default: true },
{ label: t("voiceButtons.options.globalName"), value: "global" },
{ label: t("voiceButtons.options.username"), value: "username" },
],
},
buttonPosition: {
type: OptionType.SELECT,
description: "Choose where to place voice buttons in the voice user row.",
description: t("voiceButtons.settings.buttonPosition"),
options: [
{ label: "Left", value: "left", default: true },
{ label: "Right", value: "right" },
{ label: t("voiceButtons.options.left"), value: "left", default: true },
{ label: t("voiceButtons.options.right"), value: "right" },
],
}
}, {

View file

@ -78,21 +78,21 @@ const VoiceChannelContext: NavContextMenuPatchCallback = (children, { channel }:
-1,
0,
<Menu.MenuItem
label="Voice Tools"
label={t("voiceChatUtils.contextMenu.voiceTools")}
key="voice-tools"
id="voice-tools"
>
<Menu.MenuItem
key="voice-tools-mention-all"
id="voice-tools-mention-all"
label="Mention all Users"
label={t("voiceChatUtils.contextMenu.mentionAllUsers")}
action={() => mentionVoiceUsers(channel)}
/>
<Menu.MenuItem
key="voice-tools-disconnect-all"
id="voice-tools-disconnect-all"
label="Disconnect all"
label={t("voiceChatUtils.contextMenu.disconnectAll")}
action={() => sendPatch(channel, {
channel_id: null,
})}
@ -101,7 +101,7 @@ const VoiceChannelContext: NavContextMenuPatchCallback = (children, { channel }:
<Menu.MenuItem
key="voice-tools-mute-all"
id="voice-tools-mute-all"
label="Mute all"
label={t("voiceChatUtils.contextMenu.muteAll")}
action={() => sendPatch(channel, {
mute: true,
})}
@ -110,7 +110,7 @@ const VoiceChannelContext: NavContextMenuPatchCallback = (children, { channel }:
<Menu.MenuItem
key="voice-tools-unmute-all"
id="voice-tools-unmute-all"
label="Unmute all"
label={t("voiceChatUtils.contextMenu.unmuteAll")}
action={() => sendPatch(channel, {
mute: false,
})}
@ -119,7 +119,7 @@ const VoiceChannelContext: NavContextMenuPatchCallback = (children, { channel }:
<Menu.MenuItem
key="voice-tools-deafen-all"
id="voice-tools-deafen-all"
label="Deafen all"
label={t("voiceChatUtils.contextMenu.deafenAll")}
action={() => sendPatch(channel, {
deaf: true,
})}
@ -128,14 +128,14 @@ const VoiceChannelContext: NavContextMenuPatchCallback = (children, { channel }:
<Menu.MenuItem
key="voice-tools-undeafen-all"
id="voice-tools-undeafen-all"
label="Undeafen all"
label={t("voiceChatUtils.contextMenu.undeafenAll")}
action={() => sendPatch(channel, {
deaf: false,
})}
/>
<Menu.MenuItem
label="Move all"
label={t("voiceChatUtils.contextMenu.moveAll")}
key="voice-tools-move-all"
id="voice-tools-move-all"
>

View file

@ -7,6 +7,7 @@
import "./styles.css";
import { Heading } from "@components/Heading";
import { t } from "@utils/translation";
import type { IPluginOptionComponentProps } from "@utils/types";
import { findComponentByCodeLazy } from "@webpack";
import { TextInput, useState } from "@webpack/common";
@ -66,7 +67,7 @@ export function ReactEmojiSetting({ setValue }: IPluginOptionComponentProps) {
return (
<div>
<Heading>Select Emoji For Reactions</Heading>
<Heading>{t("messageClickActions.ui.selectEmojiForReactions")}</Heading>
<div
className="vc-message-click-actions-primary-emoji-picker"
onClick={event => event.stopPropagation()}
@ -106,7 +107,7 @@ export function AdditionalReactEmojisSetting({ setValue }: IPluginOptionComponen
return (
<div>
<Heading>Select Additional Emojis</Heading>
<Heading>{t("messageClickActions.ui.selectAdditionalEmojis")}</Heading>
<div
style={{
marginTop: 8,
@ -118,7 +119,7 @@ export function AdditionalReactEmojisSetting({ setValue }: IPluginOptionComponen
>
<TextInput
value={emojiList}
placeholder={`comma/newline separated, max ${MAX_ADDITIONAL_REACT_EMOJIS}`}
placeholder={t("messageClickActions.ui.maxAdditionalEmojis", { count: MAX_ADDITIONAL_REMOJIS })}
onChange={newValue => {
setEmojiList(newValue);
setValue(newValue);