Skip to content

Commit

Permalink
Add translation for Aria Label in ProjectMenuCard
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaishakh-SM committed Nov 26, 2024
1 parent 7423514 commit 184c002
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/components/project-menu/ProjectMenuCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from "react";
import { useDispatch } from "react-redux";
import toast from "react-hot-toast";
import posthog from "posthog-js";
import { useTranslation } from "react-i18next";
import EllipsisH from "#/icons/ellipsis-h.svg?react";
import { ModalBackdrop } from "../modals/modal-backdrop";
import { ConnectToGitHubModal } from "../modals/connect-to-github-modal";
Expand All @@ -13,6 +14,7 @@ import { ProjectMenuDetails } from "./project-menu-details";
import { downloadWorkspace } from "#/utils/download-workspace";
import { LoadingSpinner } from "../modals/loading-project";
import { useWsClient } from "#/context/ws-client-provider";
import { I18nKey } from "#/i18n/declaration";

interface ProjectMenuCardProps {
isConnectedToGitHub: boolean;
Expand All @@ -29,6 +31,7 @@ export function ProjectMenuCard({
}: ProjectMenuCardProps) {
const { send } = useWsClient();
const dispatch = useDispatch();
const { t } = useTranslation();

const [contextMenuIsOpen, setContextMenuIsOpen] = React.useState(false);
const [connectToGitHubModalOpen, setConnectToGitHubModalOpen] =
Expand Down Expand Up @@ -99,7 +102,7 @@ Please push the changes to GitHub and open a pull request.
<button
type="button"
onClick={toggleMenuVisibility}
aria-label="Open project menu"
aria-label={t(I18nKey.PROJECT_MENU_CARD$OPEN)}
>
{working ? (
<LoadingSpinner size="small" />
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/i18n/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -2013,6 +2013,9 @@
"en": "Download as .zip",
"es": "Descargar como .zip"
},
"PROJECT_MENU_CARD$OPEN": {
"en": "Open project menu"
},
"ACTION_BUTTON$RESUME": {
"en": "Resume the agent task"
},
Expand Down

0 comments on commit 184c002

Please sign in to comment.