Skip to content

Commit

Permalink
fix(sanity): diff view i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
juice49 committed Jan 23, 2025
1 parent 356260c commit b2e1a7d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ const VersionMenuItem: ComponentType<VersionMenuItemProps> = ({
isSelected,
documentId,
}) => {
const {t} = useTranslation(structureLocaleNamespace)
const {t: tCore} = useTranslation()
const {t: tStructure} = useTranslation(structureLocaleNamespace)

const onClick = useCallback(() => {
if (type === 'draft') {
Expand All @@ -267,7 +268,7 @@ const VersionMenuItem: ComponentType<VersionMenuItemProps> = ({
<ReleaseAvatar padding={2} tone={tone} />
<Box paddingY={2}>
<Text size={1} weight="medium">
{t(['compare-versions.status', type].join('.'))}
{tStructure(['compare-versions.status', type].join('.'))}
</Text>
</Box>
</Flex>
Expand All @@ -287,7 +288,7 @@ const VersionMenuItem: ComponentType<VersionMenuItemProps> = ({
</Text>
{['asap', 'undecided'].includes(release.metadata.releaseType) && (
<Text muted size={1}>
{t(`release.type.${release.metadata.releaseType}`)}
{tCore(`release.type.${release.metadata.releaseType}`)}
</Text>
)}
{release.metadata.releaseType === 'scheduled' && (
Expand Down

0 comments on commit b2e1a7d

Please sign in to comment.