From 19ba7ed988ac49b44448b04a5db854d9d7a63ee6 Mon Sep 17 00:00:00 2001 From: jovuit Date: Fri, 8 Feb 2019 09:57:52 +0100 Subject: [PATCH] Resolve "Add contexts to translatable strings to Album page" --- CONTRIBUTING.rst | 1 + front/src/components/library/Album.vue | 27 +++++++++++++------------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 25ff14c2a..085975a53 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -434,6 +434,7 @@ This hierarchical structure is made of several parts: - ``Menu`` - ``Modal`` - ``Sidebar`` + - ``Popup`` - ``*`` for strings that are not tied to a specific location - The feature part, which is required, and refers to the feature associated with the translated string: diff --git a/front/src/components/library/Album.vue b/front/src/components/library/Album.vue index bb33b7e7f..f57cfbbc3 100644 --- a/front/src/components/library/Album.vue +++ b/front/src/components/library/Album.vue @@ -14,33 +14,33 @@
- Artist page + Artist page
- Play all + Play all - Search on Wikipedia + Search on Wikipedia - View on MusicBrainz + View on MusicBrainz @@ -150,7 +151,7 @@ export default { computed: { labels() { return { - title: this.$gettext("Album") + title: this.$pgettext('Head/Album/Title/Name', 'Album') } }, publicLibraries () { @@ -180,7 +181,7 @@ export default { ) }, subtitle () { - let msg = this.$ngettext('Album containing %{ count } track, by %{ artist }', 'Album containing %{ count } tracks, by %{ artist }', this.album.tracks.length) + let msg = this.$npgettext('Content/Album/Header.Title', 'Album containing %{ count } track, by %{ artist }', 'Album containing %{ count } tracks, by %{ artist }', this.album.tracks.length) return this.$gettextInterpolate(msg, {count: this.album.tracks.length, artist: this.album.artist.name}) } },