In stringsdict it was possible to define a format separately from the translation so you could do something like "n_days" which you could pass in an integer and it would return you only "Day" or "Days" without the actual value in it. And it's work great.
But now with the strings catalog it seems like the format specifier HAS to be in the value, otherwise it's not recognized. Is there now no way to pluralize anything without having the actual value inside the translation?
Cannot infer format specifier for string group because no numerical specifiers were found (en: %d.n_hours)
Hi,
Stringsdict and String Catalog Plural Variants are not suited for a string that has plurality but no number associated with that plural.
This would do the right thing in English, but many languages would have issues.
The plural rules are different between number-based plurals (one, two, few many, other) and non-number-based plurals (1, 2+).
It’s recommended here to have 2 different plain strings, controlled by if count == 1 { … } else { … }
.
More information in this session at the time linked: https://developer.apple.com/wwdc21/10221?time=1330