Using MacOS, I'm finding that titles in the Shortcuts App aren't being presented dynamically.
The code below always shows the default value for this Action in the Shortcuts App eg. "Not Found Again".
@available(macOS 13.0, *)
struct EnterValueIntent: AppIntent {
static let title: LocalizedStringResource = LocalizedStringResource("entervalue", defaultValue: "Not Found again", table: "AppIntentLocalizable.strings", locale: Locale.current)
@MainActor
func perform() async throws -> some IntentResult {
return.result(
value: "result")
}
}
I have a key value pair in the strings table (AppIntentLocalizable.strings):
"entervalue" = "Enter Value";
I have this string table file localized to my current locale.
I have also tried using the main localization file in the App (Localizable.strings) with the same result (The app uses this string table for localization across the app).
The localization file(s) has the correct targets and has the right localization. I can read from this file using NSLocalizedString in the App.
I also tried a get {} against title - which in the Shortcuts app then shows the struct name against the Action. Doesn't even show the default.
The Shortcut App will present the default value but doesn't seem to be hitting the string table when providing a list of titles for Actions.
Please help.