Skip to content

Commit

Permalink
ECWID-116234 Implement alt-text support for all category images | Rep…
Browse files Browse the repository at this point in the history
…lace imageAlt proprety with alt
  • Loading branch information
ZimuZhengLightspeed committed Dec 29, 2023
1 parent 60e0b9c commit ee65fad
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fun FetchedCategory.toUpdated(): UpdatedCategory {
seoTitleTranslated = seoTitleTranslated,
seoDescription = seoDescription,
seoDescriptionTranslated = seoDescriptionTranslated,
imageAlt = imageAlt?.toUpdated()
alt = alt?.toUpdated()
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ data class UpdatedCategory(
val seoTitleTranslated: LocalizedValueMap? = null,
val seoDescription: String? = null,
val seoDescriptionTranslated: LocalizedValueMap? = null,
val imageAlt: Alt? = null
val alt: Alt? = null
) : ApiUpdatedDTO {

override fun getModifyKind() = ModifyKind.ReadWrite(FetchedCategory::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ data class FetchedCategory(
val seoTitleTranslated: LocalizedValueMap? = null,
val seoDescription: String? = null,
val seoDescriptionTranslated: LocalizedValueMap? = null,
val imageAlt: Alt? = null
val alt: Alt? = null
) : ApiFetchedDTO, ApiResultDTO {

override fun getModifyKind() = ModifyKind.ReadWrite(UpdatedCategory::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ val fetchedCategoryNullablePropertyRules: List<NullablePropertyRule<*, *>> = lis
AllowNullable(FetchedCategory::seoTitleTranslated),
AllowNullable(FetchedCategory::seoDescription),
AllowNullable(FetchedCategory::seoDescriptionTranslated),
AllowNullable(FetchedCategory::imageAlt),
AllowNullable(FetchedCategory::alt),
AllowNullable(FetchedCategory.Alt::main),
AllowNullable(FetchedCategory.Alt::translated)
)

0 comments on commit ee65fad

Please sign in to comment.