make description of human and robot wordlists in prefs localizable

This commit is contained in:
Eric House 2015-04-02 06:47:35 -07:00
parent 27dde57660
commit 6a74cdba44
2 changed files with 7 additions and 7 deletions

View file

@ -2274,7 +2274,9 @@
<plurals name="lang_name_fmt">
<item quantity="one">%1$s (%2$d wordlist)</item>
<item quantity="other">%1$s (%2$d wordlists)</item>
</plurals>
</plurals>
<string name="dict_desc_fmt">%1$s (%2$s/%3$d words)</string>
<string name="lang_unknown">Unknown</string>

View file

@ -135,12 +135,10 @@ public class DictLangCache {
int wordCount = info.wordCount;
String langName = getLangName( context, dal.name );
if ( 0 == wordCount ) {
result = String.format( "%s (%s)", dal.name, langName );
} else {
result = String.format( "%s (%s/%d)", dal.name, langName,
wordCount );
}
String locName = LocUtils.xlateLang( context, langName );
result = LocUtils.getString( context, R.string.dict_desc_fmt,
dal.name, locName,
wordCount );
}
return result;
}