Thanks to @sowenjub I got it working. He wrote a really nice blog post that sums up everything (https://sowenjub.me/writes/localizing-app-shortcuts-with-app-intents/)
The gist is that you need 2 localization files:
- an AppShortcuts.strings for the phrases and
- Localizable.strings for the rest (it is possible to have something other than that specific name but you have to provide the table name in every place you reference the Strings which is quite annoying)
Then everything in code like the phrase
- "Key: Add a meal (.$content) to (.applicationName)" (implicitly looked up in AppShortcuts.strings)
gets referenced via the following in your AppShortcuts.strings (i.e. english):
- "Key: Add a meal {content} to {applicationName}" = "Add a meal {content} to {applicationName}";
And stuff like app entitiy typeDisplayName
s:
static var typeDisplayName: LocalizedStringResource = "some.entitiy.type.name"
(implicitly looked up in Localizable.strings; if you have an Alternative.strings file use something like .init("some.entitiy.type.name", table: "Alternative", locale: .autoupdatingCurrent, bundle: .main, comment: nil)
)
gets referenced via the following in your Localizable.strings (i.e. english):
"some.entitiy.type.name" = "Some";