More localization support (#33)
parent
47532b5d72
commit
45b90aa91f
|
@ -29,7 +29,7 @@ test.describe('Open', () => {
|
||||||
await page.locator(`${i2}`).click();
|
await page.locator(`${i2}`).click();
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForTimeout(1000);
|
||||||
|
|
||||||
await page.locator('[aria-label="Delete selection"]').click();
|
await page.locator('[aria-label="Delete"]').click();
|
||||||
await page.waitForTimeout(4000);
|
await page.waitForTimeout(4000);
|
||||||
expect(await page.locator(`img[src="${src1}"]`).count()).toBe(0);
|
expect(await page.locator(`img[src="${src1}"]`).count()).toBe(0);
|
||||||
expect(await page.locator(`img[src="${src2}"]`).count()).toBe(0);
|
expect(await page.locator(`img[src="${src2}"]`).count()).toBe(0);
|
||||||
|
|
|
@ -3,20 +3,20 @@
|
||||||
<NcAppNavigation>
|
<NcAppNavigation>
|
||||||
<template id="app-memories-navigation" #list>
|
<template id="app-memories-navigation" #list>
|
||||||
<NcAppNavigationItem :to="{name: 'timeline'}"
|
<NcAppNavigationItem :to="{name: 'timeline'}"
|
||||||
:title="t('timeline', 'Timeline')"
|
:title="t('memories', 'Timeline')"
|
||||||
exact>
|
exact>
|
||||||
<ImageMultiple slot="icon" :size="20" />
|
<ImageMultiple slot="icon" :size="20" />
|
||||||
</NcAppNavigationItem>
|
</NcAppNavigationItem>
|
||||||
<NcAppNavigationItem :to="{name: 'folders'}"
|
<NcAppNavigationItem :to="{name: 'folders'}"
|
||||||
:title="t('folders', 'Folders')">
|
:title="t('memories', 'Folders')">
|
||||||
<FolderIcon slot="icon" :size="20" />
|
<FolderIcon slot="icon" :size="20" />
|
||||||
</NcAppNavigationItem>
|
</NcAppNavigationItem>
|
||||||
<NcAppNavigationItem :to="{name: 'favorites'}"
|
<NcAppNavigationItem :to="{name: 'favorites'}"
|
||||||
:title="t('favorites', 'Favorites')">
|
:title="t('memories', 'Favorites')">
|
||||||
<Star slot="icon" :size="20" />
|
<Star slot="icon" :size="20" />
|
||||||
</NcAppNavigationItem>
|
</NcAppNavigationItem>
|
||||||
<NcAppNavigationItem :to="{name: 'videos'}"
|
<NcAppNavigationItem :to="{name: 'videos'}"
|
||||||
:title="t('videos', 'Videos')">
|
:title="t('memories', 'Videos')">
|
||||||
<Video slot="icon" :size="20" />
|
<Video slot="icon" :size="20" />
|
||||||
</NcAppNavigationItem>
|
</NcAppNavigationItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -143,7 +143,7 @@ export default class Photo extends Mixins(GlobalMixin) {
|
||||||
// Get this photo in the fileInfos
|
// Get this photo in the fileInfos
|
||||||
const photo = fileInfos.find(d => Number(d.fileid) === Number(this.data.fileid));
|
const photo = fileInfos.find(d => Number(d.fileid) === Number(this.data.fileid));
|
||||||
if (!photo) {
|
if (!photo) {
|
||||||
showError('Cannot find this photo anymore!');
|
showError(this.t('memories', 'Cannot find this photo anymore!'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ export default class Settings extends Mixins(UserConfig, GlobalMixin) {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
} else {
|
} else {
|
||||||
showError('Error updating settings');
|
showError(this.t('memories', 'Error updating settings'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
<div v-if="selection.size > 0" class="top-bar">
|
<div v-if="selection.size > 0" class="top-bar">
|
||||||
<NcActions>
|
<NcActions>
|
||||||
<NcActionButton
|
<NcActionButton
|
||||||
:aria-label="t('memories', 'Cancel selection')"
|
:aria-label="t('memories', 'Cancel')"
|
||||||
@click="clearSelection()">
|
@click="clearSelection()">
|
||||||
{{ t('memories', 'Cancel') }}
|
{{ t('memories', 'Cancel') }}
|
||||||
<template #icon> <Close :size="20" /> </template>
|
<template #icon> <Close :size="20" /> </template>
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
|
|
||||||
<NcActions>
|
<NcActions>
|
||||||
<NcActionButton
|
<NcActionButton
|
||||||
:aria-label="t('memories', 'Delete selection')"
|
:aria-label="t('memories', 'Delete')"
|
||||||
@click="deleteSelection">
|
@click="deleteSelection">
|
||||||
{{ t('memories', 'Delete') }}
|
{{ t('memories', 'Delete') }}
|
||||||
<template #icon> <Delete :size="20" /> </template>
|
<template #icon> <Delete :size="20" /> </template>
|
||||||
|
@ -96,13 +96,13 @@
|
||||||
</NcActions>
|
</NcActions>
|
||||||
<NcActions>
|
<NcActions>
|
||||||
<NcActionButton
|
<NcActionButton
|
||||||
:aria-label="t('memories', 'Download selection')"
|
:aria-label="t('memories', 'Download')"
|
||||||
@click="downloadSelection">
|
@click="downloadSelection">
|
||||||
{{ t('memories', 'Download') }}
|
{{ t('memories', 'Download') }}
|
||||||
<template #icon> <Download :size="20" /> </template>
|
<template #icon> <Download :size="20" /> </template>
|
||||||
</NcActionButton>
|
</NcActionButton>
|
||||||
<NcActionButton
|
<NcActionButton
|
||||||
:aria-label="t('memories', 'Mark Favorite')"
|
:aria-label="t('memories', 'Favorite')"
|
||||||
@click="favoriteSelection">
|
@click="favoriteSelection">
|
||||||
{{ t('memories', 'Favorite') }}
|
{{ t('memories', 'Favorite') }}
|
||||||
<template #icon> <Star :size="20" /> </template>
|
<template #icon> <Star :size="20" /> </template>
|
||||||
|
|
|
@ -196,8 +196,8 @@ export async function* deleteFilesByIds(fileIds: number[]) {
|
||||||
try {
|
try {
|
||||||
fileInfos = await getFiles(fileIds.filter(f => f));
|
fileInfos = await getFiles(fileIds.filter(f => f));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showError(t('memories', 'Failed to delete files.'));
|
|
||||||
console.error('Failed to get file info for files to delete', fileIds, e);
|
console.error('Failed to get file info for files to delete', fileIds, e);
|
||||||
|
showError(t('memories', 'Failed to delete files.'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ export async function* deleteFilesByIds(fileIds: number[]) {
|
||||||
await deleteFile(fileInfo.filename);
|
await deleteFile(fileInfo.filename);
|
||||||
return fileInfo.fileid as number;
|
return fileInfo.fileid as number;
|
||||||
} catch (error) {
|
} 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));
|
showError(t('memories', 'Failed to delete {fileName}.', fileInfo));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -287,7 +287,7 @@ export async function downloadFilesByIds(fileIds: number[]) {
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
} catch (error) {
|
} 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 }))
|
showError(t('memories', 'Failed to favorite {fileName}.', { fileName }))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -311,8 +311,8 @@ export async function downloadFilesByIds(fileIds: number[]) {
|
||||||
try {
|
try {
|
||||||
fileInfos = await getFiles(fileIds.filter(f => f));
|
fileInfos = await getFiles(fileIds.filter(f => f));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
console.error('Failed to get file info', fileIds, e);
|
||||||
showError(t('memories', 'Failed to favorite files.'));
|
showError(t('memories', 'Failed to favorite files.'));
|
||||||
console.error('Failed to get file info for files to favorite', fileIds, e);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -323,7 +323,7 @@ export async function downloadFilesByIds(fileIds: number[]) {
|
||||||
await favoriteFile(fileInfo.filename, favoriteState);
|
await favoriteFile(fileInfo.filename, favoriteState);
|
||||||
return fileInfo.fileid as number;
|
return fileInfo.fileid as number;
|
||||||
} catch (error) {
|
} 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));
|
showError(t('memories', 'Failed to favorite {fileName}.', fileInfo));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue