localicious
localicious copied to clipboard
iOS code generation can cause runtime exception if number of parameters is not the same as the localization format
Right now, if you by mistake provide one less argument to the Localicious format, the string replacement throws a run time exception.
The problem:
The following example string:
"Screen.Component.Button.ACCESSIBILITY.LABEL" = "%1$@%2$@, hello %3$@.";
when replaced with two arguments result in an EXC_BAD_ACCESS
exception
Proposal
Count the number of arguments and placeholders and avoid the exception if they don't match