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.
This commit is contained in:
giancarlo
2024-05-13 14:17:25 +07:00
parent c5f255d002
commit f7be3e84f4
3 changed files with 11 additions and 4 deletions

View File

@@ -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 (
<>
<Button size="sm" onClick={() => setIsAddingAccount(true)}>
Create a new team
<Trans i18nKey={'account:createTeamButtonLabel'} />
</Button>
<CreateTeamAccountDialog