-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve translations coverage on editor.
- Loading branch information
Showing
21 changed files
with
188 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
apps/builder/src/features/blocks/bubbles/audio/components/AudioBubbleNode.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
import { Text } from '@chakra-ui/react' | ||
import { AudioBubbleContent } from '@typebot.io/schemas' | ||
import { isDefined } from '@typebot.io/lib' | ||
import { I18nFunction } from '@/locales' | ||
|
||
type Props = { | ||
scopedT: I18nFunction | ||
url: AudioBubbleContent['url'] | ||
} | ||
|
||
export const AudioBubbleNode = ({ url }: Props) => | ||
export const AudioBubbleNode = ({ scopedT, url }: Props) => | ||
isDefined(url) ? ( | ||
<audio src={url} controls /> | ||
) : ( | ||
<Text color={'gray.500'}>Click to edit...</Text> | ||
<Text color={'gray.500'}>{scopedT('bubbles.audio.node.clickToEdit.text')}</Text> | ||
) |
12 changes: 9 additions & 3 deletions
12
apps/builder/src/features/blocks/bubbles/embed/components/EmbedBubbleContent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
import { Text } from '@chakra-ui/react' | ||
import { EmbedBubbleBlock } from '@typebot.io/schemas' | ||
import { I18nFunction } from '@/locales' | ||
|
||
export const EmbedBubbleContent = ({ block }: { block: EmbedBubbleBlock }) => { | ||
if (!block.content?.url) return <Text color="gray.500">Click to edit...</Text> | ||
return <Text>Show embed</Text> | ||
type Props = { | ||
scopedT: I18nFunction | ||
block: EmbedBubbleBlock | ||
} | ||
|
||
export const EmbedBubbleContent = ({ scopedT, block }: Props) => { | ||
if (!block.content?.url) return <Text color="gray.500">{scopedT('bubbles.embed.node.clickToEdit.text')}</Text> | ||
return <Text>{scopedT('node.show.text')}</Text> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 8 additions & 2 deletions
10
apps/builder/src/features/blocks/bubbles/image/components/ImageBubbleContent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 8 additions & 2 deletions
10
apps/builder/src/features/blocks/bubbles/video/components/VideoBubbleContent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.