diff --git a/e2e/timeline.spec.ts b/e2e/timeline.spec.ts index 993f397d..a45e1d9c 100644 --- a/e2e/timeline.spec.ts +++ b/e2e/timeline.spec.ts @@ -29,7 +29,7 @@ test.describe('Open', () => { await page.locator(`${i2}`).click(); await page.waitForTimeout(1000); - await page.locator('[aria-label="Delete selection"]').click(); + await page.locator('[aria-label="Delete"]').click(); await page.waitForTimeout(4000); expect(await page.locator(`img[src="${src1}"]`).count()).toBe(0); expect(await page.locator(`img[src="${src2}"]`).count()).toBe(0); diff --git a/src/App.vue b/src/App.vue index 9b812608..4c44e891 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,20 +3,20 @@ diff --git a/src/components/Photo.vue b/src/components/Photo.vue index 0ddcd6be..506fb9f1 100644 --- a/src/components/Photo.vue +++ b/src/components/Photo.vue @@ -143,7 +143,7 @@ export default class Photo extends Mixins(GlobalMixin) { // Get this photo in the fileInfos const photo = fileInfos.find(d => Number(d.fileid) === Number(this.data.fileid)); if (!photo) { - showError('Cannot find this photo anymore!'); + showError(this.t('memories', 'Cannot find this photo anymore!')); return; } diff --git a/src/components/Settings.vue b/src/components/Settings.vue index d300d1a1..dcf9fc8d 100644 --- a/src/components/Settings.vue +++ b/src/components/Settings.vue @@ -65,7 +65,7 @@ export default class Settings extends Mixins(UserConfig, GlobalMixin) { if (res.status === 200) { window.location.reload(); } else { - showError('Error updating settings'); + showError(this.t('memories', 'Error updating settings')); } } } diff --git a/src/components/Timeline.vue b/src/components/Timeline.vue index 5536bddc..1438825d 100644 --- a/src/components/Timeline.vue +++ b/src/components/Timeline.vue @@ -75,7 +75,7 @@
{{ t('memories', 'Cancel') }} @@ -88,7 +88,7 @@ {{ t('memories', 'Delete') }} @@ -96,13 +96,13 @@ {{ t('memories', 'Download') }} {{ t('memories', 'Favorite') }} diff --git a/src/services/DavRequests.ts b/src/services/DavRequests.ts index 9cad3fe0..fb651f6c 100644 --- a/src/services/DavRequests.ts +++ b/src/services/DavRequests.ts @@ -196,8 +196,8 @@ export async function* deleteFilesByIds(fileIds: number[]) { try { fileInfos = await getFiles(fileIds.filter(f => f)); } catch (e) { - showError(t('memories', 'Failed to delete files.')); console.error('Failed to get file info for files to delete', fileIds, e); + showError(t('memories', 'Failed to delete files.')); return; } @@ -208,7 +208,7 @@ export async function* deleteFilesByIds(fileIds: number[]) { await deleteFile(fileInfo.filename); return fileInfo.fileid as number; } catch (error) { - console.error(t('memories', 'Failed to delete {fileName}.', fileInfo), error); + console.error('Failed to delete', fileInfo, error); showError(t('memories', 'Failed to delete {fileName}.', fileInfo)); return 0; } @@ -287,7 +287,7 @@ export async function downloadFilesByIds(fileIds: number[]) { }, ) } catch (error) { - console.error(t('memories', 'Failed to favorite {fileName}.', { fileName }), error) + console.error('Failed to favorite', fileName, error) showError(t('memories', 'Failed to favorite {fileName}.', { fileName })) } } @@ -311,8 +311,8 @@ export async function downloadFilesByIds(fileIds: number[]) { try { fileInfos = await getFiles(fileIds.filter(f => f)); } catch (e) { + console.error('Failed to get file info', fileIds, e); showError(t('memories', 'Failed to favorite files.')); - console.error('Failed to get file info for files to favorite', fileIds, e); return; } @@ -323,7 +323,7 @@ export async function downloadFilesByIds(fileIds: number[]) { await favoriteFile(fileInfo.filename, favoriteState); return fileInfo.fileid as number; } catch (error) { - console.error(t('memories', 'Failed to favorite {fileName}.', fileInfo), error); + console.error('Failed to favorite', fileInfo, error); showError(t('memories', 'Failed to favorite {fileName}.', fileInfo)); return 0; }