moko-resources
moko-resources copied to clipboard
iOS - in plural files, %lt; escapes to <, causing XML to become invalid
On our project, plurals had stopped working. We eventually narrowed down the cause to the fact that in our plurals, we had a plural like so:
<plural name="event_bottom_bar_open_days_before">
<item quantity="zero">Opens in <one day</item>
<item quantity="one">Opens in one day</item>
<item quantity="two">Opens in two days</item>
<item quantity="other">Opens in %d days</item>
</plural>
in iOS, this came through as:
<key>event_bottom_bar_open_days_before</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@pluraled@</string>
<key>pluraled</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>zero</key>
<string>Opens in <one day</string>
<key>one</key>
<string>Opens in one day</string>
<key>two</key>
<string>Opens in two days</string>
<key>other</key>
<string>Opens in %%d days</string>
</dict>
</dict>
as can be seen,the < was replaced with <, so the the XML is invalid as a result. The escaping should revert the < to <
Please try to 0.24.0-beta-5 after release