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

@ -59,8 +59,8 @@ android {
applicationId "com.kabouzeid.gramophone" applicationId "com.kabouzeid.gramophone"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 23 targetSdkVersion 23
versionCode 72 versionCode 73
versionName "0.9.44 beta5" versionName "0.9.44 beta6"
} }
buildTypes { buildTypes {
release { release {

View file

@ -25,6 +25,12 @@
<p>You can view the changelog dialog again at any time from the <i>about</i> section.</p> <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> <h3>Version 0.9.44 beta5</h3>
<ol> <ol>

View file

@ -109,8 +109,10 @@ public class MusicUtil {
} }
@NonNull @NonNull
public static String getArtistInfoString(@NonNull Context context, @NonNull Artist artist) { public static String getArtistInfoString(@NonNull final Context context, @NonNull final Artist artist) {
return artist.songCount + " " + context.getResources().getString(R.string.songs) + " | " + artist.albumCount + " " + context.getResources().getString(R.string.albums); 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) { public static String getReadableDurationString(long songDurationMillis) {