chore(i18n): localize hardcoded login labels and messages (#1130)

* chore(i18n): add login copy keys

* refactor(login): localize login card title and subtitle

* refactor(login): localize wallet selector and password labels
This commit is contained in:
Parth 2026-02-20 16:21:50 +05:30 committed by theborakompanioni
parent 60698cb618
commit ab8b29965a
No known key found for this signature in database
GPG key ID: E8070AF0053AAC0D
3 changed files with 15 additions and 5 deletions

View file

@ -88,13 +88,13 @@ export const LoginCard = ({
</Button>
)}
</div>
<CardTitle className="text-2xl font-bold">{/*TODO: i18n */}Welcome to Jam</CardTitle>
<CardTitle className="text-2xl font-bold">{t('login.title')}</CardTitle>
{listWalletsLoading ? (
<>
<Skeleton className="h-4 w-full" />
</>
) : wallets && wallets.length > 0 ? (
<CardDescription>{/*TODO: i18n */}Select a wallet and enter your password to continue.</CardDescription>
<CardDescription>{t('login.subtitle')}</CardDescription>
) : undefined}
{enableOnboardingDialog ? (
<Button variant="link" size="sm" className="h-auto px-0" onClick={() => setShowOnboarding(true)}>

View file

@ -98,7 +98,7 @@ export const LoginFormComponent = ({
<form onSubmit={(event) => void doOnSubmit(event)} className={cn('flex flex-col gap-4', className)} noValidate>
<div className="space-y-2">
<Field data-invalid={errors.walletFileName !== undefined}>
<FieldLabel>{/* TODO: i18n */}Wallet</FieldLabel>
<FieldLabel>{t('login.label_wallet')}</FieldLabel>
<Select
onValueChange={(val: WalletFileName) => setValue('walletFileName', val, { shouldValidate: true })}
value={values.walletFileName ?? ''}
@ -109,7 +109,9 @@ export const LoginFormComponent = ({
>
<SelectTrigger className="w-full">
<SelectValue
placeholder={/* TODO: i18n */ wallets.length > 0 ? 'Select a wallet' : 'No wallets found.'}
placeholder={
wallets.length > 0 ? t('login.placeholder_select_wallet') : t('login.placeholder_no_wallets')
}
/>
</SelectTrigger>
<SelectContent>
@ -133,7 +135,7 @@ export const LoginFormComponent = ({
<div className="space-y-2">
<Field data-invalid={errors.password !== undefined}>
<FieldLabel htmlFor="login-password">{t(/* TODO: i18n */ 'Password')}</FieldLabel>
<FieldLabel htmlFor="login-password">{t('login.label_password')}</FieldLabel>
<InputGroup>
<InputGroupInput
id="login-password"

View file

@ -89,6 +89,14 @@
"button_next": "Next",
"button_complete": "Let's go!"
},
"login": {
"title": "Welcome to Jam",
"subtitle": "Select a wallet and enter your password to continue.",
"label_wallet": "Wallet",
"placeholder_select_wallet": "Select a wallet",
"placeholder_no_wallets": "No wallets found.",
"label_password": "Password"
},
"error_page": {
"unknown_error": {
"title": "An unknown error has been encountered",