feat(back-end front-end): traslate alt and description images
All checks were successful
PR Checks / prettier-autofix (pull_request) Successful in 10s
PR Checks / security-sast (pull_request) Successful in 29s
PR Checks / test-backend (pull_request) Successful in 25s
PR Checks / test-frontend (pull_request) Successful in 1m4s

This commit is contained in:
2026-03-09 18:49:03 +01:00
parent 85598dee3b
commit e8ebef926e
18 changed files with 788 additions and 52 deletions

View File

@@ -107,20 +107,61 @@
<img [src]="previewUrl" alt="" />
</div>
<div class="language-toolbar form-field--wide">
<div class="language-copy">
<span>Testi localizzati</span>
<p>IT / EN / DE / FR obbligatorie</p>
</div>
<div class="language-toggle">
<button
*ngFor="let language of mediaLanguages"
type="button"
class="language-toggle-btn"
[class.active]="
getFormState(section.usageKey).activeLanguage ===
language
"
[class.complete]="
isLanguageComplete(section.usageKey, language)
"
[class.incomplete]="
!isLanguageComplete(section.usageKey, language)
"
(click)="setActiveLanguage(section.usageKey, language)"
>
{{ mediaLanguageLabels[language] }}
</button>
</div>
</div>
<label class="form-field">
<span>Titolo</span>
<span>
Titolo ({{
mediaLanguageLabels[
getFormState(section.usageKey).activeLanguage
]
}})
</span>
<input
type="text"
[(ngModel)]="getFormState(section.usageKey).title"
[(ngModel)]="getActiveTranslation(section.usageKey).title"
placeholder="Titolo immagine"
/>
</label>
<label class="form-field">
<span>Alt text</span>
<span>
Alt text ({{
mediaLanguageLabels[
getFormState(section.usageKey).activeLanguage
]
}})
</span>
<input
type="text"
[(ngModel)]="getFormState(section.usageKey).altText"
[(ngModel)]="
getActiveTranslation(section.usageKey).altText
"
placeholder="Testo alternativo"
/>
</label>
@@ -207,7 +248,14 @@
<div class="media-copy">
<div class="media-copy-top">
<div>
<h6>{{ item.title || item.originalFilename }}</h6>
<h6>
{{
getItemTranslation(
item,
getFormState(section.usageKey).activeLanguage
).title || item.originalFilename
}}
</h6>
<p class="meta">
{{ item.originalFilename }} | asset
{{ item.mediaAssetId }}
@@ -218,7 +266,20 @@
>
</div>
<p class="meta">Alt: {{ item.altText || "-" }}</p>
<p class="meta">
Alt
{{
mediaLanguageLabels[
getFormState(section.usageKey).activeLanguage
]
}}:
{{
getItemTranslation(
item,
getFormState(section.usageKey).activeLanguage
).altText || "-"
}}
</p>
<p class="meta">
Sort order: {{ item.sortOrder }} | Inserita:
{{ item.createdAt | date: "short" }}