Files
OSGKeyboard/OSGKeyboardShared/Localization/SharedL10n.swift
T
Rocky df1c5ff32c feat: migrate on-device Qwen3 ASR to CoreML for background Flow dictation
Replace MLX GPU inference with CoreML bundles so transcription continues
while the host app is backgrounded. Adds model download and warm-up,
vendored Qwen3Speech, and updates onboarding, settings, and copy for the
~1.6 GB CoreML package (iOS 18+).
2026-06-23 00:46:58 +08:00

42 lines
1.1 KiB
Swift

// SharedL10n.swift
// OSGKeyboard · Shared
//
// Localized strings shipped inside the shared framework (Shared.strings).
// Respects the in-app UI language override from App Group settings.
import Foundation
public enum SharedL10n {
private static let table = "Shared"
private static let container = Bundle(for: SharedBundleToken.self)
public static func string(
_ key: String,
language: AppUILanguage? = nil
) -> String {
let lang = language ?? AppGroupStore().uiLanguage
let bundle = AppUILanguage.localizedBundle(in: container, language: lang)
return NSLocalizedString(
key,
tableName: table,
bundle: bundle,
value: key,
comment: ""
)
}
public static func format(
_ key: String,
language: AppUILanguage? = nil,
_ args: CVarArg...
) -> String {
String(
format: string(key, language: language),
locale: Locale.current,
arguments: args
)
}
}
private final class SharedBundleToken {}