@@ -40,13 +40,15 @@ import {
4040} from '@looker/components'
4141import { Link } from '@styled-icons/material-outlined'
4242import { EmbedUrl } from '@looker/embed-services'
43+ import { useTranslation } from '../utils'
4344import { useThemesStoreState , SelectTheme , useThemeActions } from '../Theme'
4445
4546interface QuickEmbedProps {
4647 onClose : ( ) => void
4748}
4849
4950export const QuickEmbed = ( { onClose } : QuickEmbedProps ) => {
51+ const { t } = useTranslation ( 'QuickEmbed' )
5052 const service = new EmbedUrl ( )
5153 const [ toggleValue , setToggle ] = useState ( false )
5254 const [ embedUrl , setEmbedUrl ] = useState < string > ( service . embedUrl ( false ) )
@@ -77,14 +79,16 @@ export const QuickEmbed = ({ onClose }: QuickEmbedProps) => {
7779 return (
7880 < Section padding = "large" >
7981 < Heading as = "h3" fontWeight = "medium" >
80- Get embed URL
82+ { t ( ' Get embed URL' ) }
8183 </ Heading >
8284
8385 < SpaceVertical pt = "medium" pb = "medium" gap = "xsmall" >
8486 { service . isThemable && (
8587 < >
8688 < Span fontWeight = "normal" fontSize = "xsmall" >
87- Apply theme to { service . contentType . toLocaleLowerCase ( ) } URL
89+ { t ( `Apply theme to contentType URL` , {
90+ contentType : service . contentType . toLocaleLowerCase ( ) ,
91+ } ) }
8892 </ Span >
8993 < SelectTheme />
9094 </ >
@@ -104,14 +108,14 @@ export const QuickEmbed = ({ onClose }: QuickEmbedProps) => {
104108
105109 < Space gap = "xxsmall" fontWeight = "normal" fontSize = "small" >
106110 < ToggleSwitch onChange = { handleToggle } on = { toggleValue } />
107- Include current params in URL
111+ { t ( ' Include current params in URL' ) }
108112 </ Space >
109113
110114 < Space mt = "large" between >
111115 < CopyToClipboard content = { embedUrl } >
112- < ButtonOutline iconBefore = { < Link /> } > Copy Link</ ButtonOutline >
116+ < ButtonOutline iconBefore = { < Link /> } > { t ( ' Copy Link' ) } </ ButtonOutline >
113117 </ CopyToClipboard >
114- < Button onClick = { onClose } > Cancel </ Button >
118+ < Button onClick = { onClose } > { t ( 'Close' ) } </ Button >
115119 </ Space >
116120 </ Section >
117121 )
0 commit comments