From 400e34a4c77d94c4c9f67c7fa5af88ac57264609 Mon Sep 17 00:00:00 2001 From: advplyr Date: Tue, 8 Nov 2022 17:10:08 -0600 Subject: [PATCH] Update:More localization strings #1103 --- client/components/app/Appbar.vue | 13 +- .../components/app/BookShelfCategorized.vue | 13 +- client/components/app/BookShelfRow.vue | 2 +- client/components/app/StreamContainer.vue | 2 +- client/components/cards/LazyBookCard.vue | 24 +-- .../cards/PodcastFeedSummaryCard.vue | 4 +- client/components/controls/GlobalSearch.vue | 16 +- .../components/controls/LibrarySortSelect.vue | 165 ++++++++-------- client/components/modals/AccountModal.vue | 34 ++-- .../components/modals/BackupScheduleModal.vue | 4 +- .../modals/BatchQuickMatchModel.vue | 44 ++--- client/components/modals/BookmarksModal.vue | 12 +- .../components/modals/EditCollectionModal.vue | 11 +- .../modals/ListeningSessionModal.vue | 44 ++--- client/components/modals/SleepTimerModal.vue | 4 +- .../modals/UserCollectionsModal.vue | 20 +- .../components/modals/authors/EditModal.vue | 30 +-- .../components/modals/item/tabs/Details.vue | 2 +- .../components/modals/item/tabs/Episodes.vue | 20 +- client/components/modals/item/tabs/Match.vue | 10 +- .../components/modals/item/tabs/Schedule.vue | 2 +- client/components/modals/item/tabs/Tools.vue | 2 +- .../modals/libraries/EditLibrary.vue | 24 +-- .../components/modals/libraries/EditModal.vue | 8 +- .../components/modals/podcast/EditEpisode.vue | 4 +- client/components/modals/podcast/NewModal.vue | 24 +-- .../modals/podcast/OpmlFeedsModal.vue | 12 +- .../modals/podcast/RemoveEpisode.vue | 14 +- .../components/modals/podcast/ViewEpisode.vue | 4 +- .../modals/podcast/tabs/EpisodeDetails.vue | 16 +- .../modals/podcast/tabs/EpisodeMatch.vue | 8 +- .../components/modals/rssfeed/ViewModal.vue | 20 +- client/components/player/PlayerUi.vue | 2 +- client/components/stats/Heatmap.vue | 6 +- client/components/tables/AudioFilesTable.vue | 71 ------- client/components/tables/BackupsTable.vue | 18 +- .../tables/CollectionBooksTable.vue | 2 +- client/components/tables/UsersTable.vue | 4 +- .../tables/collection/BookTableRow.vue | 10 +- .../components/tables/library/LibraryItem.vue | 24 +-- .../tables/podcast/EpisodeTableRow.vue | 6 +- .../tables/podcast/EpisodesTable.vue | 82 ++++---- client/components/ui/MultiSelect.vue | 2 +- client/components/ui/MultiSelectDropdown.vue | 2 +- .../components/ui/MultiSelectQueryInput.vue | 2 +- client/components/ui/QueryInput.vue | 4 +- .../widgets/CronExpressionBuilder.vue | 2 +- .../components/widgets/PodcastDetailsEdit.vue | 18 +- client/pages/account.vue | 2 +- client/pages/audiobook/_id/chapters.vue | 16 +- client/pages/audiobook/_id/edit.vue | 66 +++---- client/pages/audiobook/_id/manage.vue | 34 ++-- client/pages/author/_id.vue | 6 +- client/pages/batch/index.vue | 26 +-- client/pages/collection/_id.vue | 2 +- client/pages/item/_id/index.vue | 4 +- .../pages/library/_library/podcast/latest.vue | 6 +- .../pages/library/_library/podcast/search.vue | 10 +- client/pages/library/_library/search.vue | 2 +- client/pages/login.vue | 12 +- client/plugins/i18n.js | 26 +-- client/strings/en-us.json | 179 +++++++++++++++++- server/utils/libraryHelpers.js | 7 + 63 files changed, 681 insertions(+), 584 deletions(-) delete mode 100644 client/components/tables/AudioFilesTable.vue diff --git a/client/components/app/Appbar.vue b/client/components/app/Appbar.vue index 48ec5f54..4a887b51 100644 --- a/client/components/app/Appbar.vue +++ b/client/components/app/Appbar.vue @@ -45,17 +45,16 @@ -
-

{{ numLibraryItemsSelected }} Selected

+

{{ $getString('MessageItemsSelected', [numLibraryItemsSelected]) }}

- + - + - + - + - + close
diff --git a/client/components/app/BookShelfCategorized.vue b/client/components/app/BookShelfCategorized.vue index 99911c72..011b3b05 100644 --- a/client/components/app/BookShelfCategorized.vue +++ b/client/components/app/BookShelfCategorized.vue @@ -17,16 +17,16 @@
@@ -180,6 +180,7 @@ export default { shelves.push({ id: 'books', label: 'Books', + labelStringKey: 'LabelBooks', type: 'book', entities: this.results.books.map((res) => res.libraryItem) }) @@ -189,6 +190,7 @@ export default { shelves.push({ id: 'podcasts', label: 'Podcasts', + labelStringKey: 'LabelPodcasts', type: 'podcast', entities: this.results.podcasts.map((res) => res.libraryItem) }) @@ -198,6 +200,7 @@ export default { shelves.push({ id: 'series', label: 'Series', + labelStringKey: 'LabelSeries', type: 'series', entities: this.results.series.map((seriesObj) => { return { @@ -212,6 +215,7 @@ export default { shelves.push({ id: 'tags', label: 'Tags', + labelStringKey: 'LabelTags', type: 'tags', entities: this.results.tags.map((tagObj) => { return { @@ -226,6 +230,7 @@ export default { shelves.push({ id: 'authors', label: 'Authors', + labelStringKey: 'LabelAuthors', type: 'authors', entities: this.results.authors.map((a) => { return { diff --git a/client/components/app/BookShelfRow.vue b/client/components/app/BookShelfRow.vue index 29003f3d..f35d72a2 100644 --- a/client/components/app/BookShelfRow.vue +++ b/client/components/app/BookShelfRow.vue @@ -46,7 +46,7 @@
-

{{ shelf.label }}

+

{{ $strings[shelf.labelStringKey] }}

diff --git a/client/components/app/StreamContainer.vue b/client/components/app/StreamContainer.vue index 5885e0d9..c719bb27 100644 --- a/client/components/app/StreamContainer.vue +++ b/client/components/app/StreamContainer.vue @@ -15,7 +15,7 @@

{{ author.name }}

-

Unknown

+

{{ $strings.LabelUnknown }}

diff --git a/client/components/cards/LazyBookCard.vue b/client/components/cards/LazyBookCard.vue index 2ba5674f..90b31edf 100644 --- a/client/components/cards/LazyBookCard.vue +++ b/client/components/cards/LazyBookCard.vue @@ -395,17 +395,17 @@ export default { const items = [ { func: 'editPodcast', - text: 'Edit Podcast' + text: this.$strings.ButtonEditPodcast }, { func: 'toggleFinished', - text: `Mark as ${this.itemIsFinished ? 'Not Finished' : 'Finished'}` + text: this.itemIsFinished ? this.$strings.MessageMarkAsNotFinished : this.$strings.MessageMarkAsFinished } ] if (this.continueListeningShelf) { items.push({ func: 'removeFromContinueListening', - text: 'Remove from Continue Listening' + text: this.$strings.ButtonRemoveFromContinueListening }) } return items @@ -416,42 +416,42 @@ export default { items = [ { func: 'toggleFinished', - text: `Mark as ${this.itemIsFinished ? 'Not Finished' : 'Finished'}` + text: this.itemIsFinished ? this.$strings.MessageMarkAsNotFinished : this.$strings.MessageMarkAsFinished } ] if (this.userCanUpdate) { items.push({ func: 'openCollections', - text: 'Add to Collection' + text: this.$strings.LabelAddToCollection }) } } if (this.userCanUpdate) { items.push({ func: 'showEditModalFiles', - text: 'Files' + text: this.$strings.HeaderFiles }) items.push({ func: 'showEditModalMatch', - text: 'Match' + text: this.$strings.HeaderMatch }) } if (this.userIsAdminOrUp && !this.isFile) { items.push({ func: 'rescan', - text: 'Re-Scan' + text: this.$strings.ButtonReScan }) } if (this.series && this.bookMount) { items.push({ func: 'removeSeriesFromContinueListening', - text: 'Remove Series from Continue Series' + text: this.$strings.ButtonRemoveSeriesFromContinueSeries }) } if (this.continueListeningShelf) { items.push({ func: 'removeFromContinueListening', - text: 'Remove from Continue Listening' + text: this.$strings.ButtonRemoveFromContinueListening }) } return items @@ -587,12 +587,12 @@ export default { .$patch(apiEndpoint, updatePayload) .then(() => { this.processing = false - toast.success(`Item marked as ${updatePayload.isFinished ? 'Finished' : 'Not Finished'}`) + toast.success(updatePayload.isFinished ? this.$strings.ToastItemMarkedAsFinishedSuccess : this.$strings.ToastItemMarkedAsNotFinishedSuccess) }) .catch((error) => { console.error('Failed', error) this.processing = false - toast.error(`Failed to mark as ${updatePayload.isFinished ? 'Finished' : 'Not Finished'}`) + toast.error(updatePayload.isFinished ? this.$strings.ToastItemMarkedAsFinishedFailed : this.$strings.ToastItemMarkedAsNotFinishedFailed) }) }, editPodcast() { diff --git a/client/components/cards/PodcastFeedSummaryCard.vue b/client/components/cards/PodcastFeedSummaryCard.vue index 474d1480..131d6d9a 100644 --- a/client/components/cards/PodcastFeedSummaryCard.vue +++ b/client/components/cards/PodcastFeedSummaryCard.vue @@ -5,14 +5,14 @@
-

{{ numEpisodes }} Episodes

+

{{ numEpisodes }} {{ $strings.HeaderEpisodes }}

{{ title }}

{{ author }}

{{ description }}

- Folder: {{ folderPath }} + {{ $strings.LabelFolder }}: {{ folderPath }}

diff --git a/client/components/controls/GlobalSearch.vue b/client/components/controls/GlobalSearch.vue index 2d970db6..670eb6e7 100644 --- a/client/components/controls/GlobalSearch.vue +++ b/client/components/controls/GlobalSearch.vue @@ -10,16 +10,16 @@
diff --git a/client/components/ui/QueryInput.vue b/client/components/ui/QueryInput.vue index 27191a92..941e8850 100644 --- a/client/components/ui/QueryInput.vue +++ b/client/components/ui/QueryInput.vue @@ -21,7 +21,7 @@
  • - No items + {{ $strings.MessageNoItems }}
  • @@ -74,7 +74,7 @@ export default { if (this.searching) return this.currentSearch = this.textInput this.searching = true - var results = await this.$axios.$get(`/api/${this.endpoint}?q=${this.currentSearch}&limit=15`).catch((error) => { + var results = await this.$axios.$gest(`/api/${this.endpoint}?q=${this.currentSearch}&limit=15`).catch((error) => { console.error('Failed to get search results', error) return [] }) diff --git a/client/components/widgets/CronExpressionBuilder.vue b/client/components/widgets/CronExpressionBuilder.vue index 2f8e6a3d..2cefce24 100644 --- a/client/components/widgets/CronExpressionBuilder.vue +++ b/client/components/widgets/CronExpressionBuilder.vue @@ -12,7 +12,7 @@