diff --git a/next-i18next.config.js b/next-i18next.config.js index 875c03fc8..ae76b4355 100644 --- a/next-i18next.config.js +++ b/next-i18next.config.js @@ -4,6 +4,7 @@ module.exports = { i18n: { defaultLocale: 'en', locales: ['en', 'de'], + localeDetection: true, }, reloadOnPrerender: process.env.NODE_ENV === 'development', }; diff --git a/public/imgs/flags/de.png b/public/imgs/flags/de.png new file mode 100644 index 000000000..c62776bf3 Binary files /dev/null and b/public/imgs/flags/de.png differ diff --git a/public/imgs/flags/en.png b/public/imgs/flags/en.png new file mode 100644 index 000000000..e6a6dc8be Binary files /dev/null and b/public/imgs/flags/en.png differ diff --git a/public/locales/de/common.json b/public/locales/de/common.json index aca69de4a..bcec9ac7f 100644 --- a/public/locales/de/common.json +++ b/public/locales/de/common.json @@ -1,385 +1,6 @@ { - "settings": { - "title": "Einstellungen", - "tooltip": "Einstellungen", - "tabs": { - "common": { - "title": "Allgemein", - "settings": { - "searchEngine": { - "title": "Suchmaschine", - "tips": { - "generalTip": "Benutze die Prefixe !yt und !t vor deiner Suchanfrage um auf Youtube oder nach einem Torrent zu suchen.", - "placeholderTip": "%s can be used as a placeholder for the query." - }, - "customEngine": { - "label": "Suchadresse", - "placeholder": "Benutzerdefinierte Adresse" - } - }, - "colorScheme": { - "label": "Wechseln zu {{scheme}} Modus" - }, - "widgetsPositionSwitch": { - "label": "Positionieren von Widgets auf linker Seite" - }, - "moduleEnabler": { - "title": "Modul Enabler" - }, - "language": { - "title": "Sprache" - }, - "configChanger": { - "configSelect": { - "label": "Konfigurations Lader" - }, - "modal": { - "title": "Choose the name of your new config", - "form": { - "configName": { - "label": "Config name", - "placeholder": "Your new config name" - }, - "buttons:": { - "submit": "Confirm" - } - } - }, - "buttons": { - "download": "Konfiguration herunterladen", - "delete": { - "text": "Konfiguration löschen", - "notifications": { - "deleted": { - "title": "Config deleted", - "message": "Config deleted" - }, - "deleteFailed": { - "title": "Config delete failed", - "message": "Config delete failed" - } - } - }, - "saveCopy": "Kopie speichern" - } - }, - "configTip": "Lade deine Konfiguration hoch, indem du sie per drag-and-drop auf die Seite ziehst." - } - }, - "customizations": { - "title": "Anpassungen", - "settings": { - "opacitySelector": { - "label": "App Opacity" - }, - "colorSelector": { - "suffix": "{{color}} color" - }, - "shadeSelector": { - "label": "Shade" - }, - "pageTitle": { - "label": "Page Title", - "placeholder": "Homarr 🦞" - }, - "logo": { - "label": "Logo", - "placeholder": "/img/logo.png" - }, - "favicon": { - "label": "Favicon", - "placeholder": "/favicon.png" - }, - "background": { - "label": "Background", - "placeholder": "/img/background.png" - }, - "buttons": { - "submit": "Save" - } - } - } - }, - "credits": { - "madeWithLove": "Gemacht mit ❤️ von @" - } + "actions": { + "save": "Speichern" }, - "layout": { - "header": { - "search": { - "input": { - "placeholder": "Das Internet durchsuchen..." - } - }, - "docker": { - "errors": { - "integrationFailed": { - "title": "Docker Integration ist gescheitert", - "message": "Hast du vergessen, den Docker Socket zu verbinden?" - } - }, - "actionIcon": { - "tooltip": "Docker" - } - }, - "addService": { - "actionIcon": { - "tooltip": "Einen Service hinzufügen" - }, - "modal": { - "title": "Service hinzufügen", - "form": { - "validation": { - "invalidUrl": "Bitte gebe eine gültige Addresse ein", - "noStatusCodeSelected": "Bitte wähle einen gültigen Status Code aus" - } - }, - "tabs": { - "options": { - "title": "Optionen", - "form": { - "serviceName": { - "label": "Service Namen", - "placeholder": "Plex" - }, - "iconUrl": { - "label": "Icon URL" - }, - "serviceUrl": { - "label": "Service URL" - }, - "onClickUrl": { - "label": "URL beim Klicken" - }, - "serviceType": { - "label": "Service Typ", - "defaultValue": "Andere", - "placeholder": "Wähle einen aus..." - }, - "category": { - "label": "Kategorie", - "placeholder": "Wähle eine Kategorie oder erstelle eine neue...", - "nothingFound": "Keine Übereinstimmungen gefunden", - "createLabel": "+ Erstellen {{query}}" - }, - "integrations": { - "apiKey": { - "label": "API Schlüssel", - "placeholder": "Dein API Schlüssel", - "validation": { - "noKey": "Invalider Schlüssel" - }, - "tip": { - "text": "Hole deinen API Schlüssel", - "link": "hier." - } - }, - "qBittorrent": { - "username": { - "label": "Benutzername", - "placeholder": "admin", - "validation": { - "invalidUsername": "Invalider Benutzername" - } - }, - "password": { - "label": "Passwort", - "placeholder": "adminadmin", - "validation": { - "invalidPassword": "Invalides Passwort" - } - } - }, - "deluge": { - "password": { - "label": "Passwort", - "placeholder": "password", - "validation": { - "invalidPassword": "Invalides PassworT" - } - } - }, - "transmission": { - "username": { - "label": "Benutzername", - "placeholder": "admin", - "validation": { - "invalidUsername": "Invalid username" - } - }, - "password": { - "label": "Password", - "placeholder": "adminadmin", - "validation": { - "invalidPassword": "Invalid password" - } - } - } - } - } - }, - "advancedOptions": { - "title": "Advanced options", - "form": { - "httpStatusCodes": { - "label": "HTTP Status Codes", - "placeholder": "Select valid status codes", - "clearButtonLabel": "Clear selection", - "nothingFound": "Nothing found" - }, - "openServiceInNewTab": { - "label": "Open service in new tab" - }, - "buttons": { - "submit": { - "content": "Add service" - } - } - } - } - } - } - } - } - }, - "modules": { - "common": { - "mediaCard": { - "buttons": { - "play": "Play", - "request": "Request" - } - } - }, - "calendar": { - "title": "Calendar", - "description": "A calendar module for displaying upcoming releases. It interacts with the Sonarr and Radarr API.", - "options": { - "sundayStart": "Start the week on Sunday" - } - }, - "dashDot": { - "card": { - "title": "Dash.", - "errors": { - "noService": "No dash. service found. Please add one to your Homarr dashboard or set a dashdot URL in the module options", - "noInformation": "Cannot acquire information from dash. - are you running the latest version?" - }, - "graphs": { - "storage": { - "title": "Storage", - "label": "Storage:" - }, - "network": { - "title": "Network", - "label": "Network:", - "metrics": { - "download": "Down", - "upload": "Up" - } - }, - "cpu": { - "title": "CPU" - }, - "memory": { - "title": "RAM" - }, - "gpu": { - "title": "GPU" - } - } - } - }, - "torrent": { - "card": { - "title": "Your Downloads" - } - }, - "downloads": { - "card": { - "table": { - "header": { - "name": "Name", - "size": "Size", - "download": "Down", - "upload": "Up", - "estimatedTimeOfArrival": "ETA", - "progress": "Progress" - }, - "body": { - "nothingFound": "No torrents found" - } - } - } - }, - "weather": { - "card": { - "weatherDescriptions": { - "clear": "Clear", - "mainlyClear": "Mainly clear", - "fog": "Fog", - "drizzle": "Drizzle", - "freezingDrizzle": "Freezing drizzle", - "rain": "Rain", - "freezingRain": "Freezing rain", - "snowFall": "Snow fall", - "snowGrains": "Snow grains", - "rainShowers": "Rain showers", - "snowShowers": "Snow showers", - "thunderstorm": "Thunderstorm", - "thunderstormWithHail": "Thunderstorm with hail", - "unknown": "Unknown" - } - } - }, - "overseerr": { - "popup": { - "item": { - "buttons": { - "askFor": "Ask for {{title}}", - "cancel": "Cancel", - "request": "Request" - }, - "alerts": { - "automaticApproval": { - "title": "Using API key", - "text": "This request will be automatically approved" - } - } - }, - "seasonSelector": { - "caption": "Tick the seasons that you want to be downloaded", - "table": { - "header": { - "season": "Season", - "numberOfEpisodes": "Number of episodes" - } - } - } - } - }, - "ping": { - "states": { - "online": "Online {{response}}", - "offline": "Offline {{response}}", - "loading": "Loading..." - } - }, - "docker": { - "search": { - "placeholder": "Search by container or image name" - }, - "table": { - "header": { - "name": "Name", - "image": "Image", - "ports": "Ports", - "state": "State" - }, - "body": { - "portCollapse": "{{ports}} more" - } - } - } - } + "tip": "Tipp: " } \ No newline at end of file diff --git a/public/locales/de/layout/add-service-app-shelf.json b/public/locales/de/layout/add-service-app-shelf.json new file mode 100644 index 000000000..d7a1ffb4c --- /dev/null +++ b/public/locales/de/layout/add-service-app-shelf.json @@ -0,0 +1,118 @@ +{ + "actionIcon": { + "tooltip": "Einen Service hinzufügen" + }, + "modal": { + "title": "Service hinzufügen", + "form": { + "validation": { + "invalidUrl": "Please enter a valid URL", + "noStatusCodeSelected": "Please select a status code" + } + }, + "tabs": { + "options": { + "title": "Optionen", + "form": { + "serviceName": { + "label": "Service Namen", + "placeholder": "Plex" + }, + "iconUrl": { + "label": "Icon URL" + }, + "serviceUrl": { + "label": "Service URL" + }, + "onClickUrl": { + "label": "URL bei einem Klick" + }, + "serviceType": { + "label": "Service Typ", + "defaultValue": "Andere", + "placeholder": "Wähle einen Typ aus" + }, + "category": { + "label": "Kategorie", + "placeholder": "Whle eine Kategorie oder erstelle eine neue", + "nothingFound": "Nichts gefunden", + "createLabel": "+ Erstelle {{query}}" + }, + "integrations": { + "apiKey": { + "label": "API Schlüssel", + "placeholder": "Dein API Schlüssel", + "validation": { + "noKey": "Invalider Schlüssel" + }, + "tip": { + "text": "Erhalte deinen API Schlüssel", + "link": "hier." + } + }, + "qBittorrent": { + "username": { + "label": "Benutzernamen", + "placeholder": "admin", + "validation": { + "invalidUsername": "Invalider Benutzername" + } + }, + "password": { + "label": "Passwort", + "placeholder": "adminadmin", + "validation": { + "invalidPassword": "Invalides Passwort" + } + } + }, + "deluge": { + "password": { + "label": "Passwort", + "placeholder": "password", + "validation": { + "invalidPassword": "Invalides Passwort" + } + } + }, + "transmission": { + "username": { + "label": "Benutzername", + "placeholder": "admin", + "validation": { + "invalidUsername": "Invalider Benutzername" + } + }, + "password": { + "label": "Passwort", + "placeholder": "adminadmin", + "validation": { + "invalidPassword": "Invalides Passwort" + } + } + } + } + } + }, + "advancedOptions": { + "title": "Weitere Optionen", + "form": { + "httpStatusCodes": { + "label": "HTTP Status Nummern", + "placeholder": "Wähle eine valide Status Nummer", + "clearButtonLabel": "Auswahl löschen", + "nothingFound": "Nichts gefunden" + }, + "openServiceInNewTab": { + "label": "Serivce in einem neuen Tab öffnen" + }, + "buttons": { + "submit": { + "content": "Service hinzufügen" + } + } + } + } + } + } + } \ No newline at end of file diff --git a/public/locales/de/layout/app-shelf-menu.json b/public/locales/de/layout/app-shelf-menu.json new file mode 100644 index 000000000..46e894272 --- /dev/null +++ b/public/locales/de/layout/app-shelf-menu.json @@ -0,0 +1,18 @@ +{ + "modal": { + "title": "Einen Service bearbeiten", + "buttons": { + "save": "Service speichern" + } + }, + "menu": { + "labels": { + "settings": "Einstellungen", + "dangerZone": "Gefahrenzone" + }, + "actions": { + "edit": "Bearbeiten", + "delete": "Löschen" + } + } +} \ No newline at end of file diff --git a/public/locales/de/layout/app-shelf.json b/public/locales/de/layout/app-shelf.json new file mode 100644 index 000000000..72788abb4 --- /dev/null +++ b/public/locales/de/layout/app-shelf.json @@ -0,0 +1,10 @@ +{ + "accordions": { + "downloads": { + "text": "Deine Downloads" + }, + "others": { + "text": "Andere" + } + } +} \ No newline at end of file diff --git a/public/locales/de/modules/common-media-cards-module.json b/public/locales/de/modules/common-media-cards-module.json new file mode 100644 index 000000000..72313078a --- /dev/null +++ b/public/locales/de/modules/common-media-cards-module.json @@ -0,0 +1,6 @@ +{ + "buttons": { + "play": "Abspielen", + "request": "Anfragen" + } +} \ No newline at end of file diff --git a/public/locales/de/modules/dashdot-module.json b/public/locales/de/modules/dashdot-module.json new file mode 100644 index 000000000..d629b876f --- /dev/null +++ b/public/locales/de/modules/dashdot-module.json @@ -0,0 +1,32 @@ +{ + "card": { + "title": "Dash.", + "errors": { + "noService": "Kein Dash. Service gefunden. Bitte füge einen zu deinem Homarr Dashboard hinzu oder setze eine Dash. URL in den Modul-Optionen.", + "noInformation": "Informationen konnten nicht von Dash. geladen werden. Betriebst du die neuste Version?" + }, + "graphs": { + "storage": { + "title": "Speicher", + "label": "Speicher:" + }, + "network": { + "title": "Netzwerk", + "label": "Netzwerk:", + "metrics": { + "download": "Eingehend", + "upload": "Ausgehend" + } + }, + "cpu": { + "title": "CPU" + }, + "memory": { + "title": "RAM" + }, + "gpu": { + "title": "GPU" + } + } + } +} \ No newline at end of file diff --git a/public/locales/de/modules/docker-module.json b/public/locales/de/modules/docker-module.json new file mode 100644 index 000000000..495bacb08 --- /dev/null +++ b/public/locales/de/modules/docker-module.json @@ -0,0 +1,65 @@ +{ + "search": { + "placeholder": "Suche nach Conainer oder Image Namen" + }, + "table": { + "header": { + "name": "Name", + "image": "Image", + "ports": "Ports", + "state": "Status" + }, + "body": { + "portCollapse": "{{ports}} weitere" + }, + "states": { + "running": "Läuft", + "created": "Erstellt", + "stopped": "Gestopped", + "unknown": "Unbekannt" + } + }, + "actionBar": { + "addService": { + "title": "Service hinzufügen", + "message": "Service zu Homarr hinzufügen" + }, + "restart": { + "title": "Neustarten" + }, + "stop": { + "title": "Stoppen" + }, + "start": { + "title": "Starten" + }, + "refreshData": "Daten aktualisieren", + "addToHomarr": { + "title": "Zu Homarr hinzufügen" + }, + "remove": { + "title": "Entfernen" + } + }, + "messages": { + "successfullyExecuted": { + "title": "Container {{containerName}} {{action}}ed", + "message": "Your container was successfully {{action}}ed" + } + }, + "errors": { + "integrationFailed": { + "title": "Docker Integration schlug fehl", + "message": "Hast du vergessen, den Docker Socket zu verbinden?" + }, + "unknownError": { + "title": "Es ist ein Fehler aufgetreten" + }, + "oneServiceAtATime": { + "title": "Bitte füge nur einen Service zur Zeit hinzu." + } + }, + "actionIcon": { + "tooltip": "Docker" + } +} \ No newline at end of file diff --git a/public/locales/de/modules/downloads-module.json b/public/locales/de/modules/downloads-module.json new file mode 100644 index 000000000..3578c0b93 --- /dev/null +++ b/public/locales/de/modules/downloads-module.json @@ -0,0 +1,23 @@ +{ + "card": { + "table": { + "header": { + "name": "Name", + "size": "Grösse", + "download": "Eingehend", + "upload": "Ausgehend", + "estimatedTimeOfArrival": "Vorraussichtlicher Abschluss", + "progress": "Fortschritt" + }, + "body": { + "nothingFound": "Keine Torrents gefunden" + } + }, + "errors": { + "noDownloadClients": { + "title": "Keine unterstützten Download Clients gefunden", + "text": "Füge einen Download Service hinzu, um deine derzeitigen Downloads zu sehen" + } + } + } +} \ No newline at end of file diff --git a/public/locales/de/modules/overseerr-module.json b/public/locales/de/modules/overseerr-module.json new file mode 100644 index 000000000..99ce654f8 --- /dev/null +++ b/public/locales/de/modules/overseerr-module.json @@ -0,0 +1,26 @@ +{ + "popup": { + "item": { + "buttons": { + "askFor": "Fragen für {{title}}", + "cancel": "Abbrechen", + "request": "Anfragen" + }, + "alerts": { + "automaticApproval": { + "title": "Einen API Schlüssel benutzen", + "text": "Diese Anfrage wird automatisch genehmigt" + } + } + }, + "seasonSelector": { + "caption": "Kreuze die Staffeln an, die heruntergeladen werden sollen.", + "table": { + "header": { + "season": "Staffel", + "numberOfEpisodes": "Anzahl von Episoden" + } + } + } + } +} \ No newline at end of file diff --git a/public/locales/de/modules/ping-module.json b/public/locales/de/modules/ping-module.json new file mode 100644 index 000000000..8cffe4e90 --- /dev/null +++ b/public/locales/de/modules/ping-module.json @@ -0,0 +1,7 @@ +{ + "states": { + "online": "Online {{response}}", + "offline": "Offline {{response}}", + "loading": "Laden..." + } +} \ No newline at end of file diff --git a/public/locales/de/modules/search-module.json b/public/locales/de/modules/search-module.json new file mode 100644 index 000000000..e794b039b --- /dev/null +++ b/public/locales/de/modules/search-module.json @@ -0,0 +1,5 @@ +{ + "input": { + "placeholder": "Das Internet durchsuchen..." + } +} \ No newline at end of file diff --git a/public/locales/de/modules/weather-module.json b/public/locales/de/modules/weather-module.json new file mode 100644 index 000000000..4d8fa725a --- /dev/null +++ b/public/locales/de/modules/weather-module.json @@ -0,0 +1,20 @@ +{ + "card": { + "weatherDescriptions": { + "clear": "Klar", + "mainlyClear": "Überwiegend klar", + "fog": "Nebel", + "drizzle": "Niesel", + "freezingDrizzle": "Eisiger Nieselregen", + "rain": "Regen", + "freezingRain": "Eisiger Regen", + "snowFall": "Schneefall", + "snowGrains": "Schneekörner", + "rainShowers": "Regenschauer", + "snowShowers": "Schneeschauer", + "thunderstorm": "Gewitter", + "thunderstormWithHail": "Gewitter mit Hagel", + "unknown": "Unbekannt" + } + } +} \ No newline at end of file diff --git a/public/locales/de/settings/common.json b/public/locales/de/settings/common.json new file mode 100644 index 000000000..433c0197b --- /dev/null +++ b/public/locales/de/settings/common.json @@ -0,0 +1,14 @@ +{ + "title": "Einstellungen", + "tooltip": "Einstellungen", + "tabs": { + "common": "Gewöhnlich", + "customizations": "Anpassungen" + }, + "tips": { + "configTip": "Lade eine neue Konfiguration hoch, indem du eine neue auf die Seite ziehst!" + }, + "credits": { + "madeWithLove": "Gemacht mit ❤️ von @" + } +} \ No newline at end of file diff --git a/public/locales/de/settings/customization/app-width.json b/public/locales/de/settings/customization/app-width.json new file mode 100644 index 000000000..631bd9d0b --- /dev/null +++ b/public/locales/de/settings/customization/app-width.json @@ -0,0 +1,3 @@ +{ + "label": "Applikations Breite" +} \ No newline at end of file diff --git a/public/locales/de/settings/customization/color-selector.json b/public/locales/de/settings/customization/color-selector.json new file mode 100644 index 000000000..fd1e6ff10 --- /dev/null +++ b/public/locales/de/settings/customization/color-selector.json @@ -0,0 +1,3 @@ +{ + "suffix": "{{color}} Farbe" +} \ No newline at end of file diff --git a/public/locales/de/settings/customization/opacity-selector.json b/public/locales/de/settings/customization/opacity-selector.json new file mode 100644 index 000000000..35d0fcb44 --- /dev/null +++ b/public/locales/de/settings/customization/opacity-selector.json @@ -0,0 +1,3 @@ +{ + "label": "Applikation Deckkraft" +} \ No newline at end of file diff --git a/public/locales/de/settings/customization/page-appearance.json b/public/locales/de/settings/customization/page-appearance.json new file mode 100644 index 000000000..cb9740b31 --- /dev/null +++ b/public/locales/de/settings/customization/page-appearance.json @@ -0,0 +1,21 @@ +{ + "pageTitle": { + "label": "Seiten Titel", + "placeholder": "Homarr 🦞" + }, + "logo": { + "label": "Logo", + "placeholder": "/img/logo.png" + }, + "favicon": { + "label": "Favicon", + "placeholder": "/favicon.png" + }, + "background": { + "label": "Hintergrund", + "placeholder": "/img/background.png" + }, + "buttons": { + "submit": "Absenden" + } +} \ No newline at end of file diff --git a/public/locales/de/settings/customization/shade-selector.json b/public/locales/de/settings/customization/shade-selector.json new file mode 100644 index 000000000..88ad84009 --- /dev/null +++ b/public/locales/de/settings/customization/shade-selector.json @@ -0,0 +1,3 @@ +{ + "label": "Shatten" +} \ No newline at end of file diff --git a/public/locales/de/settings/general/color-schema.json b/public/locales/de/settings/general/color-schema.json new file mode 100644 index 000000000..5c885bd49 --- /dev/null +++ b/public/locales/de/settings/general/color-schema.json @@ -0,0 +1,3 @@ +{ + "label": "Wechseln zu {{scheme}} Modus" +} \ No newline at end of file diff --git a/public/locales/de/settings/general/config-changer.json b/public/locales/de/settings/general/config-changer.json new file mode 100644 index 000000000..d33cd1514 --- /dev/null +++ b/public/locales/de/settings/general/config-changer.json @@ -0,0 +1,34 @@ +{ + "configSelect": { + "label": "Konfigurations Lader" + }, + "modal": { + "title": "Wähle einen Namen für deine neue Konfiguration", + "form": { + "configName": { + "label": "Konfigurations Name", + "placeholder": "Dein neuer Konfigurtionsname" + }, + "buttons:": { + "submit": "Bestätigen" + } + } + }, + "buttons": { + "download": "Konfiguration herunterladen", + "delete": { + "text": "Konfiguration löschen", + "notifications": { + "deleted": { + "title": "Konfiguration gelöscht", + "message": "Konfiguration wurde gelöscht" + }, + "deleteFailed": { + "title": "Config delete failed", + "message": "Config delete failed" + } + } + }, + "saveCopy": "Eine Kopie speichern" + } +} \ No newline at end of file diff --git a/public/locales/de/settings/general/internationalization.json b/public/locales/de/settings/general/internationalization.json new file mode 100644 index 000000000..786d61394 --- /dev/null +++ b/public/locales/de/settings/general/internationalization.json @@ -0,0 +1,3 @@ +{ + "label": "Sprache" +} \ No newline at end of file diff --git a/public/locales/de/settings/general/module-enabler.json b/public/locales/de/settings/general/module-enabler.json new file mode 100644 index 000000000..a48dcdc97 --- /dev/null +++ b/public/locales/de/settings/general/module-enabler.json @@ -0,0 +1,3 @@ +{ + "title": "Modul-Enabler" +} \ No newline at end of file diff --git a/public/locales/de/settings/general/search-engine.json b/public/locales/de/settings/general/search-engine.json new file mode 100644 index 000000000..def5db657 --- /dev/null +++ b/public/locales/de/settings/general/search-engine.json @@ -0,0 +1,11 @@ +{ + "title": "Suchmaschine", + "tips": { +"generalTip": "Verwenden die Präfixe !yt und !t vor deiner Suchanfrage, um auf YouTube bzw. nach einem Torrent zu suchen.", + "placeholderTip": "%s kann als Platzhalter für deine Suchanfrage verwendet werden." + }, + "customEngine": { + "label": "Suchanfrage URL", + "placeholder": "Benutzerdefinierte Adresse" + } +} \ No newline at end of file diff --git a/public/locales/de/settings/general/theme-selector.json b/public/locales/de/settings/general/theme-selector.json new file mode 100644 index 000000000..23d4efacc --- /dev/null +++ b/public/locales/de/settings/general/theme-selector.json @@ -0,0 +1,3 @@ +{ + "label": "Wechsel zu {{theme}} Modus" +} \ No newline at end of file diff --git a/public/locales/de/settings/general/widget-positions.json b/public/locales/de/settings/general/widget-positions.json new file mode 100644 index 000000000..fe4fc4d6e --- /dev/null +++ b/public/locales/de/settings/general/widget-positions.json @@ -0,0 +1,3 @@ +{ + "label": "Widgets auf der linken Seite" +} \ No newline at end of file diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 1df83e4d8..9a0b9a9d9 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -1,5 +1,6 @@ { "actions": { "save": "Save" - } + }, + "tip": "Tip: " } \ No newline at end of file diff --git a/public/locales/en/layout/app-shelf-menu.json b/public/locales/en/layout/app-shelf-menu.json new file mode 100644 index 000000000..006e906c2 --- /dev/null +++ b/public/locales/en/layout/app-shelf-menu.json @@ -0,0 +1,18 @@ +{ + "modal": { + "title": "Modify a service", + "buttons": { + "save": "Save service" + } + }, + "menu": { + "labels": { + "settings": "Settings", + "dangerZone": "Danger zone" + }, + "actions": { + "edit": "Edit", + "delete": "Delete" + } + } +} \ No newline at end of file diff --git a/public/locales/en/modules/downloads-module.json b/public/locales/en/modules/downloads-module.json index 349e3b522..80528f56f 100644 --- a/public/locales/en/modules/downloads-module.json +++ b/public/locales/en/modules/downloads-module.json @@ -12,6 +12,12 @@ "body": { "nothingFound": "No torrents found" } + }, + "errors": { + "noDownloadClients": { + "title": "No supported download clients found!", + "text": "Add a download service to view your current downloads" + } } } } \ No newline at end of file diff --git a/public/locales/en/settings/common.json b/public/locales/en/settings/common.json index 92b078dce..776816b2a 100644 --- a/public/locales/en/settings/common.json +++ b/public/locales/en/settings/common.json @@ -5,6 +5,9 @@ "common": "Common", "customizations": "Customizations" }, + "tips": { + "configTip": "Upload your config file by dragging and dropping it onto the page!" + }, "credits": { "madeWithLove": "Made with ❤️ by @" } diff --git a/public/locales/en/settings/customization/app-width.json b/public/locales/en/settings/customization/app-width.json new file mode 100644 index 000000000..e7636eef0 --- /dev/null +++ b/public/locales/en/settings/customization/app-width.json @@ -0,0 +1,3 @@ +{ + "label": "App Width" +} \ No newline at end of file diff --git a/public/locales/en/settings/customization/page-appearance.json b/public/locales/en/settings/customization/page-appearance.json index 1b513da3e..051c11d86 100644 --- a/public/locales/en/settings/customization/page-appearance.json +++ b/public/locales/en/settings/customization/page-appearance.json @@ -14,5 +14,8 @@ "background": { "label": "Background", "placeholder": "/img/background.png" + }, + "buttons": { + "submit": "Submit" } } \ No newline at end of file diff --git a/public/locales/en/settings/general/config-changer.json b/public/locales/en/settings/general/config-changer.json index ea11d466c..6256754e4 100644 --- a/public/locales/en/settings/general/config-changer.json +++ b/public/locales/en/settings/general/config-changer.json @@ -30,6 +30,5 @@ } }, "saveCopy": "Save a copy" - }, - "configTip": "Upload your config file by dragging and dropping it onto the page!" + } } \ No newline at end of file diff --git a/src/components/AppShelf/AppShelfMenu.tsx b/src/components/AppShelf/AppShelfMenu.tsx index f1b3a20a1..7c0bac36c 100644 --- a/src/components/AppShelf/AppShelfMenu.tsx +++ b/src/components/AppShelf/AppShelfMenu.tsx @@ -2,6 +2,7 @@ import { ActionIcon, Menu, Modal, Text, useMantineTheme } from '@mantine/core'; import { showNotification } from '@mantine/notifications'; import { useState } from 'react'; import { IconCheck as Check, IconEdit as Edit, IconMenu, IconTrash as Trash } from '@tabler/icons'; +import { useTranslation } from 'next-i18next'; import { useConfig } from '../../tools/state'; import { serviceItem } from '../../tools/types'; import { AddAppShelfItemForm } from './AddAppShelfItem'; @@ -11,7 +12,7 @@ export default function AppShelfMenu(props: any) { const { service }: { service: serviceItem } = props; const { config, setConfig } = useConfig(); const { secondaryColor } = useColorTheme(); - const theme = useMantineTheme(); + const { t } = useTranslation('layout/app-shelf-menu'); const [opened, setOpened] = useState(false); return ( <> @@ -20,9 +21,9 @@ export default function AppShelfMenu(props: any) { radius="md" opened={props.opened || opened} onClose={() => setOpened(false)} - title="Modify a service" + title={t('modal.title')} > - + - Settings + {t('menu.labels.settings')} } onClick={() => setOpened(true)}> - Edit + {t('menu.actions.edit')} - Danger zone + {t('menu.labels.dangerZone')} { @@ -70,7 +71,7 @@ export default function AppShelfMenu(props: any) { }} icon={} > - Delete + {t('menu.actions.delete')} diff --git a/src/components/Settings/AppCardWidthSelector.tsx b/src/components/Settings/AppCardWidthSelector.tsx index 26b453cd3..a29ecc18a 100644 --- a/src/components/Settings/AppCardWidthSelector.tsx +++ b/src/components/Settings/AppCardWidthSelector.tsx @@ -1,9 +1,11 @@ import React from 'react'; import { Text, Slider, Stack } from '@mantine/core'; +import { useTranslation } from 'next-i18next'; import { useConfig } from '../../tools/state'; export function AppCardWidthSelector() { const { config, setConfig } = useConfig(); + const { t } = useTranslation('settings/customization/app-width'); const setappCardWidth = (appCardWidth: number) => { setConfig({ @@ -17,7 +19,7 @@ export function AppCardWidthSelector() { return ( - App Width + {t('label')} + {t('settings/common:tips.configTip')} ); } diff --git a/src/components/Settings/LanguageSwitch.tsx b/src/components/Settings/LanguageSwitch.tsx index a21e8e547..6acd18c10 100644 --- a/src/components/Settings/LanguageSwitch.tsx +++ b/src/components/Settings/LanguageSwitch.tsx @@ -4,29 +4,35 @@ import { IconLanguage } from '@tabler/icons'; import { forwardRef, useState } from 'react'; import { useTranslation } from 'next-i18next'; +import { useRouter } from 'next/router'; +import { getLanguageByCode, Language } from '../../languages/language'; export default function LanguageSwitch() { const { t, i18n } = useTranslation('settings/general/internationalization'); - /*const { language, languages, changeLanguage } = i18n; + const { changeLanguage } = i18n; - const [selectedLanguage, setSelectedLanguage] = useState(language); + const { locale, locales } = useRouter(); + const [selectedLanguage, setSelectedLanguage] = useState(locale); - const data = languages.map((language) => ({ - image: `https://countryflagsapi.com/png/${language.split('-').pop()}`, - label: 'JA', - value: language, - }));*/ + const data = locales + ? locales.map((localeItem) => ({ + value: localeItem, + label: getLanguageByCode(localeItem).originalName, + image: `imgs/flags/${localeItem}.png`, + language: getLanguageByCode(localeItem), + })) + : []; const onChangeSelect = (value: string) => { - //setSelectedLanguage(value); + setSelectedLanguage(value); - const languageName = 'JA IS HALZ SCHEISSE NE'; + const newLanguage = getLanguageByCode(value); - /*changeLanguage(value) + changeLanguage(value) .then(() => { showNotification({ title: 'Language changed', - message: `You changed the language to '${languageName}'`, + message: `You changed the language to '${newLanguage.originalName}'`, color: 'green', autoClose: 5000, }); @@ -34,31 +40,45 @@ export default function LanguageSwitch() { .catch((err) => { showNotification({ title: 'Failed to change language', - message: `Failed to change to '${languageName}', Error:'${err}`, + message: `Failed to change to '${newLanguage.originalName}', Error:'${err}`, color: 'red', autoClose: 5000, }); - });*/ + }); }; return (