added some more remaining translations

This commit is contained in:
Gamosoft 2025-12-16 11:27:54 +01:00
parent 2bbcbe21f0
commit 0957dfc6a4
7 changed files with 71 additions and 47 deletions

View File

@ -180,7 +180,7 @@ NoteDiscovery supports multiple languages through JSON locale files. Adding a ne
- **Be consistent** - Use the same terminology throughout - **Be consistent** - Use the same terminology throughout
- **Match the tone** - NoteDiscovery uses friendly, concise language - **Match the tone** - NoteDiscovery uses friendly, concise language
- **Preserve formatting** - Keep `\n` for newlines in multi-line strings - **Preserve formatting** - Keep `\n` for newlines in multi-line strings
- **Handle plurals simply** - We use `{{count}}` placeholders (e.g., "hace {{count}}m") - **Handle plurals simply** - It uses `{{count}}` placeholders (e.g., "hace {{count}}m")
- **Test date formats** - Dates are formatted using the browser's `Intl` API with your locale code - **Test date formats** - Dates are formatted using the browser's `Intl` API with your locale code
### What Gets Translated ### What Gets Translated
@ -198,26 +198,6 @@ NoteDiscovery supports multiple languages through JSON locale files. Adding a ne
- Keyboard shortcuts in tooltips: "Ctrl+Z", "Esc" - Keyboard shortcuts in tooltips: "Ctrl+Z", "Esc"
- File extensions: ".md", ".json" - File extensions: ".md", ".json"
### Locale File Structure
Translations are grouped by functionality:
```
common.* - Generic buttons (Save, Cancel, Delete)
sidebar.* - Sidebar panel labels and hints
editor.* - Editor placeholder, mode buttons, time strings
notes.* - Note-related prompts and errors
folders.* - Folder-related prompts and errors
toolbar.* - Toolbar button tooltips
zen_mode.* - Zen mode labels
tags.* - Tags panel
graph.* - Graph view labels
templates.* - Template modal
images.* - Image upload messages
search.* - Search navigation
settings.* - Settings panel labels (Theme, Language)
```
## 📚 Contributing Documentation ## 📚 Contributing Documentation
Documentation improvements are always welcome! Please: Documentation improvements are always welcome! Please:

View File

@ -1,5 +1,4 @@
# NoteDiscovery Configuration # NoteDiscovery Configuration
# Easy to rebrand: just change these values!
app: app:
name: "NoteDiscovery" name: "NoteDiscovery"

View File

@ -1634,20 +1634,20 @@
></div> ></div>
</div> </div>
</label> </label>
<p class="text-xs mt-1" style="color: var(--text-tertiary);">Colorize markdown syntax in editor</p> <p class="text-xs mt-1" style="color: var(--text-tertiary);" x-text="t('syntax_highlight.description')"></p>
</div> </div>
<!-- Logout (if auth enabled) - uses authEnabled from main app state --> <!-- Logout (if auth enabled) - uses authEnabled from main app state -->
<div x-show="authEnabled" class="mb-4"> <div x-show="authEnabled" class="mb-4">
<label class="block text-xs font-medium mb-2" style="color: var(--text-secondary);">Account</label> <label class="block text-xs font-medium mb-2" style="color: var(--text-secondary);" x-text="t('settings.account')"></label>
<a <a
href="/logout" href="/logout"
class="flex items-center justify-center gap-2 px-3 py-2 text-sm rounded transition-colors" class="flex items-center justify-center gap-2 px-3 py-2 text-sm rounded transition-colors"
style="background-color: var(--bg-primary); color: var(--text-primary); border: 1px solid var(--border-primary);" style="background-color: var(--bg-primary); color: var(--text-primary); border: 1px solid var(--border-primary);"
onmouseover="this.style.backgroundColor='var(--bg-hover)'" onmouseover="this.style.backgroundColor='var(--bg-hover)'"
onmouseout="this.style.backgroundColor='var(--bg-primary)'" onmouseout="this.style.backgroundColor='var(--bg-primary)'"
x-text="'🔒 ' + t('settings.logout')"
> >
🔒 Logout
</a> </a>
</div> </div>
</div> </div>
@ -1655,7 +1655,7 @@
<!-- Footer Info (inside scroll area) --> <!-- Footer Info (inside scroll area) -->
<div class="p-3 mt-4 border-t text-center" style="border-color: var(--border-primary);"> <div class="p-3 mt-4 border-t text-center" style="border-color: var(--border-primary);">
<div class="text-xs" style="color: var(--text-tertiary);"> <div class="text-xs" style="color: var(--text-tertiary);">
<span x-text="notes.length"></span> notes <span x-text="notes.length"></span> <span x-text="notes.length === 1 ? t('homepage.note_singular') : t('homepage.note_plural')"></span>
<span class="mx-1">·</span> <span class="mx-1">·</span>
<span x-text="'v' + appVersion"></span> <span x-text="'v' + appVersion"></span>
</div> </div>
@ -1744,8 +1744,8 @@
<svg class="mx-auto h-24 w-24 mb-4" style="color: var(--text-tertiary); opacity: 0.5;" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="mx-auto h-24 w-24 mb-4" style="color: var(--text-tertiary); opacity: 0.5;" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
</svg> </svg>
<h2 class="text-2xl font-bold mb-2" style="color: var(--text-primary);">No notes yet</h2> <h2 class="text-2xl font-bold mb-2" style="color: var(--text-primary);" x-text="t('homepage.no_notes_title')"></h2>
<p class="mb-6" style="color: var(--text-secondary);">Create your first note or folder</p> <p class="mb-6" style="color: var(--text-secondary);" x-text="t('homepage.no_notes_desc')"></p>
<button <button
@click="dropdownTargetFolder = selectedHomepageFolder; toggleNewDropdown($event)" @click="dropdownTargetFolder = selectedHomepageFolder; toggleNewDropdown($event)"
class="px-6 py-3 text-sm font-medium text-white rounded-lg transition-colors" class="px-6 py-3 text-sm font-medium text-white rounded-lg transition-colors"
@ -2509,19 +2509,18 @@
style="background-color: var(--bg-secondary); color: var(--text-primary);" style="background-color: var(--bg-secondary); color: var(--text-primary);"
@click.stop> @click.stop>
<h2 class="text-xl font-bold mb-4" style="color: var(--text-primary);">Create from Template</h2> <h2 class="text-xl font-bold mb-4" style="color: var(--text-primary);" x-text="t('templates.create_from_template')"></h2>
<!-- Template Selection --> <!-- Template Selection -->
<div class="mb-4"> <div class="mb-4">
<label class="block text-sm font-medium mb-2" style="color: var(--text-secondary);"> <label class="block text-sm font-medium mb-2" style="color: var(--text-secondary);" x-text="t('templates.select_template')">
Select Template
</label> </label>
<select <select
x-model="selectedTemplate" x-model="selectedTemplate"
class="w-full px-3 py-2 rounded border" class="w-full px-3 py-2 rounded border"
style="background-color: var(--bg-tertiary); color: var(--text-primary); border-color: var(--border-primary);" style="background-color: var(--bg-tertiary); color: var(--text-primary); border-color: var(--border-primary);"
> >
<option value="">-- Choose a template --</option> <option value="" x-text="'-- ' + t('templates.choose_template') + ' --'"></option>
<template x-for="template in availableTemplates" :key="template.name"> <template x-for="template in availableTemplates" :key="template.name">
<option :value="template.name" x-text="template.name"></option> <option :value="template.name" x-text="template.name"></option>
</template> </template>
@ -2530,8 +2529,7 @@
<!-- Note Name Input --> <!-- Note Name Input -->
<div class="mb-4"> <div class="mb-4">
<label class="block text-sm font-medium mb-2" style="color: var(--text-secondary);"> <label class="block text-sm font-medium mb-2" style="color: var(--text-secondary);" x-text="t('templates.note_name')">
Note Name
</label> </label>
<input <input
x-model="newTemplateNoteName" x-model="newTemplateNoteName"
@ -2545,7 +2543,7 @@
<!-- Info about placeholders --> <!-- Info about placeholders -->
<div class="mb-4 text-xs p-3 rounded" style="background-color: var(--bg-tertiary); color: var(--text-secondary);"> <div class="mb-4 text-xs p-3 rounded" style="background-color: var(--bg-tertiary); color: var(--text-secondary);">
<strong>Available placeholders:</strong><br> <strong x-text="t('templates.available_placeholders') + ':'"></strong><br>
<code style="font-family: monospace;">{{date}}</code>, <code style="font-family: monospace;">{{date}}</code>,
<code style="font-family: monospace;">{{time}}</code>, <code style="font-family: monospace;">{{time}}</code>,
<code style="font-family: monospace;">{{datetime}}</code>, <code style="font-family: monospace;">{{datetime}}</code>,
@ -2554,8 +2552,7 @@
</div> </div>
<!-- Empty state when no templates available --> <!-- Empty state when no templates available -->
<div x-show="availableTemplates.length === 0" class="mb-4 text-sm p-3 rounded" style="background-color: var(--bg-tertiary); color: var(--text-secondary);"> <div x-show="availableTemplates.length === 0" class="mb-4 text-sm p-3 rounded" style="background-color: var(--bg-tertiary); color: var(--text-secondary);" x-text="t('templates.no_templates')">
No templates found. Create templates in the <code style="font-family: monospace;">_templates</code> folder.
</div> </div>
<!-- Actions --> <!-- Actions -->
@ -2568,8 +2565,8 @@
:style="(!selectedTemplate || !newTemplateNoteName.trim() || availableTemplates.length === 0) ? 'opacity: 0.5; cursor: not-allowed;' : ''" :style="(!selectedTemplate || !newTemplateNoteName.trim() || availableTemplates.length === 0) ? 'opacity: 0.5; cursor: not-allowed;' : ''"
onmouseover="if(!this.disabled) this.style.backgroundColor='var(--accent-hover)'" onmouseover="if(!this.disabled) this.style.backgroundColor='var(--accent-hover)'"
onmouseout="if(!this.disabled) this.style.backgroundColor='var(--accent-primary)'" onmouseout="if(!this.disabled) this.style.backgroundColor='var(--accent-primary)'"
x-text="t('templates.create_note')"
> >
Create Note
</button> </button>
<button <button
@click="showTemplateModal = false; selectedTemplate = ''; newTemplateNoteName = ''" @click="showTemplateModal = false; selectedTemplate = ''; newTemplateNoteName = ''"
@ -2577,8 +2574,8 @@
style="background-color: var(--bg-tertiary); color: var(--text-primary);" style="background-color: var(--bg-tertiary); color: var(--text-primary);"
onmouseover="this.style.backgroundColor='var(--bg-hover)'" onmouseover="this.style.backgroundColor='var(--bg-hover)'"
onmouseout="this.style.backgroundColor='var(--bg-tertiary)'" onmouseout="this.style.backgroundColor='var(--bg-tertiary)'"
x-text="t('common.cancel')"
> >
Cancel
</button> </button>
</div> </div>
</div> </div>

View File

@ -139,8 +139,14 @@
"title": "Vorlagen", "title": "Vorlagen",
"select": "Vorlage auswählen...", "select": "Vorlage auswählen...",
"prompt_name": "Notizname eingeben:", "prompt_name": "Notizname eingeben:",
"no_templates": "Keine Vorlagen verfügbar", "no_templates": "Keine Vorlagen gefunden. Erstelle Vorlagen im _templates Ordner.",
"create_failed": "Erstellung der Notiz aus Vorlage fehlgeschlagen" "create_failed": "Erstellung der Notiz aus Vorlage fehlgeschlagen",
"create_from_template": "Aus Vorlage erstellen",
"select_template": "Vorlage auswählen",
"choose_template": "Vorlage wählen",
"note_name": "Notizname",
"available_placeholders": "Verfügbare Platzhalter",
"create_note": "Notiz erstellen"
}, },
"export": { "export": {
@ -184,10 +190,16 @@
"syntax_highlight": { "syntax_highlight": {
"title": "Editor-Syntaxhervorhebung", "title": "Editor-Syntaxhervorhebung",
"description": "Markdown-Syntax im Editor einfärben",
"enable": "Syntaxhervorhebung aktivieren", "enable": "Syntaxhervorhebung aktivieren",
"disable": "Syntaxhervorhebung deaktivieren" "disable": "Syntaxhervorhebung deaktivieren"
}, },
"settings": {
"account": "Konto",
"logout": "Abmelden"
},
"homepage": { "homepage": {
"title": "Startseite", "title": "Startseite",
"welcome": "Willkommen bei NoteDiscovery", "welcome": "Willkommen bei NoteDiscovery",

View File

@ -139,8 +139,14 @@
"title": "Templates", "title": "Templates",
"select": "Select a template...", "select": "Select a template...",
"prompt_name": "Enter note name:", "prompt_name": "Enter note name:",
"no_templates": "No templates available", "no_templates": "No templates found. Create templates in the _templates folder.",
"create_failed": "Failed to create note from template" "create_failed": "Failed to create note from template",
"create_from_template": "Create from Template",
"select_template": "Select Template",
"choose_template": "Choose a template",
"note_name": "Note Name",
"available_placeholders": "Available placeholders",
"create_note": "Create Note"
}, },
"export": { "export": {
@ -184,10 +190,16 @@
"syntax_highlight": { "syntax_highlight": {
"title": "Editor Syntax Highlight", "title": "Editor Syntax Highlight",
"description": "Colorize markdown syntax in editor",
"enable": "Enable syntax highlighting", "enable": "Enable syntax highlighting",
"disable": "Disable syntax highlighting" "disable": "Disable syntax highlighting"
}, },
"settings": {
"account": "Account",
"logout": "Logout"
},
"homepage": { "homepage": {
"title": "Home", "title": "Home",
"welcome": "Welcome to NoteDiscovery", "welcome": "Welcome to NoteDiscovery",

View File

@ -139,8 +139,14 @@
"title": "Plantillas", "title": "Plantillas",
"select": "Selecciona una plantilla...", "select": "Selecciona una plantilla...",
"prompt_name": "Introduce el nombre de la nota:", "prompt_name": "Introduce el nombre de la nota:",
"no_templates": "No hay plantillas disponibles", "no_templates": "No se encontraron plantillas. Crea plantillas en la carpeta _templates.",
"create_failed": "Error al crear nota desde plantilla" "create_failed": "Error al crear nota desde plantilla",
"create_from_template": "Crear desde Plantilla",
"select_template": "Seleccionar Plantilla",
"choose_template": "Elige una plantilla",
"note_name": "Nombre de la Nota",
"available_placeholders": "Marcadores disponibles",
"create_note": "Crear Nota"
}, },
"export": { "export": {
@ -184,10 +190,16 @@
"syntax_highlight": { "syntax_highlight": {
"title": "Resaltado de Sintaxis del Editor", "title": "Resaltado de Sintaxis del Editor",
"description": "Colorear sintaxis markdown en el editor",
"enable": "Activar resaltado de sintaxis", "enable": "Activar resaltado de sintaxis",
"disable": "Desactivar resaltado de sintaxis" "disable": "Desactivar resaltado de sintaxis"
}, },
"settings": {
"account": "Cuenta",
"logout": "Cerrar sesión"
},
"homepage": { "homepage": {
"title": "Inicio", "title": "Inicio",
"welcome": "Bienvenido a NoteDiscovery", "welcome": "Bienvenido a NoteDiscovery",

View File

@ -139,8 +139,14 @@
"title": "Modèles", "title": "Modèles",
"select": "Sélectionner un modèle...", "select": "Sélectionner un modèle...",
"prompt_name": "Entrez le nom de la note :", "prompt_name": "Entrez le nom de la note :",
"no_templates": "Aucun modèle disponible", "no_templates": "Aucun modèle trouvé. Créez des modèles dans le dossier _templates.",
"create_failed": "Échec de la création de la note depuis le modèle" "create_failed": "Échec de la création de la note depuis le modèle",
"create_from_template": "Créer depuis un Modèle",
"select_template": "Sélectionner un Modèle",
"choose_template": "Choisir un modèle",
"note_name": "Nom de la Note",
"available_placeholders": "Variables disponibles",
"create_note": "Créer la Note"
}, },
"export": { "export": {
@ -184,10 +190,16 @@
"syntax_highlight": { "syntax_highlight": {
"title": "Coloration Syntaxique de l'Éditeur", "title": "Coloration Syntaxique de l'Éditeur",
"description": "Coloriser la syntaxe markdown dans l'éditeur",
"enable": "Activer la coloration syntaxique", "enable": "Activer la coloration syntaxique",
"disable": "Désactiver la coloration syntaxique" "disable": "Désactiver la coloration syntaxique"
}, },
"settings": {
"account": "Compte",
"logout": "Déconnexion"
},
"homepage": { "homepage": {
"title": "Accueil", "title": "Accueil",
"welcome": "Bienvenue sur NoteDiscovery", "welcome": "Bienvenue sur NoteDiscovery",