Skip to content

Commit

Permalink
Using I18 keys in Project Menu Components
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaishakh-SM committed Nov 26, 2024
1 parent 775faed commit e513a2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion frontend/src/components/project-menu/ProjectMenuCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export function ProjectMenuCard({
setContextMenuIsOpen((prev) => !prev);
};

const { t } = useTranslation();

const handlePushToGitHub = () => {
posthog.capture("push_to_github_button_clicked");
const rawEvent = {
Expand Down Expand Up @@ -99,7 +101,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$OPEN)}
>
{working ? (
<LoadingSpinner size="small" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export function ProjectMenuDetailsPlaceholder({
"hover:underline hover:underline-offset-2",
)}
>
{!isConnectedToGitHub ? "Connect to GitHub" : "Connected"}
{!isConnectedToGitHub
? t(I18nKey.PROJECT_MENU$CONNECT_GITHUB)
: t(I18nKey.PROJECT_MENU$CONNECTED)}
<CloudConnection width={12} height={12} />
</span>
</button>
Expand Down

0 comments on commit e513a2d

Please sign in to comment.