Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import React, { useMemo } from 'react'
import { ConfigProvider, theme } from 'antd'
import { useTranslation } from 'react-i18next'
import cn from 'classnames'
import { isEmpty, isNil, isUndefined } from 'lodash'
import { isEmptyValue } from '@Pimcore/utils/type-utils'
Expand Down Expand Up @@ -56,11 +57,12 @@ const groupIntoSections = (items: ILocalizedFieldDescriptor[]): ILocalizedSectio
export const LanguageComparisonContent = ({ layoutData, locales, editableLanguages, isAllowedToEdit }: ILanguageComparisonColumnProps): React.JSX.Element => {
const { styles } = useStyles()
const { token } = theme.useToken()
const { t } = useTranslation()

const renderSectionTitle = ({ breadcrumbTitle, hideSectionTitle }: { breadcrumbTitle: string, hideSectionTitle: boolean }): React.JSX.Element | null => {
if (isEmptyValue(breadcrumbTitle)) return null

const titleParts = breadcrumbTitle.split('/')
const titleParts = breadcrumbTitle.split('/').map(part => t(part))
Comment thread
jcPimcore marked this conversation as resolved.
const [firstTitlePart, ...remainingTitleParts] = titleParts
const secondTitlePart = remainingTitleParts.length > 0 ? ` | ${remainingTitleParts.join(' | ')}` : ''

Expand Down Expand Up @@ -180,7 +182,7 @@ export const LanguageComparisonContent = ({ layoutData, locales, editableLanguag
))}
</Flex>
)
}, [locales, sections])
}, [locales, sections, t])

return (
<ConfigProvider theme={ { components: { Form: { itemMarginBottom: token.marginXS } } } }>
Expand Down
Binary file not shown.
Loading