From 9dc9979be344a1e8467536781afbc03d2b47254a Mon Sep 17 00:00:00 2001 From: jovuit Date: Wed, 13 Feb 2019 08:10:45 +0100 Subject: [PATCH] #662: Resolve "Add contexts to translatable strings" --- CONTRIBUTING.rst | 2 + front/src/views/content/remote/Card.vue | 44 ++++++++++----------- front/src/views/content/remote/Home.vue | 10 ++--- front/src/views/content/remote/ScanForm.vue | 6 +-- 4 files changed, 32 insertions(+), 30 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index e35a953f9..b3facd646 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -445,6 +445,7 @@ This hierarchical structure is made of several parts: - ``Artist`` - ``Home`` - ``Login`` + - ``Library`` - ``Moderation`` - ``Player`` - ``Playlist`` @@ -461,6 +462,7 @@ This hierarchical structure is made of several parts: - ``Button`` - ``Card`` - ``Dropdown`` + - ``Error message`` - ``Form`` - ``Header`` - ``Help text`` diff --git a/front/src/views/content/remote/Card.vue b/front/src/views/content/remote/Card.vue index c9d7ad1a4..ce5ab53ee 100644 --- a/front/src/views/content/remote/Card.vue +++ b/front/src/views/content/remote/Card.vue @@ -24,44 +24,44 @@
- %{ count } track + %{ count } track
- Details + Details
- Failed tracks: {{ latestScan.errored_files }} + Failed tracks: {{ latestScan.errored_files }}
- Scan now + Scan now
@@ -71,7 +71,7 @@
- +
@@ -81,29 +81,29 @@ v-if="!library.follow" @click="follow()" :class="['ui', 'green', {'loading': isLoadingFollow}, 'button']"> - Follow + Follow - Unfollow -

Unfollow this library?

+ Unfollow +

Unfollow this library?

-

By unfollowing this library, you loose access to its content.

+

By unfollowing this library, you loose access to its content.

-

Unfollow

+

Unfollow

@@ -128,8 +128,8 @@ export default { }, computed: { labels () { - let me = this.$gettext('This library is private and your approval from its owner is needed to access its content') - let everyone = this.$gettext('This library is public and you can access its content freely') + let me = this.$pgettext('Content/Library/Card.Help text', 'This library is private and your approval from its owner is needed to access its content') + let everyone = this.$pgettext('Content/Library/Card.Help text', 'This library is public and you can access its content freely') return { tooltips: { @@ -162,8 +162,8 @@ export default { methods: { launchScan () { let self = this - let successMsg = this.$gettext('Scan launched') - let skippedMsg = this.$gettext('Scan skipped (previous scan is too recent)') + let successMsg = this.$pgettext('Content/Library/Message', 'Scan launched') + let skippedMsg = this.$pgettext('Content/Library/Message', 'Scan skipped (previous scan is too recent)') axios.post(`federation/libraries/${this.library.uuid}/scan/`).then((response) => { let msg if (response.data.status == 'skipped') { diff --git a/front/src/views/content/remote/Home.vue b/front/src/views/content/remote/Home.vue index 007fbadca..4e813a5ba 100644 --- a/front/src/views/content/remote/Home.vue +++ b/front/src/views/content/remote/Home.vue @@ -1,19 +1,19 @@