apply i18 to FAQ
This commit is contained in:
parent
a1d66ce17d
commit
6e47b59071
3 changed files with 59 additions and 29 deletions
|
|
@ -32,5 +32,25 @@ export default {
|
||||||
poweredBy: 'Powered by',
|
poweredBy: 'Powered by',
|
||||||
donate: 'Donate',
|
donate: 'Donate',
|
||||||
},
|
},
|
||||||
|
faq: {
|
||||||
|
title: 'Frequently Asked Questions',
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
question: "What is Bitcoin Lightning?",
|
||||||
|
answer: "Bitcoin Lightning is a layer 2 payment protocol that operates on top of the Bitcoin blockchain. It enables instant, low-cost transactions between participating nodes, making it ideal for everyday purchases."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question: "How do I pay with Lightning?",
|
||||||
|
answer: "To pay with Lightning, you'll need a Lightning-enabled Bitcoin wallet. When making a purchase, simply scan the merchant's QR code with your wallet and confirm the payment. The transaction is nearly instant!"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question: "Is Lightning safe to use?",
|
||||||
|
answer: "Yes, Lightning is secure as it inherits Bitcoin's security model. While it operates differently from base-layer Bitcoin transactions, it maintains high security standards through smart contract technology."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question: "How can I list my business?",
|
||||||
|
answer: "If you're a business accepting Lightning payments and would like to be listed in our directory, please contact us through our submission form [coming soon]."
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -32,5 +32,25 @@ export default {
|
||||||
poweredBy: 'Alimentado por',
|
poweredBy: 'Alimentado por',
|
||||||
donate: 'Donar',
|
donate: 'Donar',
|
||||||
},
|
},
|
||||||
|
faq: {
|
||||||
|
title: 'Preguntas Frecuentes',
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
question: "¿Qué es Bitcoin Lightning?",
|
||||||
|
answer: "Bitcoin Lightning es un protocolo de pago de capa 2 que opera sobre la blockchain de Bitcoin. Permite transacciones instantáneas y de bajo costo entre nodos participantes, haciéndolo ideal para compras cotidianas."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question: "¿Cómo pago con Lightning?",
|
||||||
|
answer: "Para pagar con Lightning, necesitarás una billetera Bitcoin habilitada para Lightning. Al realizar una compra, simplemente escanea el código QR del comerciante con tu billetera y confirma el pago. ¡La transacción es casi instantánea!"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question: "¿Es seguro usar Lightning?",
|
||||||
|
answer: "Sí, Lightning es seguro ya que hereda el modelo de seguridad de Bitcoin. Si bien opera de manera diferente a las transacciones de capa base de Bitcoin, mantiene altos estándares de seguridad a través de la tecnología de contratos inteligentes."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question: "¿Cómo puedo listar mi negocio?",
|
||||||
|
answer: "Si eres un negocio que acepta pagos Lightning y te gustaría aparecer en nuestro directorio, contáctanos a través de nuestro formulario de envío [próximamente]."
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { computed } from 'vue'
|
||||||
|
import { useI18n } from 'vue-i18n'
|
||||||
import {
|
import {
|
||||||
Accordion,
|
Accordion,
|
||||||
AccordionContent,
|
AccordionContent,
|
||||||
|
|
@ -7,50 +8,39 @@ import {
|
||||||
AccordionTrigger,
|
AccordionTrigger,
|
||||||
} from '@/components/ui/accordion'
|
} from '@/components/ui/accordion'
|
||||||
|
|
||||||
interface FAQ {
|
const { t, locale } = useI18n()
|
||||||
question: string
|
|
||||||
answer: string
|
|
||||||
}
|
|
||||||
|
|
||||||
const faqs = ref<FAQ[]>([
|
const faqs = computed(() => [
|
||||||
{
|
{
|
||||||
question: "What is Bitcoin Lightning?",
|
question: t('faq.items.0.question'),
|
||||||
answer: "Bitcoin Lightning is a layer 2 payment protocol that operates on top of the Bitcoin blockchain. It enables instant, low-cost transactions between participating nodes, making it ideal for everyday purchases."
|
answer: t('faq.items.0.answer')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
question: "How do I pay with Lightning?",
|
question: t('faq.items.1.question'),
|
||||||
answer: "To pay with Lightning, you'll need a Lightning-enabled Bitcoin wallet. When making a purchase, simply scan the merchant's QR code with your wallet and confirm the payment. The transaction is nearly instant!"
|
answer: t('faq.items.1.answer')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
question: "Is Lightning safe to use?",
|
question: t('faq.items.2.question'),
|
||||||
answer: "Yes, Lightning is secure as it inherits Bitcoin's security model. While it operates differently from base-layer Bitcoin transactions, it maintains high security standards through smart contract technology."
|
answer: t('faq.items.2.answer')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
question: "How can I list my business?",
|
question: t('faq.items.3.question'),
|
||||||
answer: "If you're a business accepting Lightning payments and would like to be listed in our directory, please contact us through our submission form [coming soon]."
|
answer: t('faq.items.3.answer')
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="container mx-auto px-4 py-8">
|
<div class="container mx-auto px-4 py-8">
|
||||||
<div class="max-w-4xl mx-auto">
|
<div class="max-w-3xl mx-auto">
|
||||||
<h1 class="text-3xl font-bold tracking-tight sm:text-4xl mb-8">
|
<h1 class="text-3xl font-bold text-center mb-8">
|
||||||
Frequently Asked Questions
|
{{ t('faq.title') }}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<Accordion type="single" collapsible class="w-full">
|
<Accordion type="single" collapsible>
|
||||||
<AccordionItem
|
<AccordionItem v-for="(faq, index) in faqs" :key="index" :value="'item-' + index">
|
||||||
v-for="(faq, index) in faqs"
|
<AccordionTrigger>{{ faq.question }}</AccordionTrigger>
|
||||||
:key="index"
|
<AccordionContent>{{ faq.answer }}</AccordionContent>
|
||||||
:value="`item-${index}`"
|
|
||||||
>
|
|
||||||
<AccordionTrigger class="text-left">
|
|
||||||
{{ faq.question }}
|
|
||||||
</AccordionTrigger>
|
|
||||||
<AccordionContent>
|
|
||||||
{{ faq.answer }}
|
|
||||||
</AccordionContent>
|
|
||||||
</AccordionItem>
|
</AccordionItem>
|
||||||
</Accordion>
|
</Accordion>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue