diff --git a/Vocable/Supporting Files/Presets.swift b/Vocable/Supporting Files/Presets.swift index e06085c6..03bd48ec 100644 --- a/Vocable/Supporting Files/Presets.swift +++ b/Vocable/Supporting Files/Presets.swift @@ -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? {