From 41358979faf43afa25c3a122ec1b59e05c822635 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Tue, 9 Apr 2024 14:32:53 +0100 Subject: [PATCH] Fix String converter translations Fixes #290 Co-authored-by: Ilias <36593667+Iliasgx@users.noreply.github.com> --- .idea/modules.xml | 3 --- .../kord-extensions.extra-modules.extra-mappings.main.iml | 7 +++++++ .../extensions/commands/converters/impl/StringConverter.kt | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 .idea/modules/extra-modules/extra-mappings/kord-extensions.extra-modules.extra-mappings.main.iml diff --git a/.idea/modules.xml b/.idea/modules.xml index 30a8bc20a8..bc829455de 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -6,9 +6,6 @@ - - - \ No newline at end of file diff --git a/.idea/modules/extra-modules/extra-mappings/kord-extensions.extra-modules.extra-mappings.main.iml b/.idea/modules/extra-modules/extra-mappings/kord-extensions.extra-modules.extra-mappings.main.iml new file mode 100644 index 0000000000..f4cd67e58b --- /dev/null +++ b/.idea/modules/extra-modules/extra-mappings/kord-extensions.extra-modules.extra-mappings.main.iml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/commands/converters/impl/StringConverter.kt b/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/commands/converters/impl/StringConverter.kt index 4c46a8d79c..10863b90dd 100644 --- a/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/commands/converters/impl/StringConverter.kt +++ b/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/commands/converters/impl/StringConverter.kt @@ -55,7 +55,7 @@ public class StringConverter( if (minLength != null && this.parsed.length < minLength) { throw DiscordRelayedException( context.translate( - "converters.string.error.invalid.tooLong", + "converters.string.error.invalid.tooShort", replacements = arrayOf(arg, minLength) ) ) @@ -64,7 +64,7 @@ public class StringConverter( if (maxLength != null && this.parsed.length > maxLength) { throw DiscordRelayedException( context.translate( - "converters.string.error.invalid.tooShort", + "converters.string.error.invalid.tooLong", replacements = arrayOf(arg, maxLength) ) )