275fc81104
Remove KeyboardL10n hard-coded fallbacks in favor of ExtL10n and extension Localizable.strings. Add Flow session expiry hints, Darwin cross-process notifications, session monitor on the keyboard, and app icon on GitHub Pages.
18 lines
502 B
Swift
18 lines
502 B
Swift
// ExtL10n.swift
|
|
// OSGKeyboard · Keyboard Extension
|
|
//
|
|
// Loads strings from the extension bundle. Replaces the old KeyboardL10n
|
|
// hard-coded fallback map — keys live in Localizable.strings.
|
|
|
|
import Foundation
|
|
|
|
enum ExtL10n {
|
|
static func string(_ key: String) -> String {
|
|
NSLocalizedString(key, bundle: .main, comment: "")
|
|
}
|
|
|
|
static func format(_ key: String, _ args: CVarArg...) -> String {
|
|
String(format: string(key), locale: Locale.current, arguments: args)
|
|
}
|
|
}
|