diff --git a/web/src/components/FAQ.jsx b/web/src/components/FAQ.jsx index c1ecc00..483c40b 100644 --- a/web/src/components/FAQ.jsx +++ b/web/src/components/FAQ.jsx @@ -1,40 +1,21 @@ import { useState } from "react"; +import { useI18n } from "../i18n"; import styles from "./FAQ.module.css"; -const items = [ - { - q: "What is TORQ?", - a: "TORQ is an event-driven predictive-maintenance pipeline. When a machine faults, the AI autonomously diagnoses the root cause, generates a trilingual work order, and dispatches the right technician \u2014 all in real time.", - }, - { - q: "How does the AI diagnosis work?", - a: "Hybrid search (dense + BM25 sparse + reranker) retrieves relevant manuals and past repairs. A reasoning LLM produces the diagnosis with grounded citations.", - }, - { - q: "What machines are supported?", - a: "Any machine. If your equipment sends digital alerts, TORQ can pick them up. If your machines are fully offline, operators can submit faults directly through the dashboard form or from any connected device.", - }, - { - q: "How do I integrate TORQ with my plant?", - a: "Four ways: (1) Use the dashboard form to report a fault manually. (2) Send fault data from your existing maintenance or ERP system. (3) Connect machines that already produce digital fault signals. (4) Run a small bridge on a device like a Raspberry Pi to connect older controllers — no special hardware required.", - }, - { - q: "Is my data secure?", - a: "TORQ runs on your infrastructure. LLM calls go to your endpoint. Vector DB can be self-hosted. No data leaves your network.", - }, - { - q: "What languages are supported?", - a: "English, French, and Arabic (trilingual work-order PDF). Dashboard and API in English.", - }, - { - q: "Is this production-ready?", - a: "Hackathon prototype demonstrating the architecture. Production deployment requires hardening, auth, and scalability testing.", - }, -]; - export default function FAQ({ dark }) { + const { t } = useI18n(); const [openIndex, setOpenIndex] = useState(null); + const items = [ + { q: t("faq.q1"), a: t("faq.a1") }, + { q: t("faq.q2"), a: t("faq.a2") }, + { q: t("faq.q3"), a: t("faq.a3") }, + { q: t("faq.q4"), a: t("faq.a4") }, + { q: t("faq.q5"), a: t("faq.a5") }, + { q: t("faq.q6"), a: t("faq.a6") }, + { q: t("faq.q7"), a: t("faq.a7") }, + ]; + return (
{items.map((item, i) => ( diff --git a/web/src/components/Footer.jsx b/web/src/components/Footer.jsx index 40f8d79..4b1a579 100644 --- a/web/src/components/Footer.jsx +++ b/web/src/components/Footer.jsx @@ -1,39 +1,41 @@ import { Link } from "react-router-dom"; import styles from "./Footer.module.css"; import FAQ from "./FAQ.jsx"; +import { useI18n } from "../i18n"; export default function Footer() { + const { t } = useI18n(); return ( diff --git a/web/src/components/Navbar.jsx b/web/src/components/Navbar.jsx index 9ba5f2b..e3bef99 100644 --- a/web/src/components/Navbar.jsx +++ b/web/src/components/Navbar.jsx @@ -10,7 +10,7 @@ const LANGS = [ ]; export default function Navbar() { - const { locale, changeLocale } = useI18n(); + const { locale, changeLocale, t } = useI18n(); return (