From 6621f8b2eedc6823e786eb5291766d22ce327cf4 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sun, 3 Dec 2023 17:37:01 -0600 Subject: [PATCH] Add:Language code setting and translations #448 --- .../audiobookshelf/app/data/DeviceClasses.kt | 6 +- .../app/device/DeviceManager.kt | 5 + components/app/SideDrawer.vue | 18 +- components/bookshelf/LazyBookshelf.vue | 2 +- components/cards/AuthorCard.vue | 2 +- components/connection/ServerConnectForm.vue | 14 +- components/forms/NewPodcastForm.vue | 22 +- components/home/BookshelfNavBar.vue | 20 +- .../AutoSleepTimerRewindLengthModal.vue | 6 +- components/modals/BookmarksModal.vue | 14 +- components/modals/ChaptersModal.vue | 2 +- components/modals/FilterModal.vue | 36 +- components/modals/ItemDetailsModal.vue | 2 +- components/modals/ItemMoreMenuModal.vue | 30 +- components/modals/LibrariesModal.vue | 2 +- components/modals/OrderModal.vue | 38 +- components/modals/PlaybackSpeedModal.vue | 2 +- components/modals/SelectLocalFolderModal.vue | 4 +- components/modals/SleepTimerLengthModal.vue | 8 +- components/modals/SleepTimerModal.vue | 10 +- .../modals/playlists/AddCreateModal.vue | 15 +- components/modals/playlists/PlaylistRow.vue | 4 +- components/modals/rssfeeds/RssFeedModal.vue | 4 +- components/tables/ChaptersTable.vue | 6 +- components/tables/TracksTable.vue | 10 +- .../collection/CollectionBooksTable.vue | 2 +- components/tables/ebook/EbookFilesTable.vue | 6 +- .../tables/ebook/EbookFilesTableRow.vue | 2 +- .../tables/playlist/PlaylistItemsTable.vue | 2 +- components/tables/podcast/EpisodesTable.vue | 6 +- .../tables/podcast/LatestEpisodeRow.vue | 4 +- ios/App/App/AppDelegate.swift | 8 +- ios/App/App/plugins/AbsDatabase.swift | 2 + ios/App/Shared/models/DeviceSettings.swift | 4 +- pages/account.vue | 12 +- pages/bookshelf/index.vue | 30 +- pages/bookshelf/latest.vue | 2 +- pages/bookshelf/search.vue | 8 +- pages/item/_id/_episode/index.vue | 22 +- pages/item/_id/index.vue | 28 +- pages/localMedia/folders/_id.vue | 14 +- pages/localMedia/folders/index.vue | 14 +- pages/localMedia/item/_id.vue | 10 +- pages/search.vue | 18 +- pages/settings.vue | 119 ++- plugins/i18n.js | 5 + strings/cs.json | 785 ++++++++++++++++++ strings/da.json | 785 ++++++++++++++++++ strings/de.json | 785 ++++++++++++++++++ strings/en-us.json | 91 +- strings/es.json | 785 ++++++++++++++++++ strings/fr.json | 785 ++++++++++++++++++ strings/gu.json | 785 ++++++++++++++++++ strings/hi.json | 785 ++++++++++++++++++ strings/hr.json | 785 ++++++++++++++++++ strings/it.json | 785 ++++++++++++++++++ strings/lt.json | 785 ++++++++++++++++++ strings/nl.json | 785 ++++++++++++++++++ strings/no.json | 785 ++++++++++++++++++ strings/pl.json | 785 ++++++++++++++++++ strings/ru.json | 785 ++++++++++++++++++ strings/sv.json | 785 ++++++++++++++++++ strings/zh-cn.json | 785 ++++++++++++++++++ 63 files changed, 12972 insertions(+), 279 deletions(-) create mode 100644 strings/cs.json create mode 100644 strings/da.json create mode 100644 strings/de.json create mode 100644 strings/es.json create mode 100644 strings/fr.json create mode 100644 strings/gu.json create mode 100644 strings/hi.json create mode 100644 strings/hr.json create mode 100644 strings/it.json create mode 100644 strings/lt.json create mode 100644 strings/nl.json create mode 100644 strings/no.json create mode 100644 strings/pl.json create mode 100644 strings/ru.json create mode 100644 strings/sv.json create mode 100644 strings/zh-cn.json diff --git a/android/app/src/main/java/com/audiobookshelf/app/data/DeviceClasses.kt b/android/app/src/main/java/com/audiobookshelf/app/data/DeviceClasses.kt index b509c65d..078b5b09 100644 --- a/android/app/src/main/java/com/audiobookshelf/app/data/DeviceClasses.kt +++ b/android/app/src/main/java/com/audiobookshelf/app/data/DeviceClasses.kt @@ -121,7 +121,8 @@ data class DeviceSettings( var autoSleepTimerAutoRewindTime: Long, //Time in milliseconds var sleepTimerLength: Long, // Time in milliseconds var disableSleepTimerFadeOut: Boolean, - var disableSleepTimerResetFeedback: Boolean + var disableSleepTimerResetFeedback: Boolean, + var languageCode: String ) { companion object { // Static method to get default device settings @@ -143,7 +144,8 @@ data class DeviceSettings( autoSleepTimerAutoRewind = false, autoSleepTimerAutoRewindTime = 300000L, // 5 minutes disableSleepTimerFadeOut = false, - disableSleepTimerResetFeedback = false + disableSleepTimerResetFeedback = false, + languageCode = "en-us" ) } } diff --git a/android/app/src/main/java/com/audiobookshelf/app/device/DeviceManager.kt b/android/app/src/main/java/com/audiobookshelf/app/device/DeviceManager.kt index b4769528..1fd9e275 100644 --- a/android/app/src/main/java/com/audiobookshelf/app/device/DeviceManager.kt +++ b/android/app/src/main/java/com/audiobookshelf/app/device/DeviceManager.kt @@ -48,6 +48,11 @@ object DeviceManager { if (deviceData.deviceSettings?.autoSleepTimerAutoRewindTime == null) { deviceData.deviceSettings?.autoSleepTimerAutoRewindTime = 300000L // 5 minutes } + + // Language added in v0.9.69 + if (deviceData.deviceSettings?.languageCode == null) { + deviceData.deviceSettings?.languageCode = "en-us" + } } fun getBase64Id(id:String):String { diff --git a/components/app/SideDrawer.vue b/components/app/SideDrawer.vue index 163054de..d80bc7a0 100644 --- a/components/app/SideDrawer.vue +++ b/components/app/SideDrawer.vue @@ -29,7 +29,7 @@

{{ $config.version }}

-

Disconnect

+

{{ $strings.ButtonDisconnect }}

cloud_off
@@ -85,7 +85,7 @@ export default { var items = [ { icon: 'home', - text: 'Home', + text: this.$strings.ButtonHome, to: '/bookshelf' } ] @@ -93,19 +93,19 @@ export default { items = [ { icon: 'cloud_off', - text: 'Connect to Server', + text: this.$strings.ButtonConnectToServer, to: '/connect' } ].concat(items) } else { items.push({ icon: 'person', - text: 'Account', + text: this.$strings.HeaderAccount, to: '/account' }) items.push({ icon: 'equalizer', - text: 'User Stats', + text: this.$strings.ButtonUserStats, to: '/stats' }) } @@ -114,27 +114,27 @@ export default { items.push({ icon: 'folder', iconOutlined: true, - text: 'Local Media', + text: this.$strings.ButtonLocalMedia, to: '/localMedia/folders' }) } else { items.push({ icon: 'download', iconOutlined: false, - text: 'Downloads', + text: this.$strings.HeaderDownloads, to: '/downloads' }) } items.push({ icon: 'settings', - text: 'Settings', + text: this.$strings.HeaderSettings, to: '/settings' }) if (this.serverConnectionConfig) { items.push({ icon: 'login', - text: 'Switch Server/User', + text: this.$strings.ButtonSwitchServerUser, action: 'logout' }) } diff --git a/components/bookshelf/LazyBookshelf.vue b/components/bookshelf/LazyBookshelf.vue index 4b082246..85697c92 100644 --- a/components/bookshelf/LazyBookshelf.vue +++ b/components/bookshelf/LazyBookshelf.vue @@ -9,7 +9,7 @@
No {{ entityName }}
- Clear Filter + {{ $strings.ButtonClearFilter }}
diff --git a/components/cards/AuthorCard.vue b/components/cards/AuthorCard.vue index 06a602be..a52c2cf1 100644 --- a/components/cards/AuthorCard.vue +++ b/components/cards/AuthorCard.vue @@ -7,7 +7,7 @@

{{ name }}

-

{{ numBooks }} Book{{ numBooks === 1 ? '' : 's' }}

+

{{ numBooks }} {{ $strings.LabelBooks }}

diff --git a/components/connection/ServerConnectForm.vue b/components/connection/ServerConnectForm.vue index ab62d509..d02fbb6f 100644 --- a/components/connection/ServerConnectForm.vue +++ b/components/connection/ServerConnectForm.vue @@ -12,7 +12,7 @@
- Add New Server + {{ $strings.ButtonAddNewServer }}
@@ -22,10 +22,10 @@
arrow_back
-

Server address

+

{{ $strings.LabelServerAddress }}

- {{ networkConnected ? 'Submit' : 'No Internet' }} + {{ networkConnected ? $strings.ButtonSubmit : $strings.MessageNoNetworkConnection }}
@@ -41,13 +41,13 @@
- - + +
- {{ networkConnected ? 'Submit' : 'No Internet' }} + {{ networkConnected ? $strings.ButtonSubmit : $strings.MessageNoNetworkConnection }}
@@ -73,7 +73,7 @@
-

Important! This app is designed to work with an Audiobookshelf server that you or someone you know is hosting. This app does not provide any content.

+

diff --git a/components/forms/NewPodcastForm.vue b/components/forms/NewPodcastForm.vue index 9583d9d1..b070ff39 100644 --- a/components/forms/NewPodcastForm.vue +++ b/components/forms/NewPodcastForm.vue @@ -2,24 +2,24 @@
- + - + - + - + - + - + - +
- +
- Submit + {{ $strings.ButtonSubmit }}
@@ -144,11 +144,11 @@ export default { .post('/api/podcasts', podcastPayload) .then((libraryItem) => { this._processing = false - this.$toast.success('Podcast added') + this.$toast.success(this.$strings.ToastPodcastCreateSuccess) this.$router.push(`/item/${libraryItem.id}`) }) .catch((error) => { - var errorMsg = error.response && error.response.data ? error.response.data : 'Failed to add podcast' + var errorMsg = error.response && error.response.data ? error.response.data : this.$strings.ToastPodcastCreateFailed console.error('Failed to create podcast', error) this._processing = false this.$toast.error(errorMsg) diff --git a/components/home/BookshelfNavBar.vue b/components/home/BookshelfNavBar.vue index c4f3c86f..c409f6e9 100644 --- a/components/home/BookshelfNavBar.vue +++ b/components/home/BookshelfNavBar.vue @@ -38,7 +38,7 @@ export default { iconPack: 'abs-icons', icon: 'home', iconClass: 'text-xl', - text: 'Home' + text: this.$strings.ButtonHome }, { to: '/bookshelf/latest', @@ -46,7 +46,7 @@ export default { iconPack: 'abs-icons', icon: 'list', iconClass: 'text-xl', - text: 'Latest' + text: this.$strings.ButtonLatest }, { to: '/bookshelf/library', @@ -54,7 +54,7 @@ export default { iconPack: 'abs-icons', icon: this.currentLibraryIcon, iconClass: 'text-lg', - text: 'Library' + text: this.$strings.ButtonLibrary } ] @@ -65,7 +65,7 @@ export default { iconPack: 'material-icons', icon: 'podcasts', iconClass: 'text-xl', - text: 'Add' + text: this.$strings.ButtonAdd }) } } else { @@ -76,7 +76,7 @@ export default { iconPack: 'abs-icons', icon: 'home', iconClass: 'text-xl', - text: 'Home' + text: this.$strings.ButtonHome }, { to: '/bookshelf/library', @@ -84,7 +84,7 @@ export default { iconPack: 'abs-icons', icon: this.currentLibraryIcon, iconClass: 'text-lg', - text: 'Library' + text: this.$strings.ButtonLibrary }, { to: '/bookshelf/series', @@ -92,7 +92,7 @@ export default { iconPack: 'abs-icons', icon: 'columns', iconClass: 'text-lg pt-px', - text: 'Series' + text: this.$strings.ButtonSeries }, { to: '/bookshelf/collections', @@ -100,7 +100,7 @@ export default { iconPack: 'material-icons-outlined', icon: 'collections_bookmark', iconClass: 'text-xl', - text: 'Collections' + text: this.$strings.ButtonCollections }, { to: '/bookshelf/authors', @@ -108,7 +108,7 @@ export default { iconPack: 'abs-icons', icon: 'authors', iconClass: 'text-2xl', - text: 'Authors' + text: this.$strings.ButtonAuthors } ] } @@ -119,7 +119,7 @@ export default { routeName: 'bookshelf-playlists', iconPack: 'material-icons', icon: 'queue_music', - text: 'Playlists' + text: this.$strings.ButtonPlaylists }) } diff --git a/components/modals/AutoSleepTimerRewindLengthModal.vue b/components/modals/AutoSleepTimerRewindLengthModal.vue index 2f13df25..02b8747a 100644 --- a/components/modals/AutoSleepTimerRewindLengthModal.vue +++ b/components/modals/AutoSleepTimerRewindLengthModal.vue @@ -2,7 +2,7 @@ @@ -23,7 +23,7 @@

{{ manualTimeoutMin }} min

add
- Set Timer + {{ $strings.ButtonSetTimer }} diff --git a/components/modals/BookmarksModal.vue b/components/modals/BookmarksModal.vue index e481c1e7..33f074ac 100644 --- a/components/modals/BookmarksModal.vue +++ b/components/modals/BookmarksModal.vue @@ -2,7 +2,7 @@
@@ -29,11 +29,11 @@
-

No Bookmarks

+

{{ $strings.MessageNoBookmarks }}

add -

Create Bookmark

+

{{ $strings.ButtonCreateBookmark }}

{{ this.$secondsToTimestamp(currentTime) }}

@@ -98,7 +98,7 @@ export default { await this.$hapticsImpact() const { value } = await Dialog.confirm({ title: 'Remove Bookmark', - message: `Are you sure you want to remove bookmark?` + message: this.$strings.MessageConfirmRemoveBookmark }) if (!value) return @@ -108,7 +108,7 @@ export default { this.$store.commit('user/deleteBookmark', { libraryItemId: this.libraryItemId, time: bm.time }) }) .catch((error) => { - this.$toast.error(`Failed to remove bookmark`) + this.$toast.error(this.$strings.ToastBookmarkRemoveFailed) console.error(error) }) }, @@ -124,7 +124,7 @@ export default { this.showBookmarkTitleInput = false }) .catch((error) => { - this.$toast.error(`Failed to update bookmark`) + this.$toast.error(this.$strings.ToastBookmarkUpdateFailed) console.error(error) }) }, @@ -142,7 +142,7 @@ export default { this.$toast.success('Bookmark added') }) .catch((error) => { - this.$toast.error(`Failed to create bookmark`) + this.$toast.error(this.$strings.ToastBookmarkCreateFailed) console.error(error) }) diff --git a/components/modals/ChaptersModal.vue b/components/modals/ChaptersModal.vue index 9a1c94d3..31cb8845 100644 --- a/components/modals/ChaptersModal.vue +++ b/components/modals/ChaptersModal.vue @@ -2,7 +2,7 @@ diff --git a/components/modals/FilterModal.vue b/components/modals/FilterModal.vue index b4215a3e..67cb8f4c 100644 --- a/components/modals/FilterModal.vue +++ b/components/modals/FilterModal.vue @@ -2,7 +2,7 @@
@@ -25,7 +25,7 @@ arrow_left
- Back + {{ $strings.ButtonBack }}
  • @@ -57,62 +57,62 @@ export default { sublist: null, bookItems: [ { - text: 'All', + text: this.$strings.LabelAll, value: 'all' }, { - text: 'Genre', + text: this.$strings.LabelGenre, value: 'genres', sublist: true }, { - text: 'Tag', + text: this.$strings.LabelTag, value: 'tags', sublist: true }, { - text: 'Series', + text: this.$strings.LabelSeries, value: 'series', sublist: true }, { - text: 'Authors', + text: this.$strings.LabelAuthor, value: 'authors', sublist: true }, { - text: 'Narrator', + text: this.$strings.LabelNarrator, value: 'narrators', sublist: true }, { - text: 'Language', + text: this.$strings.LabelLanguage, value: 'languages', sublist: true }, { - text: 'Progress', + text: this.$strings.LabelProgress, value: 'progress', sublist: true }, { - text: 'Issues', + text: this.$strings.ButtonIssues, value: 'issues', sublist: false } ], podcastItems: [ { - text: 'All', + text: this.$strings.LabelAll, value: 'all' }, { - text: 'Genre', + text: this.$strings.LabelGenre, value: 'genres', sublist: true }, { - text: 'Tag', + text: this.$strings.LabelTag, value: 'tags', sublist: true } @@ -176,19 +176,19 @@ export default { return [ { id: 'finished', - name: 'Finished' + name: this.$strings.LabelFinished }, { id: 'in-progress', - name: 'In Progress' + name: this.$strings.LabelInProgress }, { id: 'not-started', - name: 'Not Started' + name: this.$strings.LabelNotStarted }, { id: 'not-finished', - name: 'Not Finished' + name: this.$strings.LabelNotFinished } ] }, diff --git a/components/modals/ItemDetailsModal.vue b/components/modals/ItemDetailsModal.vue index ef2742b2..973d535d 100644 --- a/components/modals/ItemDetailsModal.vue +++ b/components/modals/ItemDetailsModal.vue @@ -2,7 +2,7 @@ diff --git a/components/modals/ItemMoreMenuModal.vue b/components/modals/ItemMoreMenuModal.vue index ad7198eb..195b4bd9 100644 --- a/components/modals/ItemMoreMenuModal.vue +++ b/components/modals/ItemMoreMenuModal.vue @@ -2,7 +2,7 @@
    - +
    @@ -52,7 +52,7 @@ export default { // TODO: Implement on iOS if (this.$platform !== 'ios' && !this.isPodcast) { items.push({ - text: 'History', + text: this.$strings.ButtonHistory, value: 'history', icon: 'history' }) @@ -61,7 +61,7 @@ export default { if (!this.isPodcast || this.episode) { if (!this.userIsFinished) { items.push({ - text: 'Mark as Finished', + text: this.$strings.MessageMarkAsFinished, value: 'markFinished', icon: 'beenhere' }) @@ -69,7 +69,7 @@ export default { if (this.progressPercent > 0) { items.push({ - text: 'Discard Progress', + text: this.$strings.MessageDiscardProgress, value: 'discardProgress', icon: 'backspace' }) @@ -78,14 +78,14 @@ export default { if ((!this.isPodcast && this.serverLibraryItemId) || (this.episode && this.serverEpisodeId)) { items.push({ - text: 'Add to Playlist', + text: this.$strings.LabelAddToPlaylist, value: 'playlist', icon: 'playlist_add' }) if (this.ereaderDeviceItems.length) { items.push({ - text: 'Send ebook to device', + text: this.$strings.ButtonSendEbookToDevice, value: 'sendEbook', icon: 'send' }) @@ -94,7 +94,7 @@ export default { if (this.showRSSFeedOption) { items.push({ - text: this.rssFeed ? 'RSS Feed' : 'Open RSS Feed', + text: this.rssFeed ? this.$strings.HeaderRSSFeed : this.$strings.HeaderOpenRSSFeed, value: 'rssFeed', icon: 'rss_feed' }) @@ -102,20 +102,20 @@ export default { if (this.localLibraryItemId) { items.push({ - text: 'Manage Local Files', + text: this.$strings.ButtonManageLocalFiles, value: 'manageLocal', icon: 'folder' }) if (!this.isPodcast) { items.push({ - text: 'Delete Local Item', + text: this.$strings.ButtonDeleteLocalItem, value: 'deleteLocal', icon: 'delete' }) } else if (this.localEpisodeId) { items.push({ - text: 'Delete Local Episode', + text: this.$strings.ButtonDeleteLocalEpisode, value: 'deleteLocalEpisode', icon: 'delete' }) @@ -124,7 +124,7 @@ export default { if (!this.episode) { items.push({ - text: 'More Info', + text: this.$strings.LabelMoreInfo, value: 'details', icon: 'info' }) @@ -279,7 +279,7 @@ export default { if (this.userItemProgress && this.userItemProgress.progress > 0 && !this.userIsFinished) { const { value } = await Dialog.confirm({ title: 'Confirm', - message: 'Are you sure you want to mark this item as Finished?' + message: this.$strings.MessageConfirmMarkAsFinished }) if (!value) return } @@ -304,7 +304,7 @@ export default { } await this.$nativeHttp.patch(`/api/me/progress/${this.serverLibraryItemId}`, updatePayload).catch((error) => { console.error('Failed', error) - this.$toast.error(`Failed to mark as ${updatePayload.isFinished ? 'Finished' : 'Not Finished'}`) + this.$toast.error(updatePayload.isFinished ? this.$strings.ToastItemMarkedAsFinishedFailed : this.$strings.ToastItemMarkedAsNotFinishedFailed) }) } this.$emit('update:processing', false) @@ -335,7 +335,7 @@ export default { } await this.$nativeHttp.patch(`/api/me/progress/${this.serverLibraryItemId}/${this.serverEpisodeId}`, updatePayload).catch((error) => { console.error('Failed', error) - this.$toast.error(`Failed to mark as ${updatePayload.isFinished ? 'Finished' : 'Not Finished'}`) + this.$toast.error(updatePayload.isFinished ? this.$strings.ToastItemMarkedAsFinishedFailed : this.$strings.ToastItemMarkedAsNotFinishedFailed) }) } this.$emit('update:processing', false) @@ -345,7 +345,7 @@ export default { const { value } = await Dialog.confirm({ title: 'Confirm', - message: 'Are you sure you want to reset your progress?' + message: this.$strings.MessageConfirmDiscardProgress }) if (value) { this.$emit('update:processing', true) diff --git a/components/modals/LibrariesModal.vue b/components/modals/LibrariesModal.vue index d677082d..ed0e2db4 100644 --- a/components/modals/LibrariesModal.vue +++ b/components/modals/LibrariesModal.vue @@ -2,7 +2,7 @@ diff --git a/components/modals/OrderModal.vue b/components/modals/OrderModal.vue index 4ff6417f..c2106e8a 100644 --- a/components/modals/OrderModal.vue +++ b/components/modals/OrderModal.vue @@ -29,83 +29,83 @@ export default { return { bookItems: [ { - text: 'Title', + text: this.$strings.LabelTitle, value: 'media.metadata.title' }, { - text: 'Author (First Last)', + text: this.$strings.LabelAuthorFirstLast, value: 'media.metadata.authorName' }, { - text: 'Author (Last, First)', + text: this.$strings.LabelAuthorLastFirst, value: 'media.metadata.authorNameLF' }, { - text: 'Published Year', + text: this.$strings.LabelPublishYear, value: 'media.metadata.publishedYear' }, { - text: 'Added At', + text: this.$strings.LabelAddedAt, value: 'addedAt' }, { - text: 'Size', + text: this.$strings.LabelSize, value: 'size' }, { - text: 'Duration', + text: this.$strings.LabelDuration, value: 'media.duration' }, { - text: 'File Birthtime', + text: this.$strings.LabelFileBirthtime, value: 'birthtimeMs' }, { - text: 'File Modified', + text: this.$strings.LabelFileModified, value: 'mtimeMs' } ], podcastItems: [ { - text: 'Title', + text: this.$strings.LabelTitle, value: 'media.metadata.title' }, { - text: 'Author', + text: this.$strings.LabelAuthor, value: 'media.metadata.author' }, { - text: 'Added At', + text: this.$strings.LabelAddedAt, value: 'addedAt' }, { - text: 'Size', + text: this.$strings.LabelSize, value: 'size' }, { - text: 'File Birthtime', + text: this.$strings.LabelFileBirthtime, value: 'birthtimeMs' }, { - text: 'File Modified', + text: this.$strings.LabelFileModified, value: 'mtimeMs' } ], episodeItems: [ { - text: 'Pub Date', + text: this.$strings.LabelPubDate, value: 'publishedAt' }, { - text: 'Title', + text: this.$strings.LabelTitle, value: 'title' }, { - text: 'Season', + text: this.$strings.LabelSeason, value: 'season' }, { - text: 'Episode', + text: this.$strings.LabelEpisode, value: 'episode' } ] diff --git a/components/modals/PlaybackSpeedModal.vue b/components/modals/PlaybackSpeedModal.vue index 82f557f7..6e711e10 100644 --- a/components/modals/PlaybackSpeedModal.vue +++ b/components/modals/PlaybackSpeedModal.vue @@ -2,7 +2,7 @@ diff --git a/components/modals/SelectLocalFolderModal.vue b/components/modals/SelectLocalFolderModal.vue index 514eb453..92d5b2e3 100644 --- a/components/modals/SelectLocalFolderModal.vue +++ b/components/modals/SelectLocalFolderModal.vue @@ -2,7 +2,7 @@ @@ -71,7 +71,7 @@ export default { if (!localFolders.some((lf) => lf.id === `internal-${this.mediaType}`)) { localFolders.push({ id: `internal-${this.mediaType}`, - name: 'Internal App Storage', + name: this.$strings.LabelInternalAppStorage, mediaType: this.mediaType }) } diff --git a/components/modals/SleepTimerLengthModal.vue b/components/modals/SleepTimerLengthModal.vue index 3f94454e..f1313d91 100644 --- a/components/modals/SleepTimerLengthModal.vue +++ b/components/modals/SleepTimerLengthModal.vue @@ -2,7 +2,7 @@ @@ -23,7 +23,7 @@

    {{ manualTimeoutMin }} min

    add
  • - Set Timer + {{ $strings.ButtonSetTimer }}
    • - End of Chapter + {{ $strings.LabelEndOfChapter }}
    • - Custom time + {{ $strings.LabelCustomTime }}
    diff --git a/components/modals/SleepTimerModal.vue b/components/modals/SleepTimerModal.vue index cd8ca41f..a8e31c9a 100644 --- a/components/modals/SleepTimerModal.vue +++ b/components/modals/SleepTimerModal.vue @@ -2,7 +2,7 @@ @@ -23,7 +23,7 @@

    {{ manualTimeoutMin }} min

    add - Set Timer + {{ $strings.ButtonSetTimer }}
    • - End of Chapter + {{ $strings.LabelEndOfChapter }}
    • - Custom time + {{ $strings.LabelCustomTime }}
    @@ -51,7 +51,7 @@ add - {{ isAuto ? 'Disable Auto Timer' : 'Cancel Timer' }} + {{ isAuto ? $strings.ButtonDisableAutoTimer : $strings.ButtonCancelTimer }} diff --git a/components/modals/playlists/AddCreateModal.vue b/components/modals/playlists/AddCreateModal.vue index f7c3511d..6125050b 100644 --- a/components/modals/playlists/AddCreateModal.vue +++ b/components/modals/playlists/AddCreateModal.vue @@ -1,7 +1,7 @@
    -

    {{ loading ? 'Loading..' : 'No Playlists' }}

    +

    {{ loading ? $strings.MessageLoading : $strings.MessageNoUserPlaylists }}

    @@ -40,7 +40,7 @@
    -

    Create New Playlist

    +

    {{ $strings.ButtonCreateNewPlaylist }}

    @@ -193,8 +193,7 @@ export default { }) .catch((error) => { console.error('Failed to create playlist', error) - var errMsg = error.response ? error.response.data || '' : '' - this.$toast.error(`Failed to create playlist: ${errMsg}`) + this.$toast.error(this.$strings.ToastPlaylistCreateFailed) }) .finally(() => { this.processing = false diff --git a/components/modals/playlists/PlaylistRow.vue b/components/modals/playlists/PlaylistRow.vue index 90dc2a46..0c1cd077 100644 --- a/components/modals/playlists/PlaylistRow.vue +++ b/components/modals/playlists/PlaylistRow.vue @@ -8,8 +8,8 @@

    {{ playlist.name }}

    - Remove - Add + {{ $strings.ButtonRemove }} + {{ $strings.ButtonAdd }}
    diff --git a/components/modals/rssfeeds/RssFeedModal.vue b/components/modals/rssfeeds/RssFeedModal.vue index 6ba27753..e63368b5 100644 --- a/components/modals/rssfeeds/RssFeedModal.vue +++ b/components/modals/rssfeeds/RssFeedModal.vue @@ -10,7 +10,7 @@
    -

    RSS feed is open

    +

    {{ $strings.HeaderRSSFeedIsOpen }}

    @@ -22,7 +22,7 @@
    {{ $strings.LabelRSSFeedPreventIndexing }}
    -
    {{ currentFeed.meta.preventIndexing ? 'Yes' : 'No' }}
    +
    {{ currentFeed.meta.preventIndexing ? $strings.ButtonYes : $strings.LabelNo }}
    diff --git a/components/tables/ChaptersTable.vue b/components/tables/ChaptersTable.vue index acba169d..756f6d35 100644 --- a/components/tables/ChaptersTable.vue +++ b/components/tables/ChaptersTable.vue @@ -1,7 +1,7 @@