Add internationalization support to the settings page user interface
Implements i18n translations for labels and descriptions within the SettingsPage.tsx component using the `t` function. Replit-Commit-Author: Agent Replit-Commit-Session-Id: d7e7c4e8-20cb-41c4-9d0e-79f48938fede Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/9777c70b-fc38-4831-8d6b-78dfffe041b0/5b1d9824-824a-44c9-8ba2-5db139e19e87.jpg
This commit is contained in:
@@ -108,7 +108,7 @@ export default function SettingsPage() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="email">Email</Label>
|
<Label htmlFor="email">{t('auth.email')}</Label>
|
||||||
<Input
|
<Input
|
||||||
id="email"
|
id="email"
|
||||||
type="email"
|
type="email"
|
||||||
@@ -118,7 +118,7 @@ export default function SettingsPage() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="fullName">Full Name</Label>
|
<Label htmlFor="fullName">{t('settings.fullName')}</Label>
|
||||||
<Input
|
<Input
|
||||||
id="fullName"
|
id="fullName"
|
||||||
value={profile.fullName}
|
value={profile.fullName}
|
||||||
@@ -126,7 +126,7 @@ export default function SettingsPage() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Button type="submit" disabled={loading}>
|
<Button type="submit" disabled={loading}>
|
||||||
{loading ? "Updating..." : "Update Profile"}
|
{loading ? t('common.loading') : t('settings.updateProfile')}
|
||||||
</Button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
@@ -269,52 +269,52 @@ export default function SettingsPage() {
|
|||||||
<TabsContent value="ai-models">
|
<TabsContent value="ai-models">
|
||||||
<Card>
|
<Card>
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle>AI Model Management</CardTitle>
|
<CardTitle>{t('settings.aiModels')}</CardTitle>
|
||||||
<CardDescription>
|
<CardDescription>
|
||||||
Configure AI models and processing preferences.
|
{t('settings.aiModelsDescription')}
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent className="space-y-6">
|
<CardContent className="space-y-6">
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<Label>AI Response Model</Label>
|
<Label>{t('settings.aiResponseModel')}</Label>
|
||||||
<p className="text-sm text-gray-600 dark:text-gray-400 mb-2">
|
<p className="text-sm text-gray-600 dark:text-gray-400 mb-2">
|
||||||
Choose the AI model for generating responses
|
{t('settings.aiResponseModelDesc')}
|
||||||
</p>
|
</p>
|
||||||
<Select defaultValue="claude-3">
|
<Select defaultValue="claude-3">
|
||||||
<SelectTrigger>
|
<SelectTrigger>
|
||||||
<SelectValue />
|
<SelectValue />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="claude-3">Claude 3 Sonnet</SelectItem>
|
<SelectItem value="claude-3">{t('settings.claude3Sonnet')}</SelectItem>
|
||||||
<SelectItem value="gpt-4">GPT-4</SelectItem>
|
<SelectItem value="gpt-4">{t('settings.gpt4')}</SelectItem>
|
||||||
<SelectItem value="gemini">Gemini Pro</SelectItem>
|
<SelectItem value="gemini">{t('settings.geminiPro')}</SelectItem>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Label>Voice Processing</Label>
|
<Label>{t('settings.voiceProcessing')}</Label>
|
||||||
<p className="text-sm text-gray-600 dark:text-gray-400 mb-2">
|
<p className="text-sm text-gray-600 dark:text-gray-400 mb-2">
|
||||||
Select voice recognition engine
|
{t('settings.voiceProcessingDesc')}
|
||||||
</p>
|
</p>
|
||||||
<Select defaultValue="whisper">
|
<Select defaultValue="whisper">
|
||||||
<SelectTrigger>
|
<SelectTrigger>
|
||||||
<SelectValue />
|
<SelectValue />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="whisper">OpenAI Whisper</SelectItem>
|
<SelectItem value="whisper">{t('settings.whisper')}</SelectItem>
|
||||||
<SelectItem value="browser">Browser Native</SelectItem>
|
<SelectItem value="browser">{t('settings.browserNative')}</SelectItem>
|
||||||
<SelectItem value="azure">Azure Speech</SelectItem>
|
<SelectItem value="azure">{t('settings.azureSpeech')}</SelectItem>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="space-y-0.5">
|
<div className="space-y-0.5">
|
||||||
<Label>AI Suggestions</Label>
|
<Label>{t('settings.aiSuggestions')}</Label>
|
||||||
<p className="text-sm text-gray-600 dark:text-gray-400">
|
<p className="text-sm text-gray-600 dark:text-gray-400">
|
||||||
Enable intelligent task and financial suggestions
|
{t('settings.aiSuggestionsDesc')}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Switch defaultChecked />
|
<Switch defaultChecked />
|
||||||
@@ -322,9 +322,9 @@ export default function SettingsPage() {
|
|||||||
|
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="space-y-0.5">
|
<div className="space-y-0.5">
|
||||||
<Label>Local Processing</Label>
|
<Label>{t('settings.localProcessing')}</Label>
|
||||||
<p className="text-sm text-gray-600 dark:text-gray-400">
|
<p className="text-sm text-gray-600 dark:text-gray-400">
|
||||||
Process AI requests locally when possible
|
{t('settings.localProcessingDesc')}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Switch />
|
<Switch />
|
||||||
@@ -332,9 +332,9 @@ export default function SettingsPage() {
|
|||||||
|
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="space-y-0.5">
|
<div className="space-y-0.5">
|
||||||
<Label>Learning Mode</Label>
|
<Label>{t('settings.learningMode')}</Label>
|
||||||
<p className="text-sm text-gray-600 dark:text-gray-400">
|
<p className="text-sm text-gray-600 dark:text-gray-400">
|
||||||
Allow AI to learn from your usage patterns
|
{t('settings.learningModeDesc')}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Switch defaultChecked />
|
<Switch defaultChecked />
|
||||||
|
|||||||
Reference in New Issue
Block a user