From b0332ae57a79de45e393bf1396ca0ae422cd6167 Mon Sep 17 00:00:00 2001 From: ribilynn Date: Mon, 24 Jul 2023 15:12:50 +0900 Subject: [PATCH] Use current locale when overrideLocale is missing --- .../Integrations/StringResource+Integrations.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/RswiftResources/Integrations/StringResource+Integrations.swift b/Sources/RswiftResources/Integrations/StringResource+Integrations.swift index a7c6eec6..e1cfa136 100644 --- a/Sources/RswiftResources/Integrations/StringResource+Integrations.swift +++ b/Sources/RswiftResources/Integrations/StringResource+Integrations.swift @@ -14,7 +14,7 @@ extension String { case let .hosting(bundle): // With fallback to developmentValue let format = NSLocalizedString(key.description, tableName: tableName, bundle: bundle, value: developmentValue ?? "", comment: "") - self = String(format: format, locale: overrideLocale, arguments: arguments) + self = String(format: format, locale: overrideLocale ?? Locale.current, arguments: arguments) case let .selected(bundle, locale): // Don't use developmentValue with selected bundle/locale