diff --git a/.vscode/i18n-ally-custom-framework.yml b/.vscode/i18n-ally-custom-framework.yml index 4cdc6aae0..2ecae1fbd 100644 --- a/.vscode/i18n-ally-custom-framework.yml +++ b/.vscode/i18n-ally-custom-framework.yml @@ -10,6 +10,7 @@ usageMatchRegex: refactorTemplates: - "$t(\"$1\")" + - "{$t(\"$1\")}" - "" monopoly: true diff --git a/src/components/PluginSettings/PluginModal.tsx b/src/components/PluginSettings/PluginModal.tsx index 34de43c2d..88f6fa341 100644 --- a/src/components/PluginSettings/PluginModal.tsx +++ b/src/components/PluginSettings/PluginModal.tsx @@ -24,6 +24,7 @@ import { proxyLazy } from "@utils/lazy"; import { Margins } from "@utils/margins"; import { classes, isObjectEmpty } from "@utils/misc"; import { ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, ModalSize } from "@utils/modal"; +import { $t } from "@utils/translation"; import { OptionType, Plugin } from "@utils/types"; import { findByPropsLazy, findComponentByCodeLazy } from "@webpack"; import { Button, Clickable, FluxDispatcher, Forms, React, Text, Tooltip, UserStore, UserUtils } from "@webpack/common"; @@ -129,7 +130,7 @@ export default function PluginModal({ plugin, onRestartNeeded, onClose, transiti function renderSettings() { if (!hasSettings || !plugin.options) { - return There are no settings for this plugin.; + return {$t("vencord.noSettings")}; } else { const options = Object.entries(plugin.options).map(([key, setting]) => { if (setting.hidden) return null; @@ -227,7 +228,7 @@ export default function PluginModal({ plugin, onRestartNeeded, onClose, transiti )} - Settings + {$t("vencord.settings")} {renderSettings()} @@ -242,7 +243,7 @@ export default function PluginModal({ plugin, onRestartNeeded, onClose, transiti > Cancel - + {({ onMouseEnter, onMouseLeave }) => ( )} - {saveError && Error while saving: {saveError}} + {saveError && {$t("vencord.settingsSaveError", { saveError })}} } diff --git a/src/components/PluginSettings/index.tsx b/src/components/PluginSettings/index.tsx index fa48bab86..5065a85cf 100644 --- a/src/components/PluginSettings/index.tsx +++ b/src/components/PluginSettings/index.tsx @@ -33,6 +33,7 @@ import { Margins } from "@utils/margins"; import { classes, isObjectEmpty } from "@utils/misc"; import { openModalLazy } from "@utils/modal"; import { useAwaiter } from "@utils/react"; +import { lowercaseify } from "@utils/text"; import { $t } from "@utils/translation"; import { Plugin } from "@utils/types"; import { findByPropsLazy } from "@webpack"; @@ -66,19 +67,19 @@ function ReloadRequiredCard({ required }: { required: boolean; }) { {required ? ( <> - Restart required! + {$t("vencord.pluginHeader.reloadHeader")} - Restart now to apply new plugins and their settings + {$t("vencord.pluginHeader.reloadDescription")} ) : ( <> - Plugin Management - Press the cog wheel or info icon to get more info on a plugin - Plugins with a cog wheel have settings you can modify! + {$t("vencord.pluginHeader.managementHeader")} + {$t("vencord.pluginHeader.iconInformation")} + {$t("vencord.pluginHeader.cogWheel")} )} @@ -153,7 +154,7 @@ export function PluginCard({ plugin, disabled, onRestartNeeded, onMouseEnter, on return ( { return () => void (changes.hasChanges && Alerts.show({ - title: "Restart required", + title: $t("vencord.restartRequired"), body: ( <> -

The following plugins require a restart:

+

$t("vencord.pluginsNeedRestart")

{changes.map((s, i) => ( <> {i > 0 && ", "} @@ -196,8 +197,8 @@ export default function PluginSettings() { ))}
), - confirmText: "Restart now", - cancelText: "Later!", + confirmText: $t("vencord.restartNow"), + cancelText: $t("vencord.restartLater"), onConfirm: () => location.reload() })); }, []); @@ -303,7 +304,7 @@ export default function PluginSettings() { } } else { - plugins = requiredPlugins = No plugins meet search criteria.; + plugins = requiredPlugins = {$t("vencord.noSearchResults")}; } return ( @@ -311,18 +312,18 @@ export default function PluginSettings() { - Filters + {$t("vencord.pluginFilters")}
- +