From a2622fe3e171c54d9d5d10213d70c28da4ba2f28 Mon Sep 17 00:00:00 2001 From: Constantin Piber <59023762+cpiber@users.noreply.github.com> Date: Fri, 8 Aug 2025 04:35:19 +0300 Subject: [PATCH] [#1563] Return default if no matching locale found (#1576) --- .../main/kotlin/suwayomi/tachidesk/i18n/LocalizationHelper.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/kotlin/suwayomi/tachidesk/i18n/LocalizationHelper.kt b/server/src/main/kotlin/suwayomi/tachidesk/i18n/LocalizationHelper.kt index 3a6acf5e..a51c3843 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/i18n/LocalizationHelper.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/i18n/LocalizationHelper.kt @@ -39,7 +39,7 @@ object LocalizationHelper { return if (headerLang == null || headerLang.isEmpty()) { Locale.getDefault() } else { - Locale.lookup(Locale.LanguageRange.parse(headerLang), supportedLocales) + Locale.lookup(Locale.LanguageRange.parse(headerLang), supportedLocales) ?: Locale.getDefault() } } }