Clean up "no updates" strings

This commit is contained in:
Nicholas Wallace 2024-08-28 22:05:31 -07:00
parent bc2515f993
commit 95143a7816
10 changed files with 13 additions and 15 deletions

View file

@ -9,7 +9,7 @@
<widgets-cron-expression-builder ref="expressionBuilder" v-model="newCronExpression" @input="expressionUpdated" /> <widgets-cron-expression-builder ref="expressionBuilder" v-model="newCronExpression" @input="expressionUpdated" />
<div class="flex items-center justify-end"> <div class="flex items-center justify-end">
<ui-btn :disabled="!isUpdated" @click="submit">{{ isUpdated ? $strings.ButtonSave : $strings.MessageNoUpdateNecessary }}</ui-btn> <ui-btn :disabled="!isUpdated" @click="submit">{{ isUpdated ? $strings.ButtonSave : $strings.MessageNoUpdatesWereNecessary }}</ui-btn>
</div> </div>
</div> </div>
</modals-modal> </modals-modal>

View file

@ -141,7 +141,7 @@ export default {
} }
}) })
if (!Object.keys(updatePayload).length) { if (!Object.keys(updatePayload).length) {
this.$toast.info(this.$strings.MessageNoUpdateNecessary) this.$toast.info(this.$strings.ToastNoUpdatesNecessary)
return return
} }
this.processing = true this.processing = true
@ -158,7 +158,7 @@ export default {
} else if (result.merged) { } else if (result.merged) {
this.$toast.success(this.$strings.ToastAuthorUpdateMerged) this.$toast.success(this.$strings.ToastAuthorUpdateMerged)
this.show = false this.show = false
} else this.$toast.info(this.$strings.MessageNoUpdatesWereNecessary) } else this.$toast.info(this.$strings.ToastNoUpdatesNecessary)
} }
this.processing = false this.processing = false
}, },
@ -240,7 +240,7 @@ export default {
...response.author ...response.author
} }
} else { } else {
this.$toast.info(this.$strings.ToastAuthorNoUpdatesNeeded) this.$toast.info(this.$strings.ToastNoUpdatesNecessary)
} }
this.processing = false this.processing = false
} }

View file

@ -108,7 +108,7 @@ export default {
if (res.warning) { if (res.warning) {
this.$toast.warning(res.warning) this.$toast.warning(res.warning)
} else if (res.updated) { } else if (res.updated) {
this.$toast.success(this.$strings.ToastItemDetailsUpdateSuccess) this.$toast.success(this.$strings.ToastNoUpdatesNecessary)
} else { } else {
this.$toast.info(this.$strings.ToastItemDetailsUpdateUnneeded) this.$toast.info(this.$strings.ToastItemDetailsUpdateUnneeded)
} }

View file

@ -618,7 +618,7 @@ export default {
if (updateResult.updated) { if (updateResult.updated) {
this.$toast.success(this.$strings.ToastItemDetailsUpdateSuccess) this.$toast.success(this.$strings.ToastItemDetailsUpdateSuccess)
} else { } else {
this.$toast.info(this.$strings.ToastItemDetailsUpdateUnneeded) this.$toast.info(this.$strings.ToastNoUpdatesNecessary)
} }
this.clearSelectedMatch() this.clearSelectedMatch()
this.$emit('selectTab', 'details') this.$emit('selectTab', 'details')

View file

@ -205,7 +205,7 @@ export default {
submitUpdateLibrary() { submitUpdateLibrary() {
var newLibraryPayload = this.getLibraryUpdatePayload() var newLibraryPayload = this.getLibraryUpdatePayload()
if (!Object.keys(newLibraryPayload).length) { if (!Object.keys(newLibraryPayload).length) {
this.$toast.info('No updates are necessary') this.$toast.info(this.$strings.ToastNoUpdatesNecessary)
return return
} }

View file

@ -142,7 +142,7 @@ export default {
const updatedDetails = this.getUpdatePayload() const updatedDetails = this.getUpdatePayload()
if (!Object.keys(updatedDetails).length) { if (!Object.keys(updatedDetails).length) {
this.$toast.info('No changes were made') this.$toast.info(this.$strings.ToastNoUpdatesNecessary)
return false return false
} }
return this.updateDetails(updatedDetails) return this.updateDetails(updatedDetails)

View file

@ -105,7 +105,7 @@ export default {
} }
const updatePayload = this.getUpdatePayload(episodeData) const updatePayload = this.getUpdatePayload(episodeData)
if (!Object.keys(updatePayload).length) { if (!Object.keys(updatePayload).length) {
return this.$toast.info('No updates are necessary') return this.$toast.info(this.$strings.ToastNoUpdatesNecessary)
} }
console.log('Episode update payload', updatePayload) console.log('Episode update payload', updatePayload)

View file

@ -270,7 +270,7 @@ export default {
if (data.numEpisodesUpdated) { if (data.numEpisodesUpdated) {
this.$toast.success(`${data.numEpisodesUpdated} episodes updated`) this.$toast.success(`${data.numEpisodesUpdated} episodes updated`)
} else { } else {
this.$toast.info('No changes were made') this.$toast.info(this.$strings.ToastNoUpdatesNecessary)
} }
}) })
.catch((error) => { .catch((error) => {

View file

@ -366,7 +366,7 @@ export default {
} }
} }
if (!updates.length) { if (!updates.length) {
return this.$toast.warning('No updates were made') return this.$toast.warning(this.$strings.ToastNoUpdatesNecessary)
} }
console.log('Pushing updates', updates) console.log('Pushing updates', updates)

View file

@ -735,7 +735,6 @@
"MessageNoSeries": "No Series", "MessageNoSeries": "No Series",
"MessageNoTags": "No Tags", "MessageNoTags": "No Tags",
"MessageNoTasksRunning": "No Tasks Running", "MessageNoTasksRunning": "No Tasks Running",
"MessageNoUpdateNecessary": "No update necessary",
"MessageNoUpdatesWereNecessary": "No updates were necessary", "MessageNoUpdatesWereNecessary": "No updates were necessary",
"MessageNoUserPlaylists": "You have no playlists", "MessageNoUserPlaylists": "You have no playlists",
"MessageNotYetImplemented": "Not yet implemented", "MessageNotYetImplemented": "Not yet implemented",
@ -809,7 +808,6 @@
"ToastApiCallFailed": "API call failed", "ToastApiCallFailed": "API call failed",
"ToastAuthorImageRemoveFailed": "Failed to remove image", "ToastAuthorImageRemoveFailed": "Failed to remove image",
"ToastAuthorImageRemoveSuccess": "Author image removed", "ToastAuthorImageRemoveSuccess": "Author image removed",
"ToastAuthorNoUpdatesNeeded": "No updates needed for author",
"ToastAuthorNotFound": "Author \"{0}\" not found", "ToastAuthorNotFound": "Author \"{0}\" not found",
"ToastAuthorRemoveFailed": "Failed to remove author", "ToastAuthorRemoveFailed": "Failed to remove author",
"ToastAuthorRemoveSuccess": "Author removed", "ToastAuthorRemoveSuccess": "Author removed",
@ -868,7 +866,6 @@
"ToastItemDeletedSuccess": "Deleted item", "ToastItemDeletedSuccess": "Deleted item",
"ToastItemDetailsUpdateFailed": "Failed to update item details", "ToastItemDetailsUpdateFailed": "Failed to update item details",
"ToastItemDetailsUpdateSuccess": "Item details updated", "ToastItemDetailsUpdateSuccess": "Item details updated",
"ToastItemDetailsUpdateUnneeded": "No updates needed for item details",
"ToastItemMarkedAsFinishedFailed": "Failed to mark as Finished", "ToastItemMarkedAsFinishedFailed": "Failed to mark as Finished",
"ToastItemMarkedAsFinishedSuccess": "Item marked as Finished", "ToastItemMarkedAsFinishedSuccess": "Item marked as Finished",
"ToastItemMarkedAsNotFinishedFailed": "Failed to mark as Not Finished", "ToastItemMarkedAsNotFinishedFailed": "Failed to mark as Not Finished",
@ -891,6 +888,7 @@
"ToastNewUserPasswordError": "Must have a password, only root user can have an empty password", "ToastNewUserPasswordError": "Must have a password, only root user can have an empty password",
"ToastNewUserTagError": "Must select at least one tag", "ToastNewUserTagError": "Must select at least one tag",
"ToastNewUserUsernameError": "Enter a username", "ToastNewUserUsernameError": "Enter a username",
"ToastNoUpdatesNecessary": "No updates necessary",
"ToastPlaylistCreateFailed": "Failed to create playlist", "ToastPlaylistCreateFailed": "Failed to create playlist",
"ToastPlaylistCreateSuccess": "Playlist created", "ToastPlaylistCreateSuccess": "Playlist created",
"ToastPlaylistRemoveFailed": "Failed to remove playlist", "ToastPlaylistRemoveFailed": "Failed to remove playlist",