From 8a01d5905f36c8b9979e0fead19fd8909f2096c7 Mon Sep 17 00:00:00 2001 From: Vulcanraven <11424186+Vulcanraven91@users.noreply.github.com> Date: Fri, 2 Jun 2023 13:47:20 +0200 Subject: [PATCH] Added support for the 'de-DE' language variant (informal) (#1008) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds support for the German language variant 'de-DE' in the application. The following changes were made: Created the '/public/locales/de-DE/common.json' file for the 'de-DE' language Modified the 'SwitchLang.tsx' component to include the 'de-DE' language option Updated the 'localeText' function to display ' Deutsch' for 'de-DE' These changes enable the application to provide localization in German for the informal 'de-DE' language variant. The newly created '/public/locales/de-DE/common.json' file contains the necessary translations for the German language. The 'SwitchLang.tsx' component has been updated to include the German language option ('de-DE') with the appropriate flag and language name. Users can now select the informal German language ('de-DE') to interact with the application. Co-authored-by: 🍌🐒 --- next-i18next.config.js | 2 +- public/locales/de-DE/common.json | 122 +++++++++++++++++++++++++++++++ src/components/SwitchLang.tsx | 2 + 3 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 public/locales/de-DE/common.json diff --git a/next-i18next.config.js b/next-i18next.config.js index 3cd8bc7..9eda059 100644 --- a/next-i18next.config.js +++ b/next-i18next.config.js @@ -3,7 +3,7 @@ const path = require('path') module.exports = { i18n: { defaultLocale: 'en', - locales: ['en', 'es', 'zh-CN', 'hi', 'id', 'tr-TR', 'zh-TW'] + locales: ['de-DE', 'en', 'es', 'zh-CN', 'hi', 'id', 'tr-TR', 'zh-TW'] }, localePath: path.resolve('public/locales'), reloadOnPrerender: process.env.NODE_ENV === 'development', diff --git a/public/locales/de-DE/common.json b/public/locales/de-DE/common.json new file mode 100644 index 0000000..76c0df0 --- /dev/null +++ b/public/locales/de-DE/common.json @@ -0,0 +1,122 @@ +{ + "- showing {{count}} page(s) ——one": "- zeigt {{count}} Seite", + "- showing {{count}} page(s) ——other": "- zeigt {{count}} Seiten", + "{{count}} item(s)——one": "{{count}} Element", + "{{count}} item(s)——other": "{{count}} Elemente", + "<0> If you are not the owner of this website, stop now, as continuing with this process may expose your personal files in OneDrive.": "<0> Wenn du nicht der Besitzer dieser Website bist, stoppe jetzt, da das Fortsetzen dieses Prozesses deine persönlichen Dateien in OneDrive offenlegen könnte.", + "<0> If you have not specified a REDIS_URL inside your Vercel env variable, go initialise one at <3>Upstash. Docs: <6>Vercel Integration - Upstash.": "<0> Wenn du keine REDIS_URL in deiner Vercel env Variable angegeben hast, gehe zu <3>Upstash und initialisiere eine. Doku: <6>Vercel Integration - Upstash.", + "<0> If you see anything missing or incorrect, you need to reconfigure <3>/config/api.config.js and redeploy this instance.": "<0> Wenn du etwas vermisst oder falsch siehst, musst du <3>/config/api.config.js neu konfigurieren und diese Instanz neu bereitstellen.", + "✅ You can now proceed onto the next step: requesting your access token and refresh token.": "✅ Du kannst nun zum nĂ€chsten Schritt ĂŒbergehen: Fordere dein Access-Token und Refresh-Token an.", + "❌ No valid code extracted.": "❌ Kein gĂŒltiger Code extrahiert.", + "Acquired access_token: ": "Erworbenes access_token: ", + "Acquired refresh_token: ": "Erworbenes refresh_token: ", + "Actions": "Aktionen", + "Authorisation is required as no valid <2>access_token or <5>refresh_token is present on this deployed instance. Check the following configurations before proceeding with authorising onedrive-vercel-index with your own Microsoft account.": "Eine Autorisierung ist erforderlich, da kein gĂŒltiges <2>access_token oder <5>refresh_token auf dieser bereitgestellten Instanz vorhanden ist. PrĂŒfe die folgenden Konfigurationen, bevor du mit der Autorisierung von onedrive-vercel-index mit deinem eigenen Microsoft-Konto fortfĂ€hrst.", + "Cancel": "Abbrechen", + "Cannot preview {{path}}": "{{path}} kann nicht angezeigt werden", + "Change the raw file direct link to a URL ending with the extension of the file.": "Ändere den direkten Link zur rohen Datei in eine URL, die mit der Dateierweiterung endet.", + "Check out <2>Microsoft's official explanation on the error message.": "Sieh dir <2>Microsofts offizielle ErklĂ€rung zur Fehlermeldung an.", + "Clear all": "Alles entfernen", + "Clear all tokens?": "Alle Tokens löschen?", + "Cleared all tokens": "Alle Tokens gelöscht", + "clearing them means that you will need to re-enter the passwords again.": "Wenn du sie löschst, musst du die Passwörter erneut eingeben.", + "Copied direct link to clipboard.": "Direkten Link in die Zwischenablage kopiert.", + "Copied folder permalink.": "Permalink des Ordners kopiert.", + "Copied raw file permalink.": "Permalink der Rohdatei kopiert.", + "Copy direct link": "Direkten Link kopieren", + "Copy folder permalink": "Permalink des Ordners kopieren", + "Copy raw file permalink": "Permalink der Rohdatei kopieren", + "Copy the permalink to the file to the clipboard": "Kopiere den Permalink der Datei in die Zwischenablage", + "Customise direct link": "Direkten Link anpassen", + "Customise link": "Link anpassen", + "Customised": "Angepasst", + "Customised and encoded": "Angepasst und codiert", + "Copy selected files permalink": "Permalink der ausgewĂ€hlten Dateien kopieren", + "Copied selected files permalink.": "Permalink der ausgewĂ€hlten Dateien kopiert.", + "Default": "Standard", + "Do not pretend to be the site owner": "Gib dich nicht als der Seitenbesitzer aus", + "Don't worry, after storing them, onedrive-vercel-index will take care of token refreshes and updates after your site goes live.": "Keine Sorge, nachdem sie gespeichert sind, kĂŒmmert sich onedrive-vercel-index um Token-Aktualisierungen und Updates, nachdem deine Seite live geht.", + "Download": "Herunterladen", + "Download file": "Datei herunterladen", + "Download folder": "Ordner herunterladen", + "Download selected files": "AusgewĂ€hlte Dateien herunterladen", + "Download the file directly through OneDrive": "Die Datei direkt ĂŒber OneDrive herunterladen", + "Downloading {{progress}}%": "Herunterladen {{progress}}%", + "Downloading folder, refresh page to cancel": "Ordner wird heruntergeladen, Seite aktualisieren zum Abbrechen", + "Downloading selected files, refresh page to cancel": "AusgewĂ€hlte Dateien werden heruntergeladen, Seite aktualisieren zum Abbrechen", + "Downloading selected files...": "AusgewĂ€hlte Dateien werden heruntergeladen...", + "Email": "E-Mail", + "Enter Password": "Passwort eingeben", + "Error storing the token": "Fehler beim Speichern des Tokens", + "Error validating identify, restart": "Fehler bei der Validierung der IdentitĂ€t, Neustart", + "Error: {{message}}": "Fehler: {{message}}", + "Failed to download folder {{path}}: {{status}} {{message}} Skipped it to continue.": "Fehler beim Herunterladen des Ordners {{path}}: {{status}} {{message}} Fortgesetzt, um fortzufahren.", + "Failed to download folder.": "Fehler beim Herunterladen des Ordners.", + "Failed to download selected files.": "Fehler beim Herunterladen der ausgewĂ€hlten Dateien.", + "File is empty.": "Datei ist leer.", + "File size": "DateigrĂ¶ĂŸe", + "Filename": "Dateiname", + "Final step, click the button below to store these tokens persistently before they expire after {{minutes}} minutes {{seconds}} seconds. ": "Letzter Schritt, klick auf den Button unten, um diese Tokens dauerhaft zu speichern, bevor sie nach {{minutes}} Minuten und {{seconds}} Sekunden ablaufen.", + "Finished downloading folder.": "Ordner-Download abgeschlossen.", + "Finished downloading selected files.": "AusgewĂ€hlte Dateien erfolgreich heruntergeladen.", + "Get tokens": "Tokens abrufen", + "Grid": "Gitter", + "Hashes": "Hashes", + "Home": "Start", + "If you go back home and still see the welcome page telling you to re-authenticate, ": "Falls du zurĂŒck zum Start gehst und immer noch die Willkommensseite siehst, die dir sagt, du sollst dich neu authentifizieren, ", + "If you know the password, please enter it below.": "Wenn du das Passwort kennst, gib es bitte unten ein.", + "Last modified": "Zuletzt geĂ€ndert", + "Last Modified": "Zuletzt geĂ€ndert", + "Last modified:": "Zuletzt geĂ€ndert:", + "List": "Liste", + "Load more": "Mehr laden", + "Loading ...": "Laden ...", + "Loading EPUB ...": "Lade EPUB ...", + "Loading file content...": "Dateiinhalt wird geladen...", + "Loading FLV extension...": "Lade FLV-Erweiterung...", + "Logout": "Ausloggen", + "MIME type": "MIME-Typ", + "Name": "Name", + "No more files": "Keine weiteren Dateien", + "Nothing here.": "Nichts zu sehen hier.", + "OAuth Step 1 - {{title}}": "OAuth Schritt 1 - {{title}}", + "OAuth Step 2 - {{title}}": "OAuth Schritt 2 - {{title}}", + "OAuth Step 3 - {{title}}": "OAuth Schritt 3 - {{title}}", + "of {{count}} file(s) -——loaded——one": "{{count}} Datei geladen -", + "of {{count}} file(s) -——loaded——other": "{{count}} Dateien geladen -", + "of {{count}} file(s) -——loading——one": "... Datei wird geladen -", + "of {{count}} file(s) -——loading——other": "... Dateien werden geladen -", + "Oops, that's a <1>four-oh-four.": "Ups, das ist ein <1>vier-null-vier.", + "Open URL": "URL öffnen", + "Open URL{{url}}": "URL öffnen{{url}}", + "Press <2>F12 and open devtools for more details, or seek help at <6>onedrive-vercel-index discussions.": "DrĂŒcke <2>F12 und öffne die Entwicklertools fĂŒr mehr Details, oder such Hilfe in den <6>onedrive-vercel-index Diskussionen.", + "Proceed to OAuth": "Weiter zu OAuth", + "Requesting tokens": "Tokens anfordern", + "Restart": "Neustart", + "revisit home and do a hard refresh.": "geh zurĂŒck zur Startseite und mach einen harten Refresh.", + "Search ...": "Suche ...", + "Select all files": "Alle Dateien auswĂ€hlen", + "Select file": "Eine Datei auswĂ€hlen", + "Select files": "Dateien auswĂ€hlen", + "Size": "GrĂ¶ĂŸe", + "Step 1/3: Preparations": "Schritt 1/3: Vorbereitungen", + "Step 2/3: Get authorisation code": "Schritt 2/3: Autorisierungscode erhalten", + "Step 3/3: Get access and refresh tokens": "Schritt 3/3: Zugriffs- und Aktualisierungstokens erhalten", + "Store tokens": "Tokens speichern", + "Stored! Going home...": "Gespeichert! ZurĂŒck zur Startseite...", + "Storing tokens": "Tokens speichern", + "Success! The API returned what we needed.": "Erfolg! Die API hat geliefert, was wir brauchten.", + "The authorisation code extracted is:": "Der extrahierte Autorisierungscode ist:", + "The OAuth link for getting the authorisation code has been created. Click on the link above to get the <2>authorisation code. Your browser willopen a new tab to Microsoft's account login page. After logging in and authenticating with your Microsoft account, you will be redirected to a blank page on localhost. Paste <6>the entire redirected URL down below.": "Der OAuth-Link zum Erhalten des Autorisierungscodes wurde erstellt. Klicke auf den Link oben, um den <2>Autorisierungscode zu bekommen. Dein Browser wird einen neuen Tab zur Microsoft-Account-Anmeldeseite öffnen. Nach dem Einloggen und Authentifizieren mit deinem Microsoft-Konto wirst du auf eine leere Seite auf localhost weitergeleitet. FĂŒge die <6>gesamte umgeleitete URL unten ein.", + "These tokens are used to authenticate yourself into password protected folders, ": "Diese Tokens werden verwendet, um dich in passwortgeschĂŒtzte Ordner zu authentifizieren, ", + "These tokens may take a few seconds to populate after you click the button below. ": "Es kann ein paar Sekunden dauern, bis diese Tokens nach dem Klicken auf den Button unten angezeigt werden. ", + "This route (the folder itself and the files inside) is password protected. ": "Dieser Pfad (der Ordner selbst und die Dateien darin) ist passwortgeschĂŒtzt. ", + "Unavailable": "Nicht verfĂŒgbar", + "URL encoded": "URL kodiert", + "Waiting for code...": "Warte auf Code...", + "Weibo": "Weibo", + "Welcome to your new onedrive-vercel-index 🎉": "Willkommen bei deinem neuen Onedrive-vercel-index 🎉", + "What is this?": "Was ist das?", + "Where is the auth code? Did you follow step 2 you silly donut?": "Wo ist der Auth-Code? Hast du Schritt 2 befolgt, du alberner Donut?", + "Whoops, looks like we got a problem: {{error}}.": "Ups, sieht aus als hĂ€tten wir ein Problem: {{error}}." +} \ No newline at end of file diff --git a/src/components/SwitchLang.tsx b/src/components/SwitchLang.tsx index 460a931..2c472f8 100644 --- a/src/components/SwitchLang.tsx +++ b/src/components/SwitchLang.tsx @@ -17,6 +17,8 @@ const CustomLink = ({ href, children, as, locale, ...props }): JSX.Element => { const localeText = (locale: string): string => { switch (locale) { + case 'de-DE': + return 'đŸ‡©đŸ‡Ș Deutsch' case 'en': return '🇬🇧 English' case 'es':