Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Bit-Barron committed Oct 30, 2024
1 parent cb5eb87 commit 03054f8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
10 changes: 4 additions & 6 deletions src/lib/components/container/navbar/language-toggle.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import Button from '@/components/ui/button/button.svelte';
import { currentLang, languages, setLanguage } from '../../../store/language';
const localeFlags = {
Expand All @@ -12,12 +13,9 @@
}
</script>

<button
on:click={toggleLanguage}
class="inline-flex items-center gap-2 rounded-md border border-slate-700 bg-transparent px-3 py-1.5 hover:bg-slate-800"
>
<Button variant="outline" on:click={toggleLanguage}>
<span class="text-sm">{localeFlags[$currentLang as keyof typeof localeFlags]}</span>
<span class="text-sm text-slate-200">
<span class="text-sm">
{$currentLang === 'en' ? 'English' : 'Deutsch'}
</span>
</button>
</Button>
4 changes: 3 additions & 1 deletion src/lib/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"no-account": "Kein Konto?",
"sign-up": "Registrieren",
"or": "ODER",
"email-placeholder": "müller@gmail.com",
"reset-password-description": "Geben Sie Ihre E-Mail-Adresse ein und wir senden Ihnen Anweisungen zum Zurücksetzen Ihres Passworts.",
"reset-link": "Reset-Link senden",
"email-placeholder": "müller@gmail.com",
"sign-in-with-google": "Mit Google anmelden",
"password": "Passwort",
"get-started": "Loslegen",
Expand Down
4 changes: 3 additions & 1 deletion src/lib/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"no-account": "No account?",
"sign-up": "Sign up",
"or": "OR",
"email-placeholder": "john@gmail.com",
"reset-password-description": "Enter your email address and we'll send you instructions to reset your password",
"reset-link": "Send Reset Link",
"email-placeholder": "john@gmail.com",
"sign-in-with-google": "Sign in with Google",
"password": "Password",
"get-started": "Get Started",
Expand Down
4 changes: 2 additions & 2 deletions src/routes/(auth)/forgot-password/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<Card.Header>
<Card.Title class="text-2xl">{$_('reset-password')}</Card.Title>
<Card.Description>
{$_('reset-password')}
{$_('reset-password-description')}
</Card.Description>
</Card.Header>
<Card.Content>
Expand All @@ -52,7 +52,7 @@
/>
</div>
<Button type="submit" class="w-full" disabled={isSubmitting}>
{isSubmitting ? 'Sending...' : 'Send Reset Link'}
{isSubmitting ? 'Sending...' : $_('reset-link')}
</Button>
<div class="mt-4 text-center text-sm">
{$_('remember-your-password')}
Expand Down

0 comments on commit 03054f8

Please sign in to comment.