From 1169ee01d257276885ee46c1829a0f501af2f49a Mon Sep 17 00:00:00 2001 From: Teekeks Date: Thu, 22 Feb 2024 23:20:55 +0100 Subject: [PATCH] feat(i18n): added missing translation strings to item detail page and added german translation strings --- client/components/cards/BookMatchCard.vue | 16 ++++++++-------- client/components/modals/item/tabs/Match.vue | 8 ++++---- client/pages/audiobook/_id/chapters.vue | 2 +- client/strings/de.json | 13 ++++++++++++- client/strings/en-us.json | 12 ++++++++++++ 5 files changed, 37 insertions(+), 14 deletions(-) diff --git a/client/components/cards/BookMatchCard.vue b/client/components/cards/BookMatchCard.vue index f2c15280e..cf5a957d2 100644 --- a/client/components/cards/BookMatchCard.vue +++ b/client/components/cards/BookMatchCard.vue @@ -13,9 +13,9 @@

{{ book.publishedYear }}

-

by {{ book.author }}

-

Narrated by {{ book.narrator }}

-

Runtime: {{ $elapsedPrettyExtended(bookDuration, false) }} {{ bookDurationComparison }}

+

{{ $getString('LabelAuthorDescriptor', [book.author]) }}

+

{{ $getString('LabelNarratorDescriptor', [book.narrator]) }}

+

{{ $getString('LabelRuntimeMatch', [$elapsedPrettyExtended(bookDuration, false), bookDurationComparison]) }}

@@ -31,9 +31,9 @@

{{ book.title }}

-

by {{ book.author }}

+

{{ $getString('LabelAuthorDescriptor', [book.author]) }}

{{ book.genres.join(', ') }}

-

{{ book.trackCount }} Episodes

+

{{ $getString('LabelEpisodesCounter', [book.trackCount]) }}

@@ -75,11 +75,11 @@ export default { let differenceInMinutes = currentBookDurationMinutes - this.book.duration if (differenceInMinutes < 0) { differenceInMinutes = Math.abs(differenceInMinutes) - return `(${this.$elapsedPrettyExtended(differenceInMinutes * 60, false, false)} shorter)` + return this.$getString('LabelRuntimeMatchLonger', [this.$elapsedPrettyExtended(differenceInMinutes * 60, false, false)]) } else if (differenceInMinutes > 0) { - return `(${this.$elapsedPrettyExtended(differenceInMinutes * 60, false, false)} longer)` + return this.$getString('LabelRuntimeMatchShorter', [this.$elapsedPrettyExtended(differenceInMinutes * 60, false, false)]) } - return '(exact match)' + return this.$strings.LabelRuntimeMatchExact } }, methods: { diff --git a/client/components/modals/item/tabs/Match.vue b/client/components/modals/item/tabs/Match.vue index 8aa312b58..b1b84f33f 100644 --- a/client/components/modals/item/tabs/Match.vue +++ b/client/components/modals/item/tabs/Match.vue @@ -42,13 +42,13 @@
-

New

+

{{ $string.LabelNew }}

-

Current

+

{{ $string.LabelCurrent }}

@@ -180,14 +180,14 @@
-

{{ $strings.LabelCurrently }} {{ mediaMetadata.explicit ? 'Explicit (checked)' : 'Not Explicit (unchecked)' }}

+

{{ $strings.LabelCurrently }} {{ mediaMetadata.explicit ? $strings.LabelExplicitChecked : $strings.LabelExplicitUnchecked }}

-

{{ $strings.LabelCurrently }} {{ mediaMetadata.abridged ? 'Abridged (checked)' : 'Unabridged (unchecked)' }}

+

{{ $strings.LabelCurrently }} {{ mediaMetadata.abridged ? $strings.LabelAbridgedChecked : $strings.LabelAbridgedUnchecked }}

diff --git a/client/pages/audiobook/_id/chapters.vue b/client/pages/audiobook/_id/chapters.vue index 0f5db77ad..45366f522 100644 --- a/client/pages/audiobook/_id/chapters.vue +++ b/client/pages/audiobook/_id/chapters.vue @@ -18,7 +18,7 @@