Skip to content

Commit

Permalink
[741] Fix warning emitted while exporting localizations
Browse files Browse the repository at this point in the history
  • Loading branch information
Clstroud committed May 9, 2024
1 parent f97b60e commit 67ca350
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Vocable/Supporting Files/Presets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,11 @@ public struct TextPresets {
}

static func localizedPreset(_ locale: String, _ key: String, comment: String? = nil) -> String {
let key = String.LocalizationValue(key)
guard let path = Bundle.main.path(forResource: locale, ofType: "lproj"), let bundle = Bundle(path: path) else {
return NSLocalizedString(key, tableName: "Presets", comment: "")
return String(localized: key, table: "Presets")
}
return NSLocalizedString(key, tableName: "Presets", bundle: bundle, comment: "")
return String(localized: key, table: "Presets", bundle: bundle)
}

private static func dataFromBundle() -> Data? {
Expand Down

0 comments on commit 67ca350

Please sign in to comment.