Skip to content
Snippets Groups Projects
Verified Commit 3de249b5 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Fix #833: broken translation on home and track detail page

parent e33b5b49
No related branches found
No related tags found
No related merge requests found
Fixed broken translation on home and track detail page (#833)
...@@ -68,12 +68,7 @@ ...@@ -68,12 +68,7 @@
<div class="ui list"> <div class="ui list">
<div class="item"> <div class="item">
<i class="tag icon"></i> <i class="tag icon"></i>
<div <div class="content" v-html="musicbrainzItem"></div>
class="content"
v-translate="{url: musicbrainzUrl}"
translate-context="Content/Home/List item/Verb">
Get quality metadata about your music thanks to <a href="%{ url }" target="_blank">MusicBrainz</a>
</div>
</div> </div>
<div class="item"> <div class="item">
<i class="plus icon"></i> <i class="plus icon"></i>
...@@ -147,6 +142,10 @@ export default { ...@@ -147,6 +142,10 @@ export default {
return { return {
title: this.$pgettext('Head/Home/Title', "Welcome") title: this.$pgettext('Head/Home/Title', "Welcome")
} }
},
musicbrainzItem () {
let msg = this.$pgettext('Content/Home/List item/Verb', 'Get quality metadata about your music thanks to <a href="%{ url }" target="_blank">MusicBrainz</a>')
return this.$gettextInterpolate(msg, {url: this.musicbrainzUrl})
} }
} }
} }
......
...@@ -14,11 +14,7 @@ ...@@ -14,11 +14,7 @@
<i class="circular inverted music orange icon"></i> <i class="circular inverted music orange icon"></i>
<div class="content"> <div class="content">
{{ track.title }} {{ track.title }}
<div class="sub header"> <div class="sub header" v-html="subtitle"></div>
<div translate-context="Content/Track/Paragraph"
v-translate="{album: track.album.title, artist: track.artist.name, albumUrl: albumUrl, artistUrl: artistUrl}"
>From album <a class="internal" href="%{ albumUrl }">%{ album }</a> by <a class="internal" href="%{ artistUrl }">%{ artist }</a></div>
</div>
</div> </div>
</h2> </h2>
<div class="header-buttons"> <div class="header-buttons">
...@@ -218,6 +214,10 @@ export default { ...@@ -218,6 +214,10 @@ export default {
")" ")"
) )
}, },
subtitle () {
let msg = this.$pgettext('Content/Track/Paragraph', 'From album <a class="internal" href="%{ albumUrl }">%{ album }</a> by <a class="internal" href="%{ artistUrl }">%{ artist }</a>')
return this.$gettextInterpolate(msg, {album: this.track.album.title, artist: this.track.artist.name, albumUrl: this.albumUrl, artistUrl: this.artistUrl})
}
}, },
watch: { watch: {
id() { id() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment