Post

Replies

Boosts

Views

Activity

Reply to Strings Catalog (.xcstrings) plural rules without format (Xcode 15)
@Systems Engineer given your response, could you please provide clarity on how are we to handle AppIntents.AppEntity.typeDisplayRepresentation? The AppIntents framework documents TypeDisplayRepresentation's properties name and numericFormat saying to use a .stringsdict file and shows name being a plural with no number. You can see it in the documentation here: https://developer.apple.com/documentation/appintents/typedisplayrepresentation/numericformat In fact, if you look at Apple's own AppIntents sample code: https://developer.apple.com/documentation/appintents/acceleratingappinteractionswithappintents you will see that despite using String Catalogs for everything else in the project, the strings used in the TypeDisplayRepresentation of the sample's AppEntitys are the exception by going into a .stringsdict (I imagine because Xcode's Strings Catalog won't permit it). I'm curious as to the discrepancy and how to resolve it. If xcstrings and stringsdict are both not suitable for the no-number plurality case well… what are we to do here? The suggested workaround of code logic (e.g. if count == 1) isn't going to work (typeDisplayRepresentation must have a compile-time static value and cannot be computed or dynamic). I guess for now I can keep using a .stringsdict file for these particular strings. But it seems there's a fundamental disconnect in Apple's official documentation and guidance: that you can't put numberless plurals into .xcstrings or .stringsdict files, and that you must provide a numberless plural for the TypeDisplayRepresentation.name (which ultimately must go into an .xcstrings or .stringsdict file). What am I missing here? Thank you for the insights.
Aug ’24