Description
The existing translation tests check that translated strings have the same number of format specifiers as the default strings. This frequently causes false positives whenever an existing string is modified to include format specifiers.
This card covers the work to make the existing tests be more precise. That is, translations strings must have no format specifiers OR the same number of format specifiers as the default string. If format strings specify more format specifiers than the default, the Java code won't pass it. If they specify fewer, they're likely to be passed incorrect data which can also cause errors. An additional improvement would be to ensure each format specifier matches that in the default string.
There seems to be some support for this in Android Lint as "StringFormatMatches: String.format string doesn't match the XML format string". Maybe these Java tests can be removed?