Use proper Vue pluralize filter

This commit is contained in:
An Phan 2016-01-15 18:05:54 +08:00
parent d65490ed04
commit a45222518a
8 changed files with 10 additions and 10 deletions

View file

@ -14,7 +14,7 @@
<span class="meta" v-show="meta.songCount"> <span class="meta" v-show="meta.songCount">
by <a class="artist" @click.prevent="viewArtistDetails">{{ album.artist.name }}</a> by <a class="artist" @click.prevent="viewArtistDetails">{{ album.artist.name }}</a>
{{ meta.songCount }} song{{ meta.songCount === 1 ? '' : 's' }} {{ meta.songCount }} {{ meta.songCount | pluralize 'song' }}
{{ meta.totalLength }} {{ meta.totalLength }}
</span> </span>

View file

@ -12,9 +12,9 @@
@click.prevent="showingControls = false"></i> @click.prevent="showingControls = false"></i>
<span class="meta" v-show="meta.songCount"> <span class="meta" v-show="meta.songCount">
{{ artist.albums.length }} album{{ artist.albums.length === 1 ? '' : 's' }} {{ artist.albums.length }} {{ artist.albums.length | pluralize 'album' }}
{{ meta.songCount }} song{{ meta.songCount === 1 ? '' : 's' }} {{ meta.songCount }} {{ meta.songCount | pluralize 'song' }}
{{ meta.totalLength }} {{ meta.totalLength }}
</span> </span>

View file

@ -10,7 +10,7 @@
@click.prevent="showingControls = false"></i> @click.prevent="showingControls = false"></i>
<span class="meta" v-show="meta.songCount"> <span class="meta" v-show="meta.songCount">
{{ meta.songCount }} song{{ meta.songCount === 1 ? '' : 's' }} {{ meta.songCount }} {{ meta.songCount | pluralize 'song' }}
{{ meta.totalLength }} {{ meta.totalLength }}
</span> </span>

View file

@ -10,7 +10,7 @@
@click.prevent="showingControls = false"></i> @click.prevent="showingControls = false"></i>
<span class="meta" v-show="meta.songCount"> <span class="meta" v-show="meta.songCount">
{{ meta.songCount }} song{{ meta.songCount === 1 ? '' : 's' }} {{ meta.songCount }} {{ meta.songCount | pluralize 'song' }}
{{ meta.totalLength }} {{ meta.totalLength }}
</span> </span>

View file

@ -10,7 +10,7 @@
@click.prevent="showingControls = false"></i> @click.prevent="showingControls = false"></i>
<span class="meta" v-show="meta.songCount"> <span class="meta" v-show="meta.songCount">
{{ meta.songCount }} song{{ meta.songCount === 1 ? '' : 's' }} {{ meta.songCount }} {{ meta.songCount | pluralize 'song' }}
{{ meta.totalLength }} {{ meta.totalLength }}
</span> </span>

View file

@ -10,7 +10,7 @@
@click.prevent="showingControls = false"></i> @click.prevent="showingControls = false"></i>
<span class="meta" v-show="meta.songCount"> <span class="meta" v-show="meta.songCount">
{{ meta.songCount }} song{{ meta.songCount === 1 ? '' : 's' }} {{ meta.songCount }} {{ meta.songCount | pluralize 'song' }}
{{ meta.totalLength }} {{ meta.totalLength }}
</span> </span>

View file

@ -9,7 +9,7 @@
<a class="name" @click.prevent="viewDetails">{{ album.name }}</a> <a class="name" @click.prevent="viewDetails">{{ album.name }}</a>
<a class="artist" @click.prevent="viewArtistDetails">{{ album.artist.name }}</a> <a class="artist" @click.prevent="viewArtistDetails">{{ album.artist.name }}</a>
<p class="meta"> <p class="meta">
{{ album.songs.length }} song{{ album.songs.length == 1 ? '' : 's' }} {{ album.songs.length }} {{ album.songs.length | pluralize 'song' }}
{{ album.fmtLength }} {{ album.fmtLength }}
</p> </p>

View file

@ -8,9 +8,9 @@
<footer> <footer>
<a class="name" @click.prevent="viewDetails">{{ artist.name }}</a> <a class="name" @click.prevent="viewDetails">{{ artist.name }}</a>
<p class="meta"> <p class="meta">
{{ artist.albums.length }} album{{ artist.albums.length == 1 ? '' : 's' }} {{ artist.albums.length }} {{ artist.albums.length | pluralize 'album' }}
{{ artist.songCount }} song{{ artist.songCount == 1 ? '' : 's' }} {{ artist.songCount }} {{ artist.songCount | pluralize 'song' }}
</p> </p>
</footer> </footer>
</article> </article>