Skip to content

Commit

Permalink
feat(TemplatesModal): translate templates name & description to pt-BR
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielgpavao committed Dec 22, 2023
1 parent f4a0935 commit 2be9dbf
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 10 deletions.
34 changes: 34 additions & 0 deletions apps/builder/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,40 @@
"templates.modal.menuHeading.other": "Other",
"templates.modal.menuHeading.product": "Product",
"templates.modal.useTemplateButton.label": "Use this template",
"templates.modal.marketing.InsuranceOffer.description": "You are a dog insurance company. This bot allows you to collect information about the dog and provide a quote.",
"templates.modal.marketing.InsuranceOffer.name": "Insurance Offer",
"templates.modal.marketing.LeadGeneration.description": "You are a marketing agency and this bot allows you generate new leads interested in your services.",
"templates.modal.marketing.LeadGeneration.name": "Lead Generation",
"templates.modal.marketing.LeadGenwithAI.description": "You are a marketing agency and this bot allows you generate new leads interested in your services. An AI block is used to dig deeper into the user needs.",
"templates.modal.marketing.LeadGenwithAI.name": "Lead Gen with AI",
"templates.modal.marketing.LeadMagnet.description": "Provide a free content to your prospects in exchange for their contact information.",
"templates.modal.marketing.LeadMagnet.name": "Lead Magnet",
"templates.modal.marketing.LeadScoring.description": "Compute a score alongside lead qualification questions to rank your new prospects.",
"templates.modal.marketing.LeadScoring.name": "Lead Scoring",
"templates.modal.marketing.ProductRecommendation.description": "Näak is a company that sells energy bars, hydration mix and recovery prodcuts. This bot helps a visitor choosing the right product. It helps you qualify your lead and provide a personalized recommendation.",
"templates.modal.marketing.ProductRecommendation.name": "Product Recommendation",
"templates.modal.marketing.Quiz.description": "A fun quiz to engage with your users and collect their emails.",
"templates.modal.marketing.Quiz.name": "Quiz",
"templates.modal.other.AudioChatGPT.description": "An audio AI bot that uses the OpenAI block to generate responses based on the user input.",
"templates.modal.other.AudioChatGPT.name": "Audio ChatGPT",
"templates.modal.other.BasicChatGPT.description": "A bot that uses the ChatGPT model to generate responses based on the user input.",
"templates.modal.other.BasicChatGPT.name": "Basic ChatGPT",
"templates.modal.other.ChatGPTPersonas.description": "A bot that uses the ChatGPT model to generate responses based on the user input and the selected persona.",
"templates.modal.other.ChatGPTPersonas.name": "ChatGPT Personas",
"templates.modal.other.DigitalProductPayment.description": "A bot that allows you to sell digital products (ebooks, courses, etc.) and only provide the content after the payment is confirmed.",
"templates.modal.other.DigitalProductPayment.name": "Digital Product Payment",
"templates.modal.other.MovieRecommendation.description": "A bot that recommends movies based on the user preferences.",
"templates.modal.other.MovieRecommendation.name": "Movie Recommendation",
"templates.modal.other.OpenAIConditions.description": "This is an example of how you can use the OpenAI block to take smart decisions based on the user input and redirect the conversation to the right path.",
"templates.modal.other.OpenAIConditions.name": "OpenAI Conditions",
"templates.modal.product.CustomerSupport.description": "A bot whose job is to collect user feedback: questions, bugs and feature requests.",
"templates.modal.product.CustomerSupport.name": "Customer Support",
"templates.modal.product.FAQ.description": "A bot that answers frequently asked questions about your product or service.",
"templates.modal.product.FAQ.name": "FAQ",
"templates.modal.product.NPSSurvey.description": "A simple NPS survey to measure your customer satisfaction and improve your product.",
"templates.modal.product.NPSSurvey.name": "NPS Survey",
"templates.modal.product.UserOnboarding.description": "A bot that asks for new user information before he start using your product.",
"templates.modal.product.UserOnboarding.name": "User Onboarding",
"upgrade": "Upgrade",
"video.aspectRatioInput.label": "Aspect ratio",
"video.aspectRatioInput.moreInfoTooltip": "Example: \"16/9\" or \"9/16\"",
Expand Down
34 changes: 34 additions & 0 deletions apps/builder/public/locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,40 @@
"templates.modal.menuHeading.other": "Outros",
"templates.modal.menuHeading.product": "Produto",
"templates.modal.useTemplateButton.label": "Usar esse modelo",
"templates.modal.marketing.InsuranceOffer.description": "Você é uma seguradora para cães. Este bot permite coletar informações sobre o cachorro e fornecer um orçamento.",
"templates.modal.marketing.InsuranceOffer.name": "Oferta de Seguro",
"templates.modal.marketing.LeadGeneration.description": "Você é uma agência de marketing e este bot lhe permite gerar novos leads interessados em seus serviços.",
"templates.modal.marketing.LeadGeneration.name": "Geração de Leads",
"templates.modal.marketing.LeadGenwithAI.description": "Você é uma agência de marketing e este bot permite gerar novos leads interessados em seus serviços. Um bloco de IA é usado para aprofundar nas necessidades do usuário.",
"templates.modal.marketing.LeadGenwithAI.name": "Geração de Leads com IA",
"templates.modal.marketing.LeadMagnet.description": "Forneça conteúdo gratuito aos seus clientes potenciais em troca de suas informações de contato.",
"templates.modal.marketing.LeadMagnet.name": "Imã de Leads",
"templates.modal.marketing.LeadScoring.description": "Calcule uma pontuação junto com perguntas de qualificação de leads para classificar seus novos clientes potenciais.",
"templates.modal.marketing.LeadScoring.name": "Pontuação de Leads",
"templates.modal.marketing.ProductRecommendation.description": "A Näak é uma empresa que comercializa barras energéticas, mix de hidratação e produtos de recuperação. Este bot ajuda o visitante a escolher o produto certo. Ajuda você a qualificar seu lead e fornecer uma recomendação personalizada.",
"templates.modal.marketing.ProductRecommendation.name": "Recomendação de Produto",
"templates.modal.marketing.Quiz.description": "Um teste divertido para interagir com seus usuários e coletar seus e-mails.",
"templates.modal.marketing.Quiz.name": "Quiz",
"templates.modal.other.AudioChatGPT.description": "Um bot de IA de áudio que usa o bloco da OpenAI para gerar respostas com base nas respostas do usuário.",
"templates.modal.other.AudioChatGPT.name": "ChatGPT em Áudio",
"templates.modal.other.BasicChatGPT.description": "Um bot que usa o modelo ChatGPT para gerar respostas com base nas respostas do usuário.",
"templates.modal.other.BasicChatGPT.name": "ChatGPT Básico",
"templates.modal.other.ChatGPTPersonas.description": "Um bot que usa o modelo ChatGPT para gerar respostas com base nas respostas do usuário e na persona selecionada.",
"templates.modal.other.ChatGPTPersonas.name": "ChatGPT Personas",
"templates.modal.other.DigitalProductPayment.description": "Um bot que permite vender produtos digitais (ebooks, cursos, etc.) e só disponibilizar o conteúdo após a confirmação do pagamento.",
"templates.modal.other.DigitalProductPayment.name": "Pagamento de Produtos Digitais",
"templates.modal.other.MovieRecommendation.description": "Um bot que recomenda filmes com base nas preferências do usuário.",
"templates.modal.other.MovieRecommendation.name": "Recomendação de Filmes",
"templates.modal.other.OpenAIConditions.description": "Este é um exemplo de como você pode usar o bloco OpenAI para tomar decisões inteligentes com base nas respostas do usuário e redirecionar a conversa para o caminho certo.",
"templates.modal.other.OpenAIConditions.name": "Condições OpenAI",
"templates.modal.product.CustomerSupport.description": "Um bot cujo trabalho é coletar feedback do usuário: perguntas, bugs e solicitações de funcionalidades.",
"templates.modal.product.CustomerSupport.name": "Suporte ao Cliente",
"templates.modal.product.FAQ.description": "Um bot que responde perguntas frequentes sobre seu produto ou serviço.",
"templates.modal.product.FAQ.name": "FAQ",
"templates.modal.product.NPSSurvey.description": "Uma pesquisa NPS simples para medir a satisfação do cliente e aprimorar seu produto.",
"templates.modal.product.NPSSurvey.name": "Pesquisa NPS",
"templates.modal.product.UserOnboarding.description": "Um bot que solicita informações de novos usuários antes de começar a usar seu produto.",
"templates.modal.product.UserOnboarding.name": "Onboarding de Usuário",
"upgrade": "Upgrade",
"video.aspectRatioInput.label": "Proporção",
"video.aspectRatioInput.moreInfoTooltip": "Exemplo: \"16/9\" ou \"9/16\"",
Expand Down
62 changes: 57 additions & 5 deletions apps/builder/src/features/templates/components/TemplatesModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,15 @@ export const TemplatesModal = ({
>
<HStack overflow="hidden" fontSize="sm" w="full">
<Text>{template.emoji}</Text>
<Text>{template.name}</Text>
<Text>
{t(
createTranslationKey(
template.name,
template.category
),
template.name
)}
</Text>
{template.isNew && (
<Tag colorScheme="orange" size="sm" flexShrink={0}>
{t('templates.modal.menuHeading.new.tag')}
Expand Down Expand Up @@ -148,7 +156,15 @@ export const TemplatesModal = ({
>
<HStack overflow="hidden" fontSize="sm" w="full">
<Text>{template.emoji}</Text>
<Text>{template.name}</Text>
<Text>
{t(
createTranslationKey(
template.name,
template.category
),
template.name
)}
</Text>
{template.isNew && (
<Tag colorScheme="orange" size="sm" flexShrink={0}>
{t('templates.modal.menuHeading.new.tag')}
Expand Down Expand Up @@ -184,7 +200,15 @@ export const TemplatesModal = ({
>
<HStack overflow="hidden" fontSize="sm" w="full">
<Text>{template.emoji}</Text>
<Text>{template.name}</Text>
<Text>
{t(
createTranslationKey(
template.name,
template.category
),
template.name
)}
</Text>
{template.isNew && (
<Tag colorScheme="orange" size="sm" flexShrink={0}>
{t('templates.modal.menuHeading.new.tag')}
Expand Down Expand Up @@ -225,9 +249,26 @@ export const TemplatesModal = ({
<Stack flex="1" spacing={4}>
<Heading fontSize="2xl">
{selectedTemplate.emoji}{' '}
<chakra.span ml="2">{selectedTemplate.name}</chakra.span>
<chakra.span ml="2">
{t(
createTranslationKey(
selectedTemplate.name,
selectedTemplate.category
),
selectedTemplate.name
)}
</chakra.span>
</Heading>
<Text>{selectedTemplate.description}</Text>
<Text>
{t(
createTranslationKey(
selectedTemplate.name,
selectedTemplate.category,
'description'
),
selectedTemplate.description
)}
</Text>
</Stack>
<Button
colorScheme="blue"
Expand All @@ -243,3 +284,14 @@ export const TemplatesModal = ({
</Modal>
)
}

const createTranslationKey = (
label: string,
category: 'marketing' | 'product' | undefined,
type?: 'name' | 'description'
) =>
'templates.modal.' +
(category ?? 'other') +
'.' +
label.replace(/\s/g, '') +
`.${type ?? 'name'}`
10 changes: 5 additions & 5 deletions apps/builder/src/features/templates/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ export const templates: TemplateProps[] = [
'Compute a score alongside lead qualification questions to rank your new prospects',
},
{
name: 'Lead magnet',
name: 'Lead Magnet',
emoji: '🧲',
fileName: 'lead-magnet.json',
category: 'marketing',
description:
'Provide a free content to your prospects in exchange for their contact information.',
},
{
name: 'Product recommendation',
name: 'Product Recommendation',
emoji: '🍫',
fileName: 'product-recommendation.json',
category: 'marketing',
Expand Down Expand Up @@ -103,7 +103,7 @@ export const templates: TemplateProps[] = [
isNew: true,
},
{
name: 'ChatGPT personas',
name: 'ChatGPT Personas',
emoji: '🎭',
fileName: 'chat-gpt-personas.json',
description:
Expand All @@ -118,15 +118,15 @@ export const templates: TemplateProps[] = [
'You are a marketing agency and this bot allows you generate new leads interested in your services. An AI block is used to dig deeper into the user needs.',
},
{
name: 'Insurance offer',
name: 'Insurance Offer',
emoji: '🐶',
fileName: 'dog-insurance-offer.json',
category: 'marketing',
description:
'You are a dog insurance company. This bot allows you to collect information about the dog and provide a quote.',
},
{
name: 'OpenAI conditions',
name: 'OpenAI Conditions',
emoji: '🧠',
fileName: 'openai-conditions.json',
isNew: true,
Expand Down

0 comments on commit 2be9dbf

Please sign in to comment.