Hi, I have AppShortcutsProvider in my app target(not as a separate extension) to support Siri command. It is working perfectly in English, but I would also like to add a localisation on it as my app supports multiple languages.
struct MyShortcuts: AppShortcutsProvider {
static let shortcutTileColor: ShortcutTileColor = .grape
static var appShortcuts: [AppShortcut] {
AppShortcut(
intent: NextClassAppIntents(),
phrases: [
"What is my next class in \(.applicationName)?",
"What's the next class in \(.applicationName)?",
"Next class in \(.applicationName)."
],
shortTitle: "Next Class",
systemImageName: "calendar.badge.clock"
)
}
}
Xcode String Catalog was doing great jobs, It also detected shortTitle
automatically and added that to the Catalog. However, I don't see localisation for those phrases anywhere in the String Catalog and when I try to use String(localized: ), compiler gives me an error.
How can I properly localise AppShortcutPhrase?