diff --git a/README.md b/README.md index 5f130fd..d4ecb29 100644 --- a/README.md +++ b/README.md @@ -13,4 +13,9 @@ Open [http://localhost:3000](http://localhost:3000) with your browser to see the #### Linting ```bash npm run lint +``` + +### Translation +``` +npm run build-intl ``` \ No newline at end of file diff --git a/components/Footer.tsx b/components/Footer.tsx index a0e8ec7..109a5cb 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -1,36 +1,13 @@ import { useEffect, useState } from 'react' -import type { Translation } from '@helpwave/hightide' -import { HelpwaveLogo, LanguageDialog, TextButton, ThemeDialog, useTranslation } from '@helpwave/hightide' +import { HelpwaveLogo, LanguageDialog, TextButton, ThemeDialog } from '@helpwave/hightide' import * as CookieConsent from 'vanilla-cookieconsent' import pluginConfig from '../utils/CookieConsentConfig' import FooterLinkGroup from './FooterLinkGroup' import 'vanilla-cookieconsent/dist/cookieconsent.css' import { Globe, SunIcon } from 'lucide-react' +import { useLandingPageTranslation } from '@/i18n/useLandingPageTranslation' type Categories = 'socials' | 'general' | 'products' | 'development' -type FooterTranslation = { [key in Categories]: string } & { - changeTheme: string, - changeLanguage: string, -} - -const defaultFooterTranslation: Translation = { - en: { - socials: 'socials', - general: 'general', - products: 'products', - development: 'development', - changeLanguage: 'Change Language', - changeTheme: 'Change Theme', - }, - de: { - socials: 'social', - general: 'allgemein', - products: 'produkte', - development: 'entwicklung', - changeLanguage: 'Sprache ändern', - changeTheme: 'Farbschema ändern', - } -} type LinkType = { name: string, link: string, openInCurrentTab?: boolean, onClick?: () => void } const linkGroups: Record = { @@ -93,7 +70,7 @@ const grouping: (Categories[])[] = [ const Footer = () => { const year = new Date().getFullYear() - const translation = useTranslation([defaultFooterTranslation], {}) + const translation = useLandingPageTranslation() const [isThemeDialogOpen, setIsThemeDialogOpen] = useState(false) const [isLanguageDialogOpen, setIsLanguageDialogOpen] = useState(false) diff --git a/components/Header.tsx b/components/Header.tsx index cbca536..b1e8f91 100644 --- a/components/Header.tsx +++ b/components/Header.tsx @@ -1,42 +1,11 @@ import Link from 'next/link' -import type { Translation } from '@helpwave/hightide' -import { HelpwaveLogo, MarkdownInterpreter, Navigation, useTranslation } from '@helpwave/hightide' +import { HelpwaveLogo, MarkdownInterpreter, Navigation } from '@helpwave/hightide' +import { useLandingPageTranslation } from '@/i18n/useLandingPageTranslation' const homeURL = '/' -type LinkNames = 'products' | 'mediquu' | 'support' | 'team' | 'invest' | 'tasks' | 'appzumdoc' | 'netzmanager' - -type HeaderTranslationType = { - contact: string, -} & { [key in LinkNames]: string } - -const defaultHeaderTranslation: Translation = { - en: { - products: 'Products', - mediquu: 'mediQuu', - team: 'Team', - contact: 'Contact us', - tasks: 'tasks', - support: 'Support', - invest: 'Invest', - appzumdoc: 'App Zum Doc', - netzmanager: 'mediQuu Netzmanager', - }, - de: { - products: 'Produkte', - mediquu: 'mediQuu', - team: 'Team', - contact: 'Kontakt', - tasks: 'tasks', - support: 'Hilfe', - invest: 'Investieren', - appzumdoc: 'App Zum Doc', - netzmanager: 'mediQuu Netzmanager', - } -} - const Header = () => { - const translation = useTranslation([defaultHeaderTranslation]) + const translation = useLandingPageTranslation() return (
diff --git a/components/NewsLetterForm.tsx b/components/NewsLetterForm.tsx index 41e4364..bfd79af 100644 --- a/components/NewsLetterForm.tsx +++ b/components/NewsLetterForm.tsx @@ -1,62 +1,10 @@ -import type { PropsForTranslation, Translation } from '@helpwave/hightide' -import { Input, LoadingButton, Select, SelectOption, useTranslation } from '@helpwave/hightide' +import { Input, LoadingButton, Select, SelectOption } from '@helpwave/hightide' import { useState } from 'react' +import { useLandingPageTranslation } from '@/i18n/useLandingPageTranslation' const industryList = ['investment', 'hospital', 'patientCare', 'research', 'development', 'press'] as const export type Industry = typeof industryList[number] -type NewsLetterFormTranslation = { - title: string, - subtitle: string, - firstname: string, - lastname: string, - email: string, - company: string, - industry: string, - callToAction: string, - select: string, - thankYou: string, -} & Record - -const defaultNewsLetterFormTranslation: Translation = { - en: { - title: 'Stay Connected', - subtitle: 'Become part of our vision and never miss updates or releases', - firstname: 'Firstname', - lastname: 'Lastname', - email: 'Email', - company: 'Company', - industry: 'Industry', - callToAction: 'Stay In the Loop', - investment: 'Investment', - hospital: 'Hospital', - patientCare: 'Patient Care', - research: 'Research', - development: 'Development', - press: 'Press', - select: 'Select', - thankYou: 'Thank you. We will keep you up to date!' - }, - de: { - title: 'Bleib Informiert', - subtitle: 'Werde Teil unserer Vision and verpasse keine Updates oder Veröffentlichungen', - firstname: 'Vorname', - lastname: 'Nachname', - email: 'Email', - company: 'Firma', - industry: 'Industry', - callToAction: 'Bleib informiert', - investment: 'Investment', - hospital: 'Krankenhaus', - patientCare: 'Patientenversorgung', - research: 'Wissenschaft', - development: 'Entwicklung', - press: 'Presse', - select: 'Auswählen', - thankYou: 'Danke. Wir werden dich auf dem Laufenden halten!' - } -} - export type NewsLetterFormType = { firstname: string, lastname: string, @@ -70,15 +18,14 @@ export type NewsLetterFormProps = Partial & { } export const NewsLetterForm = ({ - overwriteTranslation, firstname = '', lastname = '', email = '', company = '', industry, onSubmit = () => Promise.resolve(), - }: PropsForTranslation) => { - const translation = useTranslation([defaultNewsLetterFormTranslation], overwriteTranslation) + }: NewsLetterFormProps) => { + const translation = useLandingPageTranslation() const [isLoading, setLoading] = useState(false) const [showThankYouMessage, setShowThankYouMessage] = useState(false) const [formState, setFormState] = useState({ @@ -92,8 +39,8 @@ export const NewsLetterForm = ({ return (
- {translation('title')} - {translation('subtitle')} + {translation('titleNewsLetterForm')} + {translation('subtitleNewsLetterForm')}
{ - const { language } = useLanguage() + const { locale } = useLocale() const linkURL = { - de: 'https://apps.apple.com/de/app/helpwave-tasks/id6472594365?itsct=apps_box_badge&itscg=30200', - en: 'https://apps.apple.com/en/app/helpwave-tasks/id6472594365?itsct=apps_box_badge&itscg=30200' - }[language] + 'de-DE': 'https://apps.apple.com/de/app/helpwave-tasks/id6472594365?itsct=apps_box_badge&itscg=30200', + 'en-US': 'https://apps.apple.com/en/app/helpwave-tasks/id6472594365?itsct=apps_box_badge&itscg=30200' + }[locale] const alt = { - de: 'Jetzt bei Google Play', - en: 'Download on the App Store' - }[language] + 'de-DE': 'Jetzt bei Google Play', + 'en-US': 'Download on the App Store' + }[locale] const imageURL = { - de: 'https://tools.applemediaservices.com/api/badges/download-on-the-app-store/black/de-de?size=250x83&releaseDate=1702857600', - en: 'https://tools.applemediaservices.com/api/badges/download-on-the-app-store/black/en-us?size=250x83&releaseDate=1702857600' - }[language] + 'de-DE': 'https://tools.applemediaservices.com/api/badges/download-on-the-app-store/black/de-de?size=250x83&releaseDate=1702857600', + 'en-US': 'https://tools.applemediaservices.com/api/badges/download-on-the-app-store/black/en-us?size=250x83&releaseDate=1702857600' + }[locale] return ( diff --git a/components/TasksPlaystoreBadge.tsx b/components/TasksPlaystoreBadge.tsx index 49153a2..4b661f8 100644 --- a/components/TasksPlaystoreBadge.tsx +++ b/components/TasksPlaystoreBadge.tsx @@ -1,4 +1,4 @@ -import { useLanguage } from '@helpwave/hightide' +import { useLocale } from '@helpwave/hightide' import Image from 'next/image' import Link from 'next/link' @@ -9,21 +9,21 @@ import Link from 'next/link' * */ export const TasksPlaystoreBadge = () => { - const { language } = useLanguage() + const { locale } = useLocale() const linkURL = { - de: 'https://play.google.com/store/apps/details?id=de.helpwave.tasks&pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1', - en: 'https://play.google.com/store/apps/details?id=de.helpwave.tasks&pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1' - }[language] + 'de-DE': 'https://play.google.com/store/apps/details?id=de.helpwave.tasks&pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1', + 'en-US': 'https://play.google.com/store/apps/details?id=de.helpwave.tasks&pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1' + }[locale] const alt = { - de: 'Jetzt bei Google Play', - en: 'Get it on Google Play' - }[language] + 'de-DE': 'Jetzt bei Google Play', + 'en-US': 'Get it on Google Play' + }[locale] const imageURL = { - de: '/images/google_play_badge_german.png', - en: '/images/google_play_badge_english.png' - }[language] + 'de-DE': '/images/google_play_badge_german.png', + 'en-US': '/images/google_play_badge_english.png' + }[locale] return ( {alt} diff --git a/components/TextImage.tsx b/components/TextImage.tsx index f518c00..7e967d6 100644 --- a/components/TextImage.tsx +++ b/components/TextImage.tsx @@ -1,11 +1,9 @@ -import type { FormTranslationType, PropsForTranslation } from '@helpwave/hightide' -import { formTranslation, SolidButton, useTranslation } from '@helpwave/hightide' +import { SolidButton } from '@helpwave/hightide' import { clsx } from 'clsx' +import { useLandingPageTranslation } from '@/i18n/useLandingPageTranslation' type TextImageColor = 'primary' | 'secondary' | 'dark' -type TextImageTranslation = FormTranslationType - export type TextImageProps = { title: string, description: string, @@ -22,7 +20,6 @@ export type TextImageProps = { * A Component for layering a Text upon an image */ export const TextImage = ({ - overwriteTranslation, title, description, imageUrl, @@ -32,8 +29,8 @@ export const TextImage = ({ contentClassName = '', className = '', disableMoreClick = true, - }: PropsForTranslation) => { - const translation = useTranslation([formTranslation], overwriteTranslation) + }: TextImageProps) => { + const translation = useLandingPageTranslation() const chipColorMapping: Record = { primary: 'text-text-image-primary-background bg-text-image-primary-text', diff --git a/components/sections/landing/MarketStatsSection.tsx b/components/sections/landing/MarketStatsSection.tsx index 7fddc2a..fa88642 100644 --- a/components/sections/landing/MarketStatsSection.tsx +++ b/components/sections/landing/MarketStatsSection.tsx @@ -1,6 +1,4 @@ -import type { PropsForTranslation } from '@helpwave/hightide' -import { useTranslation } from '@helpwave/hightide' -import type { Translation } from '@helpwave/hightide' +import { useLandingPageTranslation } from '@/i18n/useLandingPageTranslation' import type { PropsWithChildren } from 'react' import Image from 'next/image' import { SectionBase } from '@/components/sections/SectionBase' @@ -12,57 +10,32 @@ type MarketStatsItemProps = PropsWithChildren<{ const MarketStatsItem = ({ children, stat, title }: MarketStatsItemProps) => { return ( -
+
{children} {stat} -

{title}

+

{title}

) } -type MarketStatsSectionTranslation = { - germanyHealthcareSystem: string, - marketPotential: string, - hospitals: string, - healthcareWorkers: string, - gdp: string, -} - -const defaultExpansionTranslation: Translation = { - en: { - germanyHealthcareSystem: 'Germany\'s Healthcare System', - marketPotential: 'Market Potential', - hospitals: 'hospitals', - healthcareWorkers: 'healthcare workers', - gdp: 'of GDP' - }, - de: { - germanyHealthcareSystem: 'Deutsches Gesundheitssystem', - marketPotential: 'Markt Potential', - hospitals: 'Krankenhäuser', - healthcareWorkers: 'Gesundheitspersonal', - gdp: 'des BIP' - } -} - -const MarketStatsSection = ({ overwriteTranslation }: PropsForTranslation) => { - const translation = useTranslation([defaultExpansionTranslation], overwriteTranslation) +const MarketStatsSection = () => { + const translation = useLandingPageTranslation() return ( - -

{translation('germanyHealthcareSystem')}

- {translation('marketPotential')} -
- + +

{translation('section.market.germanyHealthcareSystem')}

+ {translation('section.market.marketPotential')} +
+ {/* Image needs attribution to https://www.flaticon.com/free-icon/hospital_3809392?term=hospital&page=1&position=8&origin=search&related_id=3809392 */} - + {/* Image needs attribution to https://www.flaticon.com/free-icon/hospital_3809392?term=hospital&page=1&position=8&origin=search&related_id=3809392 */} - + {/* Image needs attribution to https://www.freepik.com/icon/donut-chart_483638 */} diff --git a/components/sections/landing/PartnerSection.tsx b/components/sections/landing/PartnerSection.tsx index 8a58a52..c3f6bd0 100644 --- a/components/sections/landing/PartnerSection.tsx +++ b/components/sections/landing/PartnerSection.tsx @@ -1,22 +1,8 @@ -import type { Translation } from '@helpwave/hightide' import { Carousel } from '@helpwave/hightide' -import { useTranslation } from '@helpwave/hightide' +import { useLandingPageTranslation } from '@/i18n/useLandingPageTranslation' import { SectionBase } from '@/components/sections/SectionBase' import Image from 'next/image' -type PartnerSectionTranslation = { - title: string, -} - -const defaultPartnerSectionTranslation: Translation = { - en: { - title: 'Our partners' - }, - de: { - title: 'Unsere Partner' - } -} - export type Partner = { name: string, url: string, @@ -70,7 +56,7 @@ const images: Partner[] = [ ] const PartnerSection = () => { - const translation = useTranslation([defaultPartnerSectionTranslation]) + const translation = useLandingPageTranslation() return ( { outerClassName="px-0" >
-

{translation('title')}

+

{translation('titlePartnerSection')}

= { - en: { - title: 'helpwave - the Operating System for Hospitals', - description: 'empowering \\primary{medical heroes}, united in \\positive{technology}' - }, - de: { - title: 'helpwave - das Betriebssystem für Krankenhäuser', - description: 'Stärkung \\primary{medizinischer Helden}, vereint in \\positive{Technologie}' - } -} - -const StartSection = ({ overwriteTranslation }: PropsForTranslation) => { - const translation = useTranslation([defaultLandingPageTranslation], overwriteTranslation) +const StartSection = () => { + const translation = useLandingPageTranslation() return (
-

{translation('title')}

- +

{translation('titleLandingPage')}

+
= { - en: { - title: '\\primary{Digital excellence} in\\newline 3 simple steps', - description: 'Our approach is to implement more efficient and fun\\newline processes in a simple yet powerful way.', - step: 'Step', - step1Title: 'Define the mission', - step1Description: 'At helpwave we are committed to driving unprecedented innovation. We believe in improving patient care by developing cutting-edge software in all areas of patient care.', - step2Title: 'Apply Open Innovation', - step2Description: 'We believe in the open source approach to ensure the highest quality work product. This unique approach allows our dedicated development team to focus on translating your requirements into innovative software features.', - step3Title: 'Aim for disruption', - step3Description: 'Regulatory burdens and high entry barriers make it difficult for small companies to enter the market, leading to a lack of competition. helpwave is here to change that. We provide a platform that invites everyone to the table, not just only the big players.' - }, - de: { - title: '\\primary{Digitale Exelenz} in\\newline 3 Schritten', - description: 'Unser Ansatz ist es, effizientere Prozesse zu implementieren, die Spaß machen\\newline - und das auf einfache, aber wirkungsvolle Weise.', - step: 'Step', - step1Title: 'Definieren Sie die Mission', // TODO update - step1Description: 'Bei helpwave haben wir uns verpflichtet, beispiellose Innovationen voranzutreiben. Wir glauben an die Verbesserung der Patientenversorgung durch die Entwicklung innovativer Software in allen Bereichen der Patientenversorgung.', - step2Title: 'Offene Innovation anwenden', - step2Description: 'Wir glauben an den Open-Source-Ansatz, um die höchste Qualität des Arbeitsprodukts zu gewährleisten. Dieser einzigartige Ansatz ermöglicht es unserem engagierten Entwicklungsteam, sich auf die Umsetzung der Nutzer-Anforderungen in innovative Softwarefunktionen zu konzentrieren.', - step3Title: 'Disruption anstreben', - step3Description: 'Regulatorische Belastungen und hohe Eintrittsbarrieren erschweren den Markteintritt für kleine Unternehmen und führen zu mangelndem Wettbewerb. helpwave wird das ändern. Wir bieten eine Plattform, die jeden an den Tisch holt, nicht nur die großen Player.' - } -} +import { useLandingPageTranslation } from '@/i18n/useLandingPageTranslation' /** * A Section for showing steps need for Digitalization */ export const StepsToDigitalizationSection = () => { - const translation = useTranslation([defaultStepsToDigitalizationSectionTranslation]) + const translation = useLandingPageTranslation() const [modalValue, setModalValue] = useState<{ titleText: string, description: string }>() const [currentIndex, setCurrentIndex] = useState(0) const items: TextImageProps[] = [ { badge: `${translation('step')} #1`, - title: translation('step1Title'), - description: translation('step1Description'), + title: translation('section.digitalization.step1Title'), + description: translation('section.digitalization.step1Description'), // make attribution https://www.freepik.com/free-photo/doctors-looking-laptop-while-sitting_5480800.htm#fromView=search&page=1&position=38&uuid=4c39262c-c1b1-4f11-a15e-7446ad1974d3 imageUrl: 'https://cdn.helpwave.de/landing_page/doctors_discussing.jpg', color: 'primary', - onShowMoreClicked: () => setModalValue({ - titleText: translation('step1Title'), - description: translation('step1Description') - }) }, { badge: `${translation('step')} #2`, - title: translation('step2Title'), - description: translation('step2Description'), + title: translation('section.digitalization.step2Title'), + description: translation('section.digitalization.step2Description'), // make attribution https://www.freepik.com/free-photo/wide-shot-huge-tree-trunk-near-lake-surrounded-by-trees-blue-sky_7841618.htm#fromView=search&page=1&position=0&uuid=0752105f-3120-4f34-b3b7-48dd4a616223 imageUrl: 'https://cdn.helpwave.de/landing_page/lake.jpg', color: 'secondary', - onShowMoreClicked: () => setModalValue({ - titleText: translation('step2Title'), - description: translation('step2Description') - }) }, { badge: `${translation('step')} #3`, - title: translation('step3Title'), - description: translation('step3Description'), + title: translation('section.digitalization.step3Title'), + description: translation('section.digitalization.step3Description'), // make attribution https://www.freepik.com/free-vector/infographic-dashboard-element-set_6209714.htm#fromView=search&page=1&position=45&uuid=12db1ee2-bec5-40ce-a317-5d240ad56f12 imageUrl: 'https://cdn.helpwave.de/landing_page/dashboard.jpg', color: 'dark', - onShowMoreClicked: () => setModalValue({ - titleText: translation('step3Title'), - description: translation('step3Description') - }) }, ] return (
-

- +

+
{ { + setModalValue({ + titleText: value.title, + description: value.description + }) + }} className="h-full overflow-hidden" />
diff --git a/components/sections/landing/Story.tsx b/components/sections/landing/Story.tsx index 217886f..4028af0 100644 --- a/components/sections/landing/Story.tsx +++ b/components/sections/landing/Story.tsx @@ -1,6 +1,4 @@ -import type { Translation } from '@helpwave/hightide' -import type { PropsForTranslation } from '@helpwave/hightide' -import { useTranslation } from '@helpwave/hightide' +import { useLandingPageTranslation } from '@/i18n/useLandingPageTranslation' import { SectionBase } from '@/components/sections/SectionBase' type StoryBlockProps = { @@ -28,77 +26,24 @@ const StoryBlock = ({ ) } -type StoryTranslation = { - innovation: string, - innovationHeader: string, - innovationDescription: string, - disruption: string, - disruptionHeader: string, - disruptionDescription: string, - mission: string, - missionHeader: string, - missionDescription: string, -} - -const defaultStoryTranslation: Translation = { - en: { - innovation: 'Open Innovation', - innovationHeader: 'Providing healthcare solutions', - innovationDescription: "At helpwave, we're not just creating healthcare software; we're co-creating it with you, the " + - "end-users. By directly involving you in the process, we're elevating quality and nurturing stronger " + - 'development relationships. This unique approach allows our dedicated developers and engineers to laser-focus' + - 'on turning your requirements into innovative software features.', - disruption: 'Disruption', - disruptionHeader: 'Access for everyone', - disruptionDescription: 'When did you last feel like the software you\'re using is worth billions? We didn\'t think so. ' + - 'Regulatory overhead and high entry barriers are making it hard for small companies to enter the market which leads to a lack of competition.' + - 'helpwave is here to change that. We are providing a platform that invites everyone to the table, not just only the big players.', - mission: 'Our mission', - missionHeader: 'Passion for our vision', - missionDescription: 'Our commitment to maintaining the highest level of agility, much like what helpwave embodies, is driving ' + - 'unprecedented innovation across medical branches. Experience a healthcare software development like never ' + - 'before and join us on this transformative journey', - }, - de: { - innovation: 'Offene Innovation', - innovationHeader: 'Lösungen für das Gesundheitswesen', - innovationDescription: 'Bei helpwave entwickeln wir nicht einfach nur Software für das Gesundheitswesen, sondern wir ' + - 'entwickeln sie gemeinsam mit Ihnen, den Endnutzern. Indem wir Sie direkt in den Prozess einbeziehen, steigern wir ' + - 'die Qualität und fördern eine engere Entwicklungsbeziehung. Dieser einzigartige Ansatz ermöglicht es unseren ' + - 'engagierten Entwicklern und Ingenieuren, sich voll und ganz auf die Umsetzung Ihrer Anforderungen in innovative ' + - 'Softwarefunktionen zu konzentrieren.', - disruption: 'Disruption', - disruptionHeader: 'Zugriff für alle', - disruptionDescription: 'Wann hatten Sie zuletzt das Gefühl, dass die Software, die Sie verwenden, Milliarden wert ist? ' + - 'Wahrscheinlich nie. Regulatorischer Aufwand und hohe Eintrittsbarrieren machen es kleinen Unternehmen ' + - 'schwer, in den Markt einzutreten, was zu einem Mangel an Wettbewerb führt. helpwave ist hier, um das zu ändern. ' + - 'Wir bieten eine Plattform, die alle an einen Tisch bringt, nicht nur die großen Unternehmen.', - mission: 'Unsere Mission', - missionHeader: 'Passion für unsere Vision', - missionDescription: 'Unser Engagement für ein Höchstmaß an Agilität, wie es helpwave verkörpert, treibt beispiellose ' + - 'Innovationen in allen medizinischen Bereichen voran. Erleben Sie eine Softwareentwicklung im Gesundheitswesen ' + - 'wie nie zuvor und begleiten Sie uns auf dieser transformativen Reise.', - } -} - -const StorySection = ({ overwriteTranslation }: PropsForTranslation) => { - const translation = useTranslation([defaultStoryTranslation], overwriteTranslation) +const StorySection = () => { + const translation = useLandingPageTranslation() return ( ) diff --git a/components/sections/landing/TasksDemoSection.tsx b/components/sections/landing/TasksDemoSection.tsx index aef3648..429f2b8 100644 --- a/components/sections/landing/TasksDemoSection.tsx +++ b/components/sections/landing/TasksDemoSection.tsx @@ -1,47 +1,15 @@ -import type { Translation } from '@helpwave/hightide' import { HelpwaveLogo } from '@helpwave/hightide' -import { useTranslation } from '@helpwave/hightide' +import { useLandingPageTranslation } from '@/i18n/useLandingPageTranslation' import Link from 'next/link' import Image from 'next/image' import { SectionBase } from '@/components/sections/SectionBase' import { Check } from 'lucide-react' -type TasksDemoSectionTranslation = { - helpwaveTasks: string, - workflowManagement: string, - tryDemo: string, - feature1: string, - feature2: string, - feature3: string, - feature4: string, -} - -const defaultTasksDemoSectionTranslation: Translation = { - en: { - helpwaveTasks: 'helpwave tasks', - workflowManagement: 'The user-centered management tool, designed to simplify workflows and ensure high quality patient care.', - tryDemo: 'Try demo', - feature1: 'Patient lists: it’s time to move from papert to digital', - feature2: 'Care unit overview and tasks: keep track of what’s going on', - feature3: 'Task templates: standardize recurring tasks and workflows', - feature4: 'Properties: all relevant facts at a glance', - }, - de: { - helpwaveTasks: 'helpwave tasks', - workflowManagement: 'Das benutzerorientierte Management-Tool zur Vereinfachung von Arbeitsabläufen und zur Gewährleistung einer qualitativ hochwertigen Patientenversorgung.', - tryDemo: 'Demo testen', - feature1: 'Patientenlisten: Es ist an der Zeit, von Papier auf digital umzusteigen', - feature2: 'Stationsübersicht und tasks: Behalten Sie den Überblick', - feature3: 'Task Vorlagen: Standardisieren Sie wiederkehrende Aufgaben und Arbeitsabläufe', - feature4: 'Properties: alle relevanten Fakten auf einen Blick', - } -} - /** * A Section for showing helpwave tasks features and information about the demo */ export const TasksDemoSection = () => { - const translation = useTranslation([defaultTasksDemoSectionTranslation]) + const translation = useLandingPageTranslation() const demoURL = 'https://tasks.helpwave.de' const imageURL = 'https://cdn.helpwave.de/products/tasks_preview.png' @@ -56,9 +24,12 @@ export const TasksDemoSection = () => {

{translation('helpwaveTasks')}

- {translation('workflowManagement')} + {translation('section.demo.workflowManagement')}
- {[translation('feature1'), translation('feature2'), translation('feature3'), translation('feature4')] + {[translation('section.demo.feature1'), + translation('section.demo.feature2'), + translation('section.demo.feature3'), + translation('section.demo.feature4')] .map((feature, index) => (
{ href={demoURL} className="btn-md hover:brightness-[98%] bg-on-primary text-primary font-bold text-lg whitespace-nowrap" > - {translation('tryDemo')} + {translation('section.demo.tryDemo')}
= { - en: { - ourVision: 'Our Vision', - title: 'Support health care workers with data', - description: 'We are developing innovative software that enables healthcare professionals to provide the best possible medical care to their patients.', - }, - de: { - ourVision: 'Unsere Vision', - title: 'Datenbasierte Unterstützung im Gesundheitswesen', - description: 'Wir entwickeln innovative Software, die es Fachleuten im Gesundheitswesen ermöglicht, ihren Patienten die bestmögliche medizinische Versorgung zu bieten.', - } -} - -const StartSection = ({ overwriteTranslation }: PropsForTranslation) => { - const translation = useTranslation([defaultVisionSectionTranslation], overwriteTranslation) +const StartSection = () => { + const translation = useLandingPageTranslation() const imageURL = 'https://cdn.helpwave.de/landing_page/process.png' return (
-

{translation('ourVision')}

- {translation('title')} - +

{translation('section.vision.ourVision')}

+ {translation('section.vision.title')} +
diff --git a/components/sections/mediQuu/BrandInformationSection.tsx b/components/sections/mediQuu/BrandInformationSection.tsx index a76ebf4..6f84cec 100644 --- a/components/sections/mediQuu/BrandInformationSection.tsx +++ b/components/sections/mediQuu/BrandInformationSection.tsx @@ -1,58 +1,13 @@ -import type { Translation } from '@helpwave/hightide' import { HelpwaveLogo } from '@helpwave/hightide' -import { useTranslation } from '@helpwave/hightide' +import { useLandingPageTranslation } from '@/i18n/useLandingPageTranslation' import Image from 'next/image' import { SectionBase } from '@/components/sections/SectionBase' -type MediQuuBrandDescriptionTranslation = { - aboutMediQuuTitle: string, - aboutHelpwaveTitle: string, - aboutMediQuuDescription: string, - aboutHelpwaveDescription: string, - brandDescriptions: string, -} - -const defaultMediQuuBrandDescriptionTranslation: Translation = { - en: { - aboutMediQuuTitle: 'About mediQuu', - aboutHelpwaveTitle: 'About helpwave', - aboutMediQuuDescription: ` - Since 2015, we have been ensuring a comfortable and comprehensive networking of providers in the healthcare sector. - Our goal is a demand-oriented development of digital services to simplify the networking of all actors - and create new possibilities. In the future, we will pursue this path with the strong team of helpwave GmbH. - `, - aboutHelpwaveDescription: ` - As a dynamic technology company, helpwave is committed to the Open Innovation approach in healthcare, fostering new - innovators to facilitate the easy and effective creation of high-quality health products with strong interoperability. - With recent regulatory changes such as the introduction of the ePA and other directives impacting the outpatient sector, - helpwave positions itself with a process-oriented development strategy as the leading alternative in the healthcare market, - ensuring optimal digital healthcare delivery. - `, - brandDescriptions: 'Brand Descriptions', - }, - de: { - aboutMediQuuTitle: 'Über mediQuu', - aboutHelpwaveTitle: 'Über helpwave', - aboutMediQuuDescription: ` - Seit 2015 sorgen wir für eine komfortable und übergreifende Vernetzung von Versorgern und Leistungserbringern im Gesundheitswesen. - Unser Ziel ist stets eine bedarfsgerechte Entwicklung von digitalen Diensten, um die Vernetzung aller Aktuere zu vereinfachen - und neue Möglichkeiten zu schaffen. Zukünftig werden wir diesen Weg mit dem starken Team der helpwave GmbH beschreiten. - `, - aboutHelpwaveDescription: ` - Als dynamisches Technologieunternehmen haben wir uns dem Open Innovation-Ansatz im Gesundheitswesen verschrieben. - Durch die Förderung neuer Innovatoren ermöglichen wir die einfache und effektive Schöpfung hochwertiger Gesundheitsprodukte - mit hoher Interoperabilität. Angesichts der jüngsten regulatorischen Veränderungen wie der Einführung der ePA und anderer Vorschriften - mit Auswirkungen im ambulanten Bereich positioniert sich helpwave mit einer prozessorientierten Entwicklungsstrategie als - führende Alternative im Gesundheitsmarkt, um eine optimale digitale Versorgung zu gewährleisten. - `, - brandDescriptions: 'Marken Beschreibungen', - } -} export const BrandDescriptionsSection = () => { - const translation = useTranslation([defaultMediQuuBrandDescriptionTranslation]) + const translation = useLandingPageTranslation() return ( -

{translation('brandDescriptions')}

+

{translation('mediquu.brand.brandDescriptions')}

@@ -61,10 +16,10 @@ export const BrandDescriptionsSection = () => {
- {translation('aboutMediQuuTitle')} + {translation('mediquu.brand.aboutMediQuuTitle')} - {translation('aboutMediQuuDescription')} + {translation('mediquu.brand.aboutMediQuuDescription')}
@@ -77,10 +32,10 @@ export const BrandDescriptionsSection = () => {
- {translation('aboutHelpwaveTitle')} + {translation('mediquu.brand.aboutHelpwaveTitle')} - {translation('aboutHelpwaveDescription')} + {translation('mediquu.brand.aboutHelpwaveDescription')}
diff --git a/components/sections/mediQuu/ContactSection.tsx b/components/sections/mediQuu/ContactSection.tsx index 2e04406..54bc1bd 100644 --- a/components/sections/mediQuu/ContactSection.tsx +++ b/components/sections/mediQuu/ContactSection.tsx @@ -1,6 +1,4 @@ -import type { Translation } from '@helpwave/hightide' -import type { PropsForTranslation } from '@helpwave/hightide' -import { useTranslation } from '@helpwave/hightide' +import { useLandingPageTranslation } from '@/i18n/useLandingPageTranslation' import { useState } from 'react' import { validateEmail } from '@helpwave/hightide' import { Input } from '@helpwave/hightide' @@ -9,43 +7,6 @@ import { LoadingButton } from '@helpwave/hightide' import { submitHubSpotForm } from '@/utils/hubspot' import { SectionBase } from '@/components/sections/SectionBase' -type ContactSectionTranslation = { - contact: string, - contactDescription: string, - firstname: string, - lastname: string, - email: string, - message: string, - send: string, - thankYou: string, - error: string, -} - -const defaultContactSectionTranslation: Translation = { - en: { - contact: 'Contact', - contactDescription: 'We are available to answer any questions you may have at short notice.', - firstname: 'First Name', - lastname: 'Last Name', - email: 'E-Mail', - message: 'Your Message', - send: 'Send Message', - thankYou: 'Thanks for your message!', - error: 'There was an error sending the message, try again' - }, - de: { - contact: 'Kontakt', - contactDescription: 'Wir stehen Ihnen bei jeglichen Fragen kurzfristig zur Verfügung.', - firstname: 'Vorname', - lastname: 'Nachname', - email: 'E-Mail', - message: 'Ihre Nachricht', - send: 'Nachricht senden', - thankYou: 'Danke für deine Nachricht!', - error: 'Ein Fehler ist aufgetreten, versuchen sie es erneut die nachricht zu senden' - } -} - type Contact = { name: string, email: string, @@ -96,10 +57,8 @@ const contacts: Contact[] = [ /** * The section on the mediquu page for contacting helpwave */ -export const ContactSection = ({ - overwriteTranslation, -}: PropsForTranslation) => { - const translation = useTranslation([defaultContactSectionTranslation], overwriteTranslation) +export const ContactSection = () => { + const translation = useLandingPageTranslation() const [contactForm, setContactForm] = useState({ firstname: '', lastname: '', @@ -116,7 +75,7 @@ export const ContactSection = ({

{translation('contact')}

- {translation('contactDescription')} + {translation('mediquu.messageForm.contactDescription')} {contacts.length > 0 && (
{contacts.map((contact, index) => ( @@ -146,7 +105,7 @@ export const ContactSection = ({ />