Skip to content

Commit

Permalink
Merge pull request mac-cain13#839 from ribilynn/Use-current-locale-wh…
Browse files Browse the repository at this point in the history
…en-overrideLocale-is-missing

Use current locale when overrideLocale is missing
  • Loading branch information
tomlokhorst authored Sep 10, 2023
2 parents 5721c1a + b0332ae commit c413990
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c413990

Please sign in to comment.