Hello,
We're using XLIFF for our localization.
After importing XLIFF localization in Xcode 9, the Localizable.stringsdict doesn't contain all plural formats.
E.g., when importing German (de-DE), we have this in our XLIFF file:
<trans-unit id="/COMMON_LABEL_CLIENT_COUNT:dict/NSStringLocalizedFormatKey:dict/:string">
<source>%#@count@</source>
<target>%#@count@</target>
</trans-unit>
<trans-unit id="/COMMON_LABEL_CLIENT_COUNT:dict/count:dict/few:dict/:string">
<source>clients</source>
<target>Endgeräte</target>
</trans-unit>
<trans-unit id="/COMMON_LABEL_CLIENT_COUNT:dict/count:dict/many:dict/:string">
<source>clients</source>
<target>Endgeräte</target>
</trans-unit>
<trans-unit id="/COMMON_LABEL_CLIENT_COUNT:dict/count:dict/one:dict/:string">
<source>client</source>
<target>Endgerät</target>
</trans-unit>
<trans-unit id="/COMMON_LABEL_CLIENT_COUNT:dict/count:dict/other:dict/:string">
<source>clients</source>
<target>Endgeräte</target>
</trans-unit>
<trans-unit id="/COMMON_LABEL_CLIENT_COUNT:dict/count:dict/two:dict/:string">
<source>clients</source>
<target>Endgeräte</target>
</trans-unit>
<trans-unit id="/COMMON_LABEL_CLIENT_COUNT:dict/count:dict/zero:dict/:string">
<source>clients</source>
<target>Endgeräte</target>
</trans-unit>
There are some extra format values; German uses only "one" and "other" according to http://www.unicode.org/cldr/charts/29/supplemental/language_plural_rules.html.
But, when imported using Xcode 9, all we get is this:
"COMMON_LABEL_CLIENT_COUNT" = {
NSStringLocalizedFormatKey = "%#@count@";
count = {
NSStringFormatSpecTypeKey = NSStringPluralRuleType;
NSStringFormatValueTypeKey = d;
zero = "Endger\U00e4te";
};
};
The strange thing is that when we for instance import Danish (da) with the exact same format, only different values, we get this:
"COMMON_LABEL_CLIENT_COUNT" = {
NSStringLocalizedFormatKey = "%#@count@";
count = {
NSStringFormatSpecTypeKey = NSStringPluralRuleType;
NSStringFormatValueTypeKey = d;
one = klient;
other = klienter;
zero = klienter;
};
};
Which is pretty much correct (although the "zero" format shouldn't be there). Is this a (known) bug? Or are we doing something wrong?
We have noticed this happens also for Spanish (es-ES) localization (also only "zero" format is imported).