Skip to content

Commit

Permalink
fix(i18n): translatable shelf titles for hub pages
Browse files Browse the repository at this point in the history
  • Loading branch information
langemike authored Nov 18, 2024
1 parent 99d4658 commit a17b9b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ui-react/src/containers/ShelfList/ShelfList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const ShelfList = ({ rows }: Props) => {
const posterAspect = parseAspectRatio(playlist.cardImageAspectRatio || playlist.shelfImageAspectRatio);
const visibleTilesDelta = parseTilesDelta(posterAspect);

const translatedKey = custom?.[`title-${language}`];
const translatedKey = custom?.[`title-${language}`] || (playlist?.[`title-${language}`] as string);
const translatedTitle = translatedKey || title || playlist?.title;

const isHero = custom?.layoutType === SHELF_LAYOUT_TYPE.hero && index === 0;
Expand Down

0 comments on commit a17b9b6

Please sign in to comment.