How to properly localise AppShortcutPhrase?

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?

To localize your AppShortcut phrases, you can create a String Catalog in your app target called AppShortcuts. After a build, the phrases should be extracted to this String Catalog.

For more details, check out this WWDC video, starting from 18:42: https://developer.apple.com/videos/play/wwdc2023/10102/

How to properly localise AppShortcutPhrase?
 
 
Q