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">
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 }}
</span>

View file

@ -12,9 +12,9 @@
@click.prevent="showingControls = false"></i>
<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 }}
</span>

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -8,9 +8,9 @@
<footer>
<a class="name" @click.prevent="viewDetails">{{ artist.name }}</a>
<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>
</footer>
</article>