Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
Translate some parts
Browse files Browse the repository at this point in the history
  • Loading branch information
Dlurak committed Feb 29, 2024
1 parent 69e5b06 commit de9e57c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ const de = {
'settins.apperance.nav.text.show': 'Zeige Titel in der Navigationsleiste an',
'settins.apperance.nav.text.hide': 'Verstecke Titel in der Navigationsleiste',
'settings.apperance.nav.search': 'Suche in der Navigationsleiste anzeigen',
'settings.nav.add': 'Hinzufügen',
'settings.nav.unused': 'Ungenutzte Komponenten',
'settings.apperance.homework.opacity': 'Transparenz abgelaufener Hausaufgaben',
'settings.homework.amount': 'Hausaufgaben pro Seite',

Expand Down
2 changes: 2 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ const en = {
'settins.apperance.nav.text.show': 'Show title in the navigation bar',
'settins.apperance.nav.text.hide': 'Hide title in the navigation bar',
'settings.apperance.nav.search': 'Show search in the navigation bar',
'settings.nav.add': 'Add',
'settings.nav.unused': 'Unused components',
'settings.apperance.homework.opacity': 'Transparency of finished homework',
'settings.homework.amount': 'Homework per page',

Expand Down
18 changes: 15 additions & 3 deletions src/lib/preferences/NavigationItems.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import { browser } from '$app/environment';
import type { Id } from '../../constants/navbar';
import { allIds, navbarData } from '../../constants/navbar';
import I18n from '$lib/I18n.svelte';
type Button = {
id: Id;
Expand Down Expand Up @@ -85,11 +86,22 @@
</ul>
{#if inactiveItems.length}
<div>
<h5>Nicht genutzte möglichkeiten</h5>
<h5>
<I18n key="settings.nav.unused" />
</h5>
<ul class="flex gap-2 flex-col">
{#each inactiveItems as item, index}
<li class="flex gap-2 items-center">
<i class="bx {item.boxIcon}" />
<span class="flex items-center gap-1">
<i class="bx {item.boxIcon}" />
<I18n
key="nav.{item.id}"
options={{
transform: 'capitalize'
}}
/>
</span>

<button
class="px-2 py-1 rounded-sm bg-light-secondary dark:bg-dark-secondary shadow-sm"
on:click={() => {
Expand All @@ -100,7 +112,7 @@
items = [...items, ...removed];
}}
>
Add
<I18n key="settings.nav.add" />
</button>
</li>
{/each}
Expand Down

0 comments on commit de9e57c

Please sign in to comment.