From 3f7a446dd8822e6cd91d6e9607386e12475b3841 Mon Sep 17 00:00:00 2001 From: volar Date: Tue, 5 Dec 2023 17:12:48 +0100 Subject: [PATCH] wip --- .../components/AssetImageMetaIcons.vue | 9 +++--- .../uploadQueue/components/AssetInfobox.vue | 8 ++--- .../components/UploadQueueDialog.vue | 2 +- .../components/UploadQueueDialogSingle.vue | 2 +- .../components/UploadQueueItemEditable.vue | 12 ++++---- .../composables/assetFileFailReason.ts | 12 ++++---- .../composables/assetImageIconsConfig.ts | 10 +++---- src/locales/sk/common/damImage.json | 30 +++++++++++++++++++ 8 files changed, 57 insertions(+), 28 deletions(-) diff --git a/src/components/damImage/uploadQueue/components/AssetImageMetaIcons.vue b/src/components/damImage/uploadQueue/components/AssetImageMetaIcons.vue index 72faa722..30690ee8 100644 --- a/src/components/damImage/uploadQueue/components/AssetImageMetaIcons.vue +++ b/src/components/damImage/uploadQueue/components/AssetImageMetaIcons.vue @@ -4,9 +4,10 @@ import { useI18n } from 'vue-i18n' import { type AssetFileProperties, DamAssetType } from '@/types/coreDam/Asset' import { DIMENSIONS_CONFIG, - ICON_LOW, + ICON_LOW, ICON_RSS, ICON_SLOTS, LOW_DIMENSION } from '@/components/damImage/uploadQueue/composables/assetImageIconsConfig' +import { useDamConfigState } from '@/components/damImage/uploadQueue/composables/damConfigState' const props = withDefaults( defineProps<{ @@ -27,7 +28,7 @@ const checkDimensions = (icons: string[], titles: string[]) => { } if (props.assetFileProperties.width < LOW_DIMENSION || props.assetFileProperties.height < LOW_DIMENSION) { icons.push(ICON_LOW) - titles.push(t('coreDam.asset.metaIcons.low')) + titles.push(t('common.damImage.asset.metaIcons.low')) return } if (props.assetType !== DamAssetType.Video) return @@ -61,11 +62,11 @@ const data = computed(() => { if (props.assetFileProperties.slotNames.length > 1) { icons.push(ICON_SLOTS) - titles.push(t('coreDam.asset.metaIcons.slots')) + titles.push(t('common.damImage.asset.metaIcons.slots')) } if (props.assetFileProperties.fromRss) { icons.push(ICON_RSS) - titles.push(t('coreDam.asset.metaIcons.rss')) + titles.push(t('common.damImage.asset.metaIcons.rss')) } checkDimensions(icons, titles) checkDistributions(icons, titles) diff --git a/src/components/damImage/uploadQueue/components/AssetInfobox.vue b/src/components/damImage/uploadQueue/components/AssetInfobox.vue index 3a3add21..334f6ffd 100644 --- a/src/components/damImage/uploadQueue/components/AssetInfobox.vue +++ b/src/components/damImage/uploadQueue/components/AssetInfobox.vue @@ -28,7 +28,7 @@ const { t } = useI18n() dark type="warning" > - {{ t('coreDam.asset.detail.info.status.duplicate') }} + {{ t('common.damImage.asset.detail.info.status.duplicate') }}
- {{ t('coreDam.asset.detail.info.status.failed') }} + {{ t('common.damImage.asset.detail.info.status.failed') }}

@@ -54,7 +54,7 @@ const { t } = useI18n() dark type="error" > - {{ t('coreDam.asset.detail.info.status.deleting') }} + {{ t('common.damImage.asset.detail.info.status.deleting') }}
- {{ t('coreDam.asset.detail.info.status.draft') }} + {{ t('common.damImage.asset.detail.info.status.draft') }}
diff --git a/src/components/damImage/uploadQueue/components/UploadQueueDialog.vue b/src/components/damImage/uploadQueue/components/UploadQueueDialog.vue index e8bc606c..1faded83 100644 --- a/src/components/damImage/uploadQueue/components/UploadQueueDialog.vue +++ b/src/components/damImage/uploadQueue/components/UploadQueueDialog.vue @@ -198,7 +198,7 @@ const onSaveAndApply = async () => { v-if="isUploading" class="text-subtitle-2 d-flex align-center" > - {{ t('common.damImage.asset.upload.title') }} + {{ t('common.damImage.upload.title') }}
{ color="error" />
- {{ t('coreDam.asset.queueItem.error') }} + {{ t('common.damImage.queueItem.error') }}
{ color="error" />
- {{ t('coreDam.asset.queueItem.error') }} + {{ t('common.damImage.queueItem.error') }}
{ variant="text" :disabled="!item.canEditMetadata" > - {{ t('coreDam.asset.queueItem.edit') }} + {{ t('common.damImage.queueItem.edit') }}
-
- isDuplicate -
+
{ class="my-2 mb-3 mt-0 text-caption" > - {{ t('coreDam.asset.queueItem.displayTitle') }}: {{ item.displayTitle }} + {{ t('common.damImage.queueItem.displayTitle') }}: {{ item.displayTitle }}  ({{ prettyBytes(item.file.size) }}) diff --git a/src/components/damImage/uploadQueue/composables/assetFileFailReason.ts b/src/components/damImage/uploadQueue/composables/assetFileFailReason.ts index c9b5fb3a..e06693cd 100644 --- a/src/components/damImage/uploadQueue/composables/assetFileFailReason.ts +++ b/src/components/damImage/uploadQueue/composables/assetFileFailReason.ts @@ -9,27 +9,27 @@ export function useAssetFileFailReason() { const assetFileFailReasonOptions = ref[]>([ { value: AssetFileFailReason.None, - title: t('coreDam.asset.assetFileFailReason.none'), + title: t('common.damImage.asset.assetFileFailReason.none'), }, { value: AssetFileFailReason.Unknown, - title: t('coreDam.asset.assetFileFailReason.unknown'), + title: t('common.damImage.asset.assetFileFailReason.unknown'), }, { value: AssetFileFailReason.InvalidChecksum, - title: t('coreDam.asset.assetFileFailReason.invalidChecksum'), + title: t('common.damImage.asset.assetFileFailReason.invalidChecksum'), }, { value: AssetFileFailReason.InvalidMimeType, - title: t('coreDam.asset.assetFileFailReason.invalidMimeType'), + title: t('common.damImage.asset.assetFileFailReason.invalidMimeType'), }, { value: AssetFileFailReason.DownloadFailed, - title: t('coreDam.asset.assetFileFailReason.downloadFailed'), + title: t('common.damImage.asset.assetFileFailReason.downloadFailed'), }, { value: AssetFileFailReason.InvalidSize, - title: t('coreDam.asset.assetFileFailReason.invalidSize'), + title: t('common.damImage.asset.assetFileFailReason.invalidSize'), }, ]) diff --git a/src/components/damImage/uploadQueue/composables/assetImageIconsConfig.ts b/src/components/damImage/uploadQueue/composables/assetImageIconsConfig.ts index 41dc950f..3b054c56 100644 --- a/src/components/damImage/uploadQueue/composables/assetImageIconsConfig.ts +++ b/src/components/damImage/uploadQueue/composables/assetImageIconsConfig.ts @@ -9,31 +9,31 @@ import svgrss from '@/assets/dam-meta-icons/rss.svg' export const DIMENSIONS_CONFIG = [ { - titleT: 'coreDam.asset.metaIcons.fullHd', + titleT: 'common.damImage.asset.metaIcons.fullHd', width: 1920, height: 1080, svgSrc: svgfhd, }, { - titleT: 'coreDam.asset.metaIcons.2k', + titleT: 'common.damImage.asset.metaIcons.2k', width: 2048, height: 1080, svgSrc: svg2k, }, { - titleT: 'coreDam.asset.metaIcons.qhd', + titleT: 'common.damImage.asset.metaIcons.qhd', width: 2560, height: 1440, svgSrc: svgqhd, }, { - titleT: 'coreDam.asset.metaIcons.4k', + titleT: 'common.damImage.asset.metaIcons.4k', width: 3840, height: 2160, svgSrc: svg4k, }, { - titleT: 'coreDam.asset.metaIcons.8k', + titleT: 'common.damImage.asset.metaIcons.8k', width: 7680, height: 4320, svgSrc: svg8k, diff --git a/src/locales/sk/common/damImage.json b/src/locales/sk/common/damImage.json index f1073ac3..304987ce 100644 --- a/src/locales/sk/common/damImage.json +++ b/src/locales/sk/common/damImage.json @@ -15,6 +15,12 @@ "addFromDam": "Pridať z DAM" } }, + "queueItem": { + "edit": "Upraviť", + "displayTitle": "Meno originálu", + "error": "Chyba", + "copyAssetId": "Kopírovať asset ID" + }, "asset": { "model": { "authors": "Autori", @@ -37,6 +43,12 @@ "roi": "Fókus" }, "info": { + "status": { + "duplicate": "Hlavný súbor je duplikát.", + "draft": "Neobsahuje žiaden súbor.", + "deleting": "Čoskoro bude zmazaný.", + "failed": "Spracovávanie súboru zlyhalo." + }, "metadata": "Metaúdaje", "file": "Info o súbore", "field": { @@ -72,6 +84,24 @@ "replaceAll": "Nahradiť všetko", "clearForm": "Vyčistiť", "general": "Hlavné" + }, + "metaIcons": { + "low": "Nízka kvalita", + "slots": "Sloty", + "rss": "RSS", + "fullHd": "FullHD", + "2k": "2K", + "qhd": "QHD", + "4k": "4K", + "8k": "8K" + }, + "assetFileFailReason": { + "none": "Žiadny", + "unknown": "Neznámy", + "invalidChecksum": "Neplatný kontrolný súčet", + "invalidMimeType": "Neplatný typ súboru", + "downloadFailed": "Sťahovanie zlyhalo", + "invalidSize": "Neplatná veľkosť" } }, "upload": {