diff --git a/packages/teleport-plugin-html-base-component/src/node-handlers.ts b/packages/teleport-plugin-html-base-component/src/node-handlers.ts index dd7fc0e72..e8e58c2fe 100644 --- a/packages/teleport-plugin-html-base-component/src/node-handlers.ts +++ b/packages/teleport-plugin-html-base-component/src/node-handlers.ts @@ -501,6 +501,13 @@ const generateDynamicNode: NodeToHTML => { + if (node.content.referenceType === 'locale') { + const localeTag = HASTBuilders.createHTMLNode('span') + const commentNode = HASTBuilders.createComment(`Content for locale ${node.content.id}`) + HASTUtils.addChildNode(localeTag, commentNode) + return localeTag + } + const usedReferenceValue = getValueFromReference( node.content.id, node.content.referenceType === 'prop' ? propDefinitions : stateDefinitions diff --git a/packages/teleport-project-generator-next/__tests__/end2end/__snapshots__/index.ts.snap b/packages/teleport-project-generator-next/__tests__/end2end/__snapshots__/index.ts.snap index b11d99f38..35052416d 100644 --- a/packages/teleport-project-generator-next/__tests__/end2end/__snapshots__/index.ts.snap +++ b/packages/teleport-project-generator-next/__tests__/end2end/__snapshots__/index.ts.snap @@ -7,11 +7,14 @@ Object { "content": "import React, { useEffect } from 'react' import Head from 'next/head' +import { useTranslations } from 'next-intl' + import Header from '../components/header' import Hero from '../components/hero' import Footer from '../components/footer' const Home = (props) => { + const translate = useTranslations() useEffect(() => import('@lottiefiles/lottie-player'), []) return ( <> @@ -36,6 +39,18 @@ const Home = (props) => { } > + +

+ +