From ddb17b1783a8b08763af75a2d9983fcef37d3cb3 Mon Sep 17 00:00:00 2001 From: leonie2003 Date: Wed, 24 Apr 2024 09:15:19 +0200 Subject: [PATCH] add translations --- frontend/components/deck/DeckList.tsx | 1 - frontend/components/input/ActionBar.tsx | 4 +- frontend/components/input/SpeechBubble.tsx | 17 +----- .../navigation/Tabs/DashboardTab.tsx | 15 ++--- .../components/navigation/Tabs/DecksTab.tsx | 12 ++-- .../components/navigation/Tabs/GroupsTab.tsx | 10 +-- .../placeholders/GenericPlaceholder.tsx | 9 ++- frontend/locales/de/messages.po | 61 ++++++++++++++----- frontend/locales/en/messages.po | 61 ++++++++++++++----- 9 files changed, 121 insertions(+), 69 deletions(-) diff --git a/frontend/components/deck/DeckList.tsx b/frontend/components/deck/DeckList.tsx index ab9cf6a2..dcd61cbf 100644 --- a/frontend/components/deck/DeckList.tsx +++ b/frontend/components/deck/DeckList.tsx @@ -65,7 +65,6 @@ export default function DeckList({ ))} {Children.map(children, (child) => { if (!isValidElement(child)) return null; - return child; })} diff --git a/frontend/components/input/ActionBar.tsx b/frontend/components/input/ActionBar.tsx index 258aa101..60b75e4a 100644 --- a/frontend/components/input/ActionBar.tsx +++ b/frontend/components/input/ActionBar.tsx @@ -1,6 +1,6 @@ import { t } from "@lingui/macro"; -import { ChangeEventHandler, MouseEventHandler, useState } from "react"; -import { ChevronRight, ChevronsUp, PlusSquare } from "react-feather"; +import { ChangeEventHandler, MouseEventHandler } from "react"; +import { ChevronsUp, PlusSquare } from "react-feather"; import { SpeechBubble } from "./SpeechBubble"; import { SpeechBubbleContent } from "./SpeechBubbleContent"; diff --git a/frontend/components/input/SpeechBubble.tsx b/frontend/components/input/SpeechBubble.tsx index 45d9086d..a206d832 100644 --- a/frontend/components/input/SpeechBubble.tsx +++ b/frontend/components/input/SpeechBubble.tsx @@ -1,17 +1,8 @@ import clsx from "clsx"; import React, { Children, MouseEventHandler, isValidElement } from "react"; -import { JSXElementConstructor, ReactElement, ReactNode } from "react"; -import { ChevronUp } from "react-feather"; +import { ReactNode } from "react"; interface SpeechBubbleProps { - /** - * Value - */ - // value: ReactNode; - // /** - // * Parent - // */ - // parent: ReactNode; /** * Align */ @@ -38,8 +29,6 @@ interface SpeechBubbleProps { * UI component for displaying a Speech Bubble */ export const SpeechBubble = ({ - // value, - // parent, align, className = "", show, @@ -77,7 +66,7 @@ export const SpeechBubble = ({
{ {activeDecks?.length === 0 && ( )} @@ -37,8 +36,10 @@ export const DashboardTab = ({ className = "" }: DashboardTabProps) => { {favoriteDecks?.length === 0 && ( )} diff --git a/frontend/components/navigation/Tabs/DecksTab.tsx b/frontend/components/navigation/Tabs/DecksTab.tsx index 1fca8d6a..899b2070 100644 --- a/frontend/components/navigation/Tabs/DecksTab.tsx +++ b/frontend/components/navigation/Tabs/DecksTab.tsx @@ -1,11 +1,9 @@ import { msg } from "@lingui/macro"; import { useLingui } from "@lingui/react"; import { useState } from "react"; -import { PlusSquare } from "react-feather"; import DeckList from "@/components/deck/DeckList"; import { ActionBar } from "@/components/input/ActionBar"; -import { SpeechBubble } from "@/components/input/SpeechBubble"; import { CreateDeckModal } from "@/components/modal/CreateDeckModal"; import { GenericPlaceholder } from "@/components/placeholders/GenericPlaceholder"; import { Group as GroupType } from "@/types/Group"; @@ -58,14 +56,16 @@ export const DecksTab = ({ group }: DecksTabProps) => { onHide={() => { setShowTutorial(false); }} - tutorialText="Click here to add a new deck." + tutorialText={_(msg`Click here to add a new deck.`)} /> {decks?.length === 0 && ( setShowTutorial(true)} > diff --git a/frontend/components/navigation/Tabs/GroupsTab.tsx b/frontend/components/navigation/Tabs/GroupsTab.tsx index 640fe973..172cffd7 100644 --- a/frontend/components/navigation/Tabs/GroupsTab.tsx +++ b/frontend/components/navigation/Tabs/GroupsTab.tsx @@ -1,6 +1,6 @@ import { msg } from "@lingui/macro"; import { useLingui } from "@lingui/react"; -import { MouseEvent, useState } from "react"; +import { useState } from "react"; import GroupList from "@/components/group/GroupList"; import { ActionBar } from "@/components/input/ActionBar"; @@ -56,9 +56,11 @@ export const GroupsTab = ({ groups, className = "" }: GroupsTabProps) => { {groups?.length === 1 && ( { setShowTutorial(true); diff --git a/frontend/components/placeholders/GenericPlaceholder.tsx b/frontend/components/placeholders/GenericPlaceholder.tsx index 41a74451..d84a3c64 100644 --- a/frontend/components/placeholders/GenericPlaceholder.tsx +++ b/frontend/components/placeholders/GenericPlaceholder.tsx @@ -46,19 +46,18 @@ export const GenericPlaceholder = ({ return (
- {title} - {description} + {title} + {description} {buttonText && (