Translation string format inconsistencies should not be caught in java

They should not exist at all, i.e. our translatebot should not allow them in
(they break things in other places, not just here)
This commit is contained in:
Daniel Martí 2014-01-04 01:09:33 +01:00
parent fa08a8cfa4
commit 3b5e883397

View File

@ -118,18 +118,15 @@ public class SearchResults extends ListActivity {
TextView tv = (TextView) findViewById(R.id.description);
String headertext;
try {
if (apps.size() == 0)
headertext = String.format(getString(R.string.searchres_noapps),
mQuery);
else if (apps.size() == 1)
headertext = String.format(getString(R.string.searchres_oneapp),
mQuery);
else
headertext = String.format(getString(R.string.searchres_napps),
apps.size(), mQuery);
} catch(Exception ex) {
headertext = "TRANSLATION ERROR!";
if (apps.size() == 0) {
headertext = String.format(getString(R.string.searchres_noapps),
mQuery);
} else if (apps.size() == 1) {
headertext = String.format(getString(R.string.searchres_oneapp),
mQuery);
} else {
headertext = String.format(getString(R.string.searchres_napps),
apps.size(), mQuery);
}
tv.setText(headertext);
Log.d("FDroid", "Search for '" + mQuery + "' returned " + apps.size()