mirror of
https://github.com/immich-app/immich.git
synced 2025-12-19 01:11:07 +03:00
chore(web): translate alt text (#10922)
* chore(web): translate image alt text * fix: capitalize translations, improve unit test * fix: unit testing against the actual en.json file * fix: use derived store to generate alt text
This commit is contained in:
@@ -123,7 +123,7 @@
|
||||
<img
|
||||
style="display:none"
|
||||
src={imageLoaderUrl}
|
||||
alt={getAltText(asset)}
|
||||
alt={$getAltText(asset)}
|
||||
on:load={() => ((imageLoaded = true), (assetFileUrl = imageLoaderUrl))}
|
||||
on:error={() => (imageError = imageLoaded = true)}
|
||||
/>
|
||||
@@ -136,7 +136,7 @@
|
||||
{#if $slideshowState !== SlideshowState.None && $slideshowLook === SlideshowLook.BlurredBackground}
|
||||
<img
|
||||
src={assetFileUrl}
|
||||
alt={getAltText(asset)}
|
||||
alt={$getAltText(asset)}
|
||||
class="absolute top-0 left-0 -z-10 object-cover h-full w-full blur-lg"
|
||||
draggable="false"
|
||||
/>
|
||||
@@ -144,7 +144,7 @@
|
||||
<img
|
||||
bind:this={$photoViewer}
|
||||
src={assetFileUrl}
|
||||
alt={getAltText(asset)}
|
||||
alt={$getAltText(asset)}
|
||||
class="h-full w-full {$slideshowState === SlideshowState.None
|
||||
? 'object-contain'
|
||||
: slideshowLookCssMapping[$slideshowLook]}"
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
{#if asset.resized}
|
||||
<ImageThumbnail
|
||||
url={getAssetThumbnailUrl({ id: asset.id, size: AssetMediaSize.Thumbnail, checksum: asset.checksum })}
|
||||
altText={getAltText(asset)}
|
||||
altText={$getAltText(asset)}
|
||||
widthStyle="{width}px"
|
||||
heightStyle="{height}px"
|
||||
thumbhash={asset.thumbhash}
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
<img
|
||||
class="h-full w-full rounded-xl object-cover"
|
||||
src={getAssetThumbnailUrl(memory.assets[0].id)}
|
||||
alt={`Memory Lane ${getAltText(memory.assets[0])}`}
|
||||
alt={`Memory Lane ${$getAltText(memory.assets[0])}`}
|
||||
draggable="false"
|
||||
/>
|
||||
<p class="absolute bottom-2 left-4 z-10 text-lg text-white">
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<!-- THUMBNAIL-->
|
||||
<img
|
||||
src={getAssetThumbnailUrl(asset.id)}
|
||||
alt={getAltText(asset)}
|
||||
alt={$getAltText(asset)}
|
||||
title={assetData}
|
||||
class="h-60 object-cover rounded-t-xl w-full"
|
||||
draggable="false"
|
||||
|
||||
Reference in New Issue
Block a user