From f7be3e84f4c7ed8608feaaa48aacc15d3b0f6d84 Mon Sep 17 00:00:00 2001 From: giancarlo Date: Mon, 13 May 2024 14:17:25 +0700 Subject: [PATCH] Add localization for teams-related strings in home component Support for internationalization was added to the account components related to teams. This includes localizing messages prompting a user to create a team which were previously hardcoded. Additionally, `Trans` components from '@kit/ui/trans' has been imported and used to enable this. --- .../web/app/home/(user)/_components/home-accounts-list.tsx | 7 +++++-- .../home/(user)/_components/home-add-account-button.tsx | 3 ++- apps/web/public/locales/en/account.json | 5 ++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/apps/web/app/home/(user)/_components/home-accounts-list.tsx b/apps/web/app/home/(user)/_components/home-accounts-list.tsx index df71f689d..5e8f006d5 100644 --- a/apps/web/app/home/(user)/_components/home-accounts-list.tsx +++ b/apps/web/app/home/(user)/_components/home-accounts-list.tsx @@ -8,6 +8,7 @@ import { CardButtonTitle, } from '@kit/ui/card-button'; import { Heading } from '@kit/ui/heading'; +import { Trans } from '@kit/ui/trans'; import { loadUserWorkspace } from '../_lib/server/load-user-workspace'; import { HomeAddAccountButton } from './home-add-account-button'; @@ -40,13 +41,15 @@ function HomeAccountsListEmptyState() { return (
- You don't have any teams yet. + + + - Create a team to get started. +
diff --git a/apps/web/app/home/(user)/_components/home-add-account-button.tsx b/apps/web/app/home/(user)/_components/home-add-account-button.tsx index 401c2dc1c..f6d33cfeb 100644 --- a/apps/web/app/home/(user)/_components/home-add-account-button.tsx +++ b/apps/web/app/home/(user)/_components/home-add-account-button.tsx @@ -4,6 +4,7 @@ import { useState } from 'react'; import { CreateTeamAccountDialog } from '@kit/team-accounts/components'; import { Button } from '@kit/ui/button'; +import { Trans } from '@kit/ui/trans'; export function HomeAddAccountButton() { const [isAddingAccount, setIsAddingAccount] = useState(false); @@ -11,7 +12,7 @@ export function HomeAddAccountButton() { return ( <>