Fixed the plural typo in the artist list

This commit is contained in:
Karim Abou Zeid 2015-09-05 10:29:11 +02:00
commit ab2f1f9dff
3 changed files with 12 additions and 4 deletions

View file

@ -25,6 +25,12 @@
<p>You can view the changelog dialog again at any time from the <i>about</i> section.</p>
<h3>Version 0.9.44 beta6</h3>
<ol>
<li><b>FIX:</b> Fixed the plural typo in the artist list.</li>
</ol>
<h3>Version 0.9.44 beta5</h3>
<ol>

View file

@ -109,8 +109,10 @@ public class MusicUtil {
}
@NonNull
public static String getArtistInfoString(@NonNull Context context, @NonNull Artist artist) {
return artist.songCount + " " + context.getResources().getString(R.string.songs) + " | " + artist.albumCount + " " + context.getResources().getString(R.string.albums);
public static String getArtistInfoString(@NonNull final Context context, @NonNull final Artist artist) {
String albumString = artist.albumCount == 1 ? context.getResources().getString(R.string.album) : context.getResources().getString(R.string.albums);
String songString = artist.songCount == 1 ? context.getResources().getString(R.string.song) : context.getResources().getString(R.string.songs);
return artist.albumCount + " " + albumString + " | " + artist.songCount + " " + songString;
}
public static String getReadableDurationString(long songDurationMillis) {