diff --git a/frontend/src/components/agent-control-bar.tsx b/frontend/src/components/agent-control-bar.tsx index a043f2a6a0a8..915347e0c8c1 100644 --- a/frontend/src/components/agent-control-bar.tsx +++ b/frontend/src/components/agent-control-bar.tsx @@ -1,12 +1,14 @@ import { Tooltip } from "@nextui-org/react"; import React from "react"; import { useSelector } from "react-redux"; +import { useTranslation } from "react-i18next"; import PauseIcon from "#/assets/pause"; import PlayIcon from "#/assets/play"; import { generateAgentStateChangeEvent } from "#/services/agent-state-service"; import { RootState } from "#/store"; -import AgentState from "#/types/agent-state"; -import { useWsClient } from "#/context/ws-client-provider"; +import AgentState from "#/types/AgentState"; +import { useSocket } from "#/context/socket"; +import { I18nKey } from "#/i18n/declaration"; const IgnoreTaskStateMap: Record = { [AgentState.PAUSED]: [ @@ -81,6 +83,8 @@ function AgentControlBar() { } }; + const { t } = useTranslation(); + return (
) : (
diff --git a/frontend/src/components/chat/confirmation-buttons.tsx b/frontend/src/components/chat/confirmation-buttons.tsx index 5e0eaf37c405..ee03b9c2e067 100644 --- a/frontend/src/components/chat/confirmation-buttons.tsx +++ b/frontend/src/components/chat/confirmation-buttons.tsx @@ -25,7 +25,7 @@ function ActionTooltip({ type, onClick }: ActionTooltipProps) {
); diff --git a/frontend/src/components/file-explorer/file-explorer.tsx b/frontend/src/components/file-explorer/file-explorer.tsx index 5c82a7fa8482..a81bd9d910da 100644 --- a/frontend/src/components/file-explorer/file-explorer.tsx +++ b/frontend/src/components/file-explorer/file-explorer.tsx @@ -35,6 +35,8 @@ function ExplorerActions({ onUpload, isHidden, }: ExplorerActionsProps) { + const { t } = useTranslation(); + return (
} testId="refresh" - ariaLabel="Refresh workspace" + ariaLabel={t(I18nKey.FILE_EXPLORER$REFRESH_WORKSPACE)} onClick={onRefresh} /> } testId="upload" - ariaLabel="Upload File" + ariaLabel={t(I18nKey.FILE_EXPLORER$UPLOAD)} onClick={onUpload} /> @@ -84,7 +86,11 @@ function ExplorerActions({ ) } testId="toggle" - ariaLabel={isHidden ? "Open workspace" : "Close workspace"} + ariaLabel={ + isHidden + ? t(I18nKey.FILE_EXPLORER$OPEN_WORKSPACE) + : t(I18nKey.FILE_EXPLORER$CLOSE_WORKSPACE) + } onClick={toggleHidden} />
diff --git a/frontend/src/components/project-menu/ProjectMenuCard.tsx b/frontend/src/components/project-menu/ProjectMenuCard.tsx index e61ec954c059..2f1ade0dd7c7 100644 --- a/frontend/src/components/project-menu/ProjectMenuCard.tsx +++ b/frontend/src/components/project-menu/ProjectMenuCard.tsx @@ -39,6 +39,8 @@ export function ProjectMenuCard({ setContextMenuIsOpen((prev) => !prev); }; + const { t } = useTranslation(); + const handlePushToGitHub = () => { posthog.capture("push_to_github_button_clicked"); const rawEvent = { @@ -99,7 +101,7 @@ Please push the changes to GitHub and open a pull request. diff --git a/frontend/src/components/user-avatar.tsx b/frontend/src/components/user-avatar.tsx index 17433cde463e..c4ca7ebc84ee 100644 --- a/frontend/src/components/user-avatar.tsx +++ b/frontend/src/components/user-avatar.tsx @@ -1,6 +1,8 @@ -import { LoadingSpinner } from "./modals/loading-project"; -import DefaultUserAvatar from "#/icons/default-user.svg?react"; +import { useTranslation } from "react-i18next"; +import { LoadingSpinner } from "./modals/LoadingProject"; +import DefaultUserAvatar from "#/assets/default-user.svg?react"; import { cn } from "#/utils/utils"; +import { I18nKey } from "#/i18n/declaration"; interface UserAvatarProps { onClick: () => void; @@ -9,6 +11,7 @@ interface UserAvatarProps { } export function UserAvatar({ onClick, avatarUrl, isLoading }: UserAvatarProps) { + const { t } = useTranslation(); return (