diff --git a/changes/changelog.d/1089.bugfix b/changes/changelog.d/1089.bugfix new file mode 100644 index 0000000000000000000000000000000000000000..bc3b7743913356708da65fb0b08500f02c7b3002 --- /dev/null +++ b/changes/changelog.d/1089.bugfix @@ -0,0 +1 @@ +Make channel card updated times more humanly readable, add internationalization (#1089) \ No newline at end of file diff --git a/front/src/components/audio/ChannelCard.vue b/front/src/components/audio/ChannelCard.vue index 6b5d9afcb964504d17d1b845fdf603b7724e2001..da44ef75a450798f1e09d847253b321db91547c8 100644 --- a/front/src/components/audio/ChannelCard.vue +++ b/front/src/components/audio/ChannelCard.vue @@ -31,7 +31,7 @@ class="meta ellipsis" :datetime="object.artist.modification_date" :title="updatedTitle"> - {{ object.artist.modification_date | fromNow }} + %{ updatedAgo } </time> <play-button class="right floated basic icon" @@ -47,6 +47,7 @@ import PlayButton from '@/components/audio/PlayButton' import TagsList from "@/components/tags/List" import {momentFormat} from '@/filters' +import moment from "moment" export default { props: { @@ -75,6 +76,9 @@ export default { let d = momentFormat(this.object.artist.modification_date) let message = this.$pgettext('*/*/*', 'Updated on %{ date }') return this.$gettextInterpolate(message, {date: d}) + }, + updatedAgo () { + return moment(this.object.artist.modification_date).fromNow() } } }