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

Commit

Permalink
Added support for the 'de-DE' language variant (informal) (spencerwoo…
Browse files Browse the repository at this point in the history
…o#1008)

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: 🍌🐒 <[email protected]>
  • Loading branch information
Vulcanraven91 and Vulcanraven91 authored Jun 2, 2023
1 parent 5379808 commit 8a01d59
Show file tree
Hide file tree
Showing 3 changed files with 125 additions and 1 deletion.
2 changes: 1 addition & 1 deletion next-i18next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
122 changes: 122 additions & 0 deletions public/locales/de-DE/common.json
Original file line number Diff line number Diff line change
@@ -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></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></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></0> If you have not specified a REDIS_URL inside your Vercel env variable, go initialise one at <3>Upstash</3>. Docs: <6>Vercel Integration - Upstash</6>.": "<0></0> Wenn du keine REDIS_URL in deiner Vercel env Variable angegeben hast, gehe zu <3>Upstash</3> und initialisiere eine. Doku: <6>Vercel Integration - Upstash</6>.",
"<0></0> If you see anything missing or incorrect, you need to reconfigure <3>/config/api.config.js</3> and redeploy this instance.": "<0></0> Wenn du etwas vermisst oder falsch siehst, musst du <3>/config/api.config.js</3> 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</2> or <5>refresh_token</5> 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</2> oder <5>refresh_token</5> 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</2> on the error message.": "Sieh dir <2>Microsofts offizielle Erklärung</2> 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</1>.": "Ups, das ist ein <1>vier-null-vier</1>.",
"Open URL": "URL öffnen",
"Open URL{{url}}": "URL öffnen{{url}}",
"Press <2>F12</2> and open devtools for more details, or seek help at <6>onedrive-vercel-index discussions</6>.": "Drücke <2>F12</2> und öffne die Entwicklertools für mehr Details, oder such Hilfe in den <6>onedrive-vercel-index Diskussionen</6>.",
"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</2>. 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</6> down below.": "Der OAuth-Link zum Erhalten des Autorisierungscodes wurde erstellt. Klicke auf den Link oben, um den <2>Autorisierungscode</2> 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</6> 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}}."
}
2 changes: 2 additions & 0 deletions src/components/SwitchLang.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit 8a01d59

Please sign in to comment.