feat: Add German, Spanish, and French translations and update i18n configuration.

This commit is contained in:
2025-12-26 15:29:02 +01:00
parent e44771902c
commit 23b3c5000f
8 changed files with 220 additions and 8 deletions

View File

@@ -9,7 +9,7 @@ i18next
.use(initReactI18next) .use(initReactI18next)
.init({ .init({
fallbackLng: "en", fallbackLng: "en",
supportedLngs: ["en", "pl"], supportedLngs: ["en", "pl", "es", "de", "fr"],
backend: { backend: {
loadPath: "/locales/{{lng}}/{{ns}}.json", loadPath: "/locales/{{lng}}/{{ns}}.json",
}, },

View File

@@ -3,7 +3,10 @@ import { defineConfig } from 'i18next-cli';
export default defineConfig({ export default defineConfig({
locales: [ locales: [
"en", "en",
"pl" "pl",
"es",
"de",
"fr"
], ],
extract: { extract: {
input: "src/**/*.{js,jsx,ts,tsx}", input: "src/**/*.{js,jsx,ts,tsx}",

View File

@@ -0,0 +1,65 @@
{
"{{count}} selected_one": "{{count}} ausgewählt",
"{{count}} selected_other": "{{count}} ausgewählt",
"Add a new note to your collection.": "Füge eine neue Notiz zu deiner Sammlung hinzu.",
"Archive": "Archiv",
"Archived {{count}} note_one": "{{count}} Notiz archiviert",
"Archived {{count}} note_other": "{{count}} Notizen archiviert",
"Are you sure you want to delete {{count}} note?_one": "Möchtest du wirklich {{count}} Notiz löschen?",
"Are you sure you want to delete {{count}} note?_other": "Möchtest du wirklich {{count}} Notizen löschen?",
"Are you sure?": "Bist du sicher?",
"Backend URL": "Backend-URL",
"Color": "Farbe",
"Configure the application settings.": "Konfiguriere die Anwendungseinstellungen.",
"Content": "Inhalt",
"Create": "Erstellen",
"Create Note": "Notiz erstellen",
"Data Management": "Datenverwaltung",
"Delete": "Löschen",
"Delete tag \"{{name}}\"? Notes will keep their content.": "Tag \"{{name}}\" löschen? Notizen behalten ihren Inhalt.",
"Deleted {{count}} note_one": "{{count}} Notiz gelöscht",
"Deleted {{count}} note_other": "{{count}} Notizen gelöscht",
"Edit Note": "Notiz bearbeiten",
"Export Data": "Daten exportieren",
"Export failed": "Export fehlgeschlagen",
"Export successful": "Export erfolgreich",
"Export your notes for backup or import from a JSON file.": "Exportiere deine Notizen für ein Backup oder importiere aus einer JSON-Datei.",
"Grid View": "Rasteransicht",
"History": "Verlauf",
"Import Data": "Daten importieren",
"Import failed": "Import fehlgeschlagen",
"Import successful. Reloading...": "Import erfolgreich. Wird neu geladen...",
"Invalid URL": "Ungültige URL",
"K-Notes": "K-Notes",
"Language": "Sprache",
"List View": "Listenansicht",
"New Note": "Neue Notiz",
"No archived notes yet": "Noch keine archivierten Notizen",
"No matching notes found": "Keine passenden Notizen gefunden",
"No notes with tag \"${activeTag}\"": "Keine Notizen mit Tag \"${activeTag}\"",
"No tags yet": "Noch keine Tags",
"Note content... Type / for commands": "Notizinhalt... Tippe / für Befehle",
"Note created": "Notiz erstellt",
"Note title": "Notiztitel",
"Note updated": "Notiz aktualisiert",
"Notes": "Notizen",
"Others": "Andere",
"Pin this note": "Diese Notiz anheften",
"Pinned": "Angeheftet",
"Rename": "Umbenennen",
"Save changes": "Änderungen speichern",
"Saving...": "Speichern...",
"Search your notes...": "Durchsuche deine Notizen...",
"Settings": "Einstellungen",
"Settings saved. Please refresh the page.": "Einstellungen gespeichert. Bitte aktualisiere die Seite.",
"Tag deleted": "Tag gelöscht",
"Tag renamed": "Tag umbenannt",
"Tags": "Tags",
"Tags (comma separated)": "Tags (durch Kommas getrennt)",
"Title": "Titel",
"Title is required": "Titel ist erforderlich",
"Title too long": "Titel zu lang",
"Update": "Aktualisieren",
"work, todo, ideas": "Arbeit, Aufgaben, Ideen",
"Your notes will appear here. Click + to create one.": "Deine Notizen werden hier erscheinen. Klicke +, um eine zu erstellen."
}

View File

@@ -47,7 +47,13 @@
"Pinned": "Pinned", "Pinned": "Pinned",
"Rename": "Rename", "Rename": "Rename",
"Save changes": "Save changes", "Save changes": "Save changes",
"Saving...": "Saving...", "Saving": {
"": {
"": {
"": "Saving..."
}
}
},
"Search your notes...": "Search your notes...", "Search your notes...": "Search your notes...",
"Settings": "Settings", "Settings": "Settings",
"Settings saved. Please refresh the page.": "Settings saved. Please refresh the page.", "Settings saved. Please refresh the page.": "Settings saved. Please refresh the page.",

View File

@@ -0,0 +1,65 @@
{
"{{count}} selected_one": "{{count}} seleccionado",
"{{count}} selected_other": "{{count}} seleccionados",
"Add a new note to your collection.": "Añade una nueva nota a tu colección.",
"Archive": "Archivar",
"Archived {{count}} note_one": "{{count}} nota archivada",
"Archived {{count}} note_other": "{{count}} notas archivadas",
"Are you sure you want to delete {{count}} note?_one": "¿Estás seguro de que quieres eliminar {{count}} nota?",
"Are you sure you want to delete {{count}} note?_other": "¿Estás seguro de que quieres eliminar {{count}} notas?",
"Are you sure?": "¿Estás seguro?",
"Backend URL": "URL del backend",
"Color": "Color",
"Configure the application settings.": "Configura los ajustes de la aplicación.",
"Content": "Contenido",
"Create": "Crear",
"Create Note": "Crear nota",
"Data Management": "Gestión de datos",
"Delete": "Eliminar",
"Delete tag \"{{name}}\"? Notes will keep their content.": "¿Eliminar etiqueta \"{{name}}\"? Las notas conservarán su contenido.",
"Deleted {{count}} note_one": "{{count}} nota eliminada",
"Deleted {{count}} note_other": "{{count}} notas eliminadas",
"Edit Note": "Editar nota",
"Export Data": "Exportar datos",
"Export failed": "Exportación fallida",
"Export successful": "Exportación exitosa",
"Export your notes for backup or import from a JSON file.": "Exporta tus notas para hacer una copia de seguridad o importa desde un archivo JSON.",
"Grid View": "Vista de cuadrícula",
"History": "Historial",
"Import Data": "Importar datos",
"Import failed": "Importación fallida",
"Import successful. Reloading...": "Importación exitosa. Recargando...",
"Invalid URL": "URL inválida",
"K-Notes": "K-Notes",
"Language": "Idioma",
"List View": "Vista de lista",
"New Note": "Nueva nota",
"No archived notes yet": "Aún no hay notas archivadas",
"No matching notes found": "No se encontraron notas coincidentes",
"No notes with tag \"${activeTag}\"": "No hay notas con la etiqueta \"${activeTag}\"",
"No tags yet": "Aún no hay etiquetas",
"Note content... Type / for commands": "Contenido de la nota... Escribe / para ver comandos",
"Note created": "Nota creada",
"Note title": "Título de la nota",
"Note updated": "Nota actualizada",
"Notes": "Notas",
"Others": "Otros",
"Pin this note": "Fijar esta nota",
"Pinned": "Fijadas",
"Rename": "Renombrar",
"Save changes": "Guardar cambios",
"Saving...": "Guardando...",
"Search your notes...": "Busca tus notas...",
"Settings": "Configuración",
"Settings saved. Please refresh the page.": "Configuración guardada. Por favor, actualiza la página.",
"Tag deleted": "Etiqueta eliminada",
"Tag renamed": "Etiqueta renombrada",
"Tags": "Etiquetas",
"Tags (comma separated)": "Etiquetas (separadas por comas)",
"Title": "Título",
"Title is required": "El título es obligatorio",
"Title too long": "Título demasiado largo",
"Update": "Actualizar",
"work, todo, ideas": "trabajo, tareas, ideas",
"Your notes will appear here. Click + to create one.": "Tus notas aparecerán aquí. Haz clic en + para crear una."
}

View File

@@ -0,0 +1,65 @@
{
"{{count}} selected_one": "{{count}} sélectionné",
"{{count}} selected_other": "{{count}} sélectionnés",
"Add a new note to your collection.": "Ajoute une nouvelle note à ta collection.",
"Archive": "Archive",
"Archived {{count}} note_one": "{{count}} note archivée",
"Archived {{count}} note_other": "{{count}} notes archivées",
"Are you sure you want to delete {{count}} note?_one": "Es-tu sûr de vouloir supprimer {{count}} note ?",
"Are you sure you want to delete {{count}} note?_other": "Es-tu sûr de vouloir supprimer {{count}} notes ?",
"Are you sure?": "Es-tu sûr ?",
"Backend URL": "URL du backend",
"Color": "Couleur",
"Configure the application settings.": "Configure les paramètres de l'application.",
"Content": "Contenu",
"Create": "Créer",
"Create Note": "Créer une note",
"Data Management": "Gestion des données",
"Delete": "Supprimer",
"Delete tag \"{{name}}\"? Notes will keep their content.": "Supprimer l'étiquette \"{{name}}\" ? Les notes conserveront leur contenu.",
"Deleted {{count}} note_one": "{{count}} note supprimée",
"Deleted {{count}} note_other": "{{count}} notes supprimées",
"Edit Note": "Modifier la note",
"Export Data": "Exporter les données",
"Export failed": "Échec de l'exportation",
"Export successful": "Exportation réussie",
"Export your notes for backup or import from a JSON file.": "Exporte tes notes pour une sauvegarde ou importe depuis un fichier JSON.",
"Grid View": "Vue en grille",
"History": "Historique",
"Import Data": "Importer les données",
"Import failed": "Échec de l'importation",
"Import successful. Reloading...": "Importation réussie. Rechargement...",
"Invalid URL": "URL invalide",
"K-Notes": "K-Notes",
"Language": "Langue",
"List View": "Vue en liste",
"New Note": "Nouvelle note",
"No archived notes yet": "Pas encore de notes archivées",
"No matching notes found": "Aucune note correspondante trouvée",
"No notes with tag \"${activeTag}\"": "Aucune note avec l'étiquette \"${activeTag}\"",
"No tags yet": "Pas encore d'étiquettes",
"Note content... Type / for commands": "Contenu de la note... Tape / pour les commandes",
"Note created": "Note créée",
"Note title": "Titre de la note",
"Note updated": "Note mise à jour",
"Notes": "Notes",
"Others": "Autres",
"Pin this note": "Épingler cette note",
"Pinned": "Épinglées",
"Rename": "Renommer",
"Save changes": "Enregistrer les modifications",
"Saving...": "Enregistrement...",
"Search your notes...": "Recherche dans tes notes...",
"Settings": "Paramètres",
"Settings saved. Please refresh the page.": "Paramètres enregistrés. Veuillez actualiser la page.",
"Tag deleted": "Étiquette supprimée",
"Tag renamed": "Étiquette renommée",
"Tags": "Étiquettes",
"Tags (comma separated)": "Étiquettes (séparées par des virgules)",
"Title": "Titre",
"Title is required": "Le titre est requis",
"Title too long": "Titre trop long",
"Update": "Mettre à jour",
"work, todo, ideas": "travail, tâches, idées",
"Your notes will appear here. Click + to create one.": "Tes notes apparaîtront ici. Clique sur + pour en créer une."
}

View File

@@ -50,13 +50,18 @@
"Note created": "Notatka utworzona", "Note created": "Notatka utworzona",
"Note title": "Tytuł notatki", "Note title": "Tytuł notatki",
"Note updated": "Notatka zaktualizowana", "Note updated": "Notatka zaktualizowana",
"Notes": "Notatki",
"Others": "Inne", "Others": "Inne",
"Pin this note": "Przypnij tę notatkę", "Pin this note": "Przypnij tę notatkę",
"Pinned": "Przypięte", "Pinned": "Przypięte",
"Rename": "Zmień nazwę", "Rename": "Zmień nazwę",
"Save changes": "Zapisz zmiany", "Save changes": "Zapisz zmiany",
"Saving...": "Zapisywanie...", "Saving": {
"": {
"": {
"": ""
}
}
},
"Search your notes...": "Szukaj swoich notatek...", "Search your notes...": "Szukaj swoich notatek...",
"Settings": "Ustawienia", "Settings": "Ustawienia",
"Settings saved. Please refresh the page.": "Ustawienia zapisane. Odśwież stronę.", "Settings saved. Please refresh the page.": "Ustawienia zapisane. Odśwież stronę.",

View File

@@ -6,6 +6,9 @@ import { Languages } from "lucide-react";
const LANGUAGES = [ const LANGUAGES = [
{ code: "en", label: "English" }, { code: "en", label: "English" },
{ code: "pl", label: "Polski" }, { code: "pl", label: "Polski" },
{ code: "es", label: "Español" },
{ code: "de", label: "Deutsch" },
{ code: "fr", label: "Français" },
]; ];
export function LanguageSwitcher() { export function LanguageSwitcher() {
@@ -22,7 +25,7 @@ export function LanguageSwitcher() {
<Languages className="h-4 w-4" /> <Languages className="h-4 w-4" />
{t("Language")} {t("Language")}
</Label> </Label>
<div className="col-span-3 flex gap-2"> <div className="col-span-3 flex gap-2 flex-wrap">
{LANGUAGES.map((lang) => ( {LANGUAGES.map((lang) => (
<Button <Button
key={lang.code} key={lang.code}