mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-24 23:38:32 +00:00
i18n
This commit is contained in:
parent
88689b304a
commit
ddd883b988
1 changed files with 7 additions and 8 deletions
|
@ -9,16 +9,16 @@ import "./styles.css";
|
||||||
import { definePluginSettings } from "@api/Settings";
|
import { definePluginSettings } from "@api/Settings";
|
||||||
import { Devs } from "@utils/constants";
|
import { Devs } from "@utils/constants";
|
||||||
import definePlugin, { OptionType } from "@utils/types";
|
import definePlugin, { OptionType } from "@utils/types";
|
||||||
import { Button, Forms, TextInput } from "@webpack/common";
|
import { Button, Forms, i18n, TextInput } from "@webpack/common";
|
||||||
|
|
||||||
const defaultReasons = [
|
|
||||||
"Suspicious or spam account",
|
|
||||||
"Compromised or spam account",
|
|
||||||
"Breaking server rules",
|
|
||||||
];
|
|
||||||
|
|
||||||
function ReasonsComponent() {
|
function ReasonsComponent() {
|
||||||
const { reasons } = settings.use(["reasons"]);
|
const { reasons } = settings.use(["reasons"]);
|
||||||
|
const defaultReasons = [
|
||||||
|
i18n.Messages.BAN_REASON_OPTION_SPAM_ACCOUNT,
|
||||||
|
i18n.Messages.BAN_REASON_OPTION_HACKED_ACCOUNT,
|
||||||
|
i18n.Messages.BAN_REASON_OPTION_BREAKING_RULES
|
||||||
|
];
|
||||||
|
if (!reasons) settings.store.reasons = defaultReasons;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Forms.FormSection title="Reasons">
|
<Forms.FormSection title="Reasons">
|
||||||
|
@ -75,7 +75,6 @@ const settings = definePluginSettings({
|
||||||
reasons: {
|
reasons: {
|
||||||
description: "Your custom reasons",
|
description: "Your custom reasons",
|
||||||
type: OptionType.COMPONENT,
|
type: OptionType.COMPONENT,
|
||||||
default: defaultReasons,
|
|
||||||
component: ReasonsComponent,
|
component: ReasonsComponent,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue