Refactor leveling form to use Discord multiplier editor and enhance localization

- Replaced text area inputs for role and channel multipliers with DiscordMultiplierEditor components for improved user experience.
- Updated state management to handle multiplier entries as objects instead of text, enhancing data integrity.
- Enhanced localization messages for multipliers, including error handling and hints for user guidance.
This commit is contained in:
TheOnlyMace
2026-07-22 21:34:29 +02:00
parent 042f68e777
commit 7888ccb7e6
5 changed files with 198 additions and 69 deletions

View File

@@ -318,13 +318,22 @@
"noXpRoles": "No-XP-Rollen",
"roleMultipliers": "Rollen-Multiplikatoren",
"channelMultipliers": "Kanal-Multiplikatoren",
"multiplierHint": "Ein Eintrag pro Zeile im Format ID:Multiplikator, z. B. 123456789012345678:1.5",
"multiplierHint": "Rolle bzw. Kanal wählen und Multiplikator setzen (z. B. 1.5).",
"multiplierValue": "Multiplikator",
"addMultiplier": "Multiplikator hinzufügen",
"errors": {
"multiplierMissingId": "Jeder Multiplikator braucht eine Rolle bzw. einen Kanal.",
"multiplierInvalid": "Multiplikatoren müssen eine positive Zahl sein.",
"multiplierDuplicate": "Jede Rolle bzw. jeder Kanal darf nur einmal vorkommen."
},
"levelUpTitle": "Level-Up-Nachricht",
"levelUpMode": "Modus",
"mode.CHANNEL": "Kanal",
"mode.DM": "Direktnachricht",
"mode.OFF": "Aus",
"levelUpChannelId": "Level-Up-Kanal-ID",
"modes": {
"CHANNEL": "Kanal",
"DM": "Direktnachricht",
"OFF": "Aus"
},
"levelUpChannelId": "Level-Up-Kanal",
"levelUpMessage": "Nachrichtentext",
"stackRewards": "Rollen-Belohnungen stapeln",
"rankCardTitle": "Rang-Karte",
@@ -358,10 +367,12 @@
"description": "Lege fest, wie Support-Tickets erstellt und verwaltet werden.",
"enabledLabel": "Ticket-Modul aktiviert",
"mode": "Ticket-Modus",
"mode.CHANNEL": "Privater Kanal",
"mode.THREAD": "Privater Thread",
"modes": {
"CHANNEL": "Privater Kanal",
"THREAD": "Privater Thread"
},
"categoryId": "Ticket-Kategorie-ID",
"logChannelId": "Log-Kanal-ID",
"logChannelId": "Log-Kanal",
"inactivityHours": "Automatisch schließen nach Inaktivität (Stunden)",
"transcriptDm": "Transkript per DM an Ticket-Ersteller",
"transcriptDmHint": "Sendet dem Nutzer nach Schließung ein Transkript per DM.",

View File

@@ -318,13 +318,22 @@
"noXpRoles": "No-XP roles",
"roleMultipliers": "Role multipliers",
"channelMultipliers": "Channel multipliers",
"multiplierHint": "One entry per line in the format id:multiplier, e.g. 123456789012345678:1.5",
"multiplierHint": "Pick a role or channel and set a multiplier (e.g. 1.5).",
"multiplierValue": "Multiplier",
"addMultiplier": "Add multiplier",
"errors": {
"multiplierMissingId": "Every multiplier needs a role or channel.",
"multiplierInvalid": "Multipliers must be a positive number.",
"multiplierDuplicate": "Each role or channel may only appear once."
},
"levelUpTitle": "Level-up message",
"levelUpMode": "Mode",
"mode.CHANNEL": "Channel",
"mode.DM": "Direct message",
"mode.OFF": "Off",
"levelUpChannelId": "Level-up channel ID",
"modes": {
"CHANNEL": "Channel",
"DM": "Direct message",
"OFF": "Off"
},
"levelUpChannelId": "Level-up channel",
"levelUpMessage": "Message content",
"stackRewards": "Stack role rewards",
"rankCardTitle": "Rank card",
@@ -358,10 +367,12 @@
"description": "Configure how support tickets are created and managed.",
"enabledLabel": "Tickets module enabled",
"mode": "Ticket mode",
"mode.CHANNEL": "Private channel",
"mode.THREAD": "Private thread",
"modes": {
"CHANNEL": "Private channel",
"THREAD": "Private thread"
},
"categoryId": "Ticket category ID",
"logChannelId": "Log channel ID",
"logChannelId": "Log channel",
"inactivityHours": "Auto-close after inactivity (hours)",
"transcriptDm": "DM transcript to ticket creator",
"transcriptDmHint": "Sends a transcript to the user via DM once their ticket is closed.",