diff --git a/frontend/messages/en.json b/frontend/messages/en.json index 0a719ccf..9ce878d0 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -2008,6 +2008,87 @@ "maint_desc": "MODULE NOT YET AVAILABLE!", "maint_back": "Back to Home", "sub_manifest": "Export manifests management", - "title_invoice_report": "Invoice Report" + "title_invoice_report": "Invoice Report", + "title_help_library": "Knowledge Library", + "sub_help": "System Manuals, Guides and Documentation.", + "new_chapter": "New Chapter", + "help_search_ph": "Search the library...", + "help_empty": "The library is empty.", + "help_format": "Format", + "help_unknown": "Unknown", + "help_size": "Size", + "help_watch": "Watch", + "help_read": "Read", + "help_open": "Open", + "help_delete_title": "Delete chapter?", + "help_delete_desc": "\"{title}\" will be permanently deleted.", + "help_toast_load_error": "Error loading articles", + "help_toast_deleted": "Chapter deleted", + "help_toast_error": "Error", + "help_back_library": "Back to Library", + "help_chapter_load_error": "Error loading chapter", + "help_pdf_document": "PDF Document", + "help_open_tab": "Open in tab", + "help_download": "Download", + "help_video_unsupported": "Your browser does not support videos.", + "help_file_info": "File information", + "help_file_download": "File to download", + "help_no_preview": "This file has no direct preview.", + "help_download_now": "Download now", + "help_in_chapter": "In this chapter", + "btn_cancel": "Cancel", + "btn_delete": "Delete", + "btn_edit": "Edit", + "btn_save": "Save", + "help_toast_article_load_error": "Error loading article", + "help_toast_chapter_created": "Chapter created", + "help_toast_changes_saved": "Changes saved", + "help_toast_save_error": "Error saving", + "help_toast_uploading_image": "Uploading image...", + "help_toast_image_inserted": "Image inserted", + "help_toast_upload_error": "Error uploading", + "help_toast_uploading_file": "Uploading {name}...", + "help_untitled": "Untitled", + "help_toast_file_uploaded": "File uploaded successfully", + "help_toast_file_upload_error": "Error uploading file", + "help_back": "Back", + "help_hide_preview": "Hide Preview", + "help_show_preview": "Show Preview", + "help_config": "Settings", + "help_field_title": "Title", + "help_ph_title": "E.g.: Introduction", + "help_field_slug": "Identifier (Slug)", + "help_ph_slug": "eg-article-title", + "help_slug_hint": "Auto-generated from the title if left empty.", + "help_field_type": "Content Type", + "help_type_article": "Article (Markdown)", + "help_type_document": "Other Document", + "help_advanced": "Advanced Options", + "help_field_category": "Category", + "help_ph_category": "E.g.: General", + "help_field_order": "Order", + "help_field_context": "Context Path", + "help_ph_context": "E.g.: /dashboard/...", + "help_context_hint": "URL where this article will appear.", + "help_field_tags": "Tags", + "help_ph_tags": "E.g.: invoices, scrap", + "help_bold": "Bold", + "help_italic": "Italic", + "help_h1": "Heading 1", + "help_h2": "Heading 2", + "help_list": "List", + "help_link": "Link", + "help_upload_image": "Upload Image", + "help_ph_content": "# Start writing here...", + "help_drag_images": "Drag images here", + "help_config_pdf": "PDF Settings", + "help_config_video": "Video Settings", + "help_config_document": "Document Settings", + "help_upload_hint": "Upload the file you want to associate with this title.", + "help_file_loaded": "File Loaded", + "help_view_file": "View File", + "help_change_file": "Change File", + "help_select_file": "Select a file", + "help_drag_drop": "Or drag and drop here" } } diff --git a/frontend/messages/es.json b/frontend/messages/es.json index f99f2156..64cc299f 100644 --- a/frontend/messages/es.json +++ b/frontend/messages/es.json @@ -2008,6 +2008,87 @@ "maint_desc": "¡MÓDULO AÚN NO DISPONIBLE!", "maint_back": "Volver al Inicio", "sub_manifest": "Gestión de manifiestos de exportación", - "title_invoice_report": "Reporte de Facturas" + "title_invoice_report": "Reporte de Facturas", + "title_help_library": "Biblioteca de Conocimiento", + "sub_help": "Manuales, Guías y Documentación del Sistema.", + "new_chapter": "Nuevo Capítulo", + "help_search_ph": "Buscar en la biblioteca...", + "help_empty": "La biblioteca está vacía.", + "help_format": "Formato", + "help_unknown": "Desconocido", + "help_size": "Tamaño", + "help_watch": "Ver", + "help_read": "Leer", + "help_open": "Abrir", + "help_delete_title": "¿Eliminar capítulo?", + "help_delete_desc": "Se eliminará permanentemente \"{title}\".", + "help_toast_load_error": "Error al cargar artículos", + "help_toast_deleted": "Capítulo eliminado", + "help_toast_error": "Error", + "help_back_library": "Volver a la Biblioteca", + "help_chapter_load_error": "Error al cargar el capítulo", + "help_pdf_document": "Documento PDF", + "help_open_tab": "Abrir en pestaña", + "help_download": "Descargar", + "help_video_unsupported": "Tu navegador no soporta videos.", + "help_file_info": "Información del archivo", + "help_file_download": "Archivo para descargar", + "help_no_preview": "Este archivo no tiene vista previa directa.", + "help_download_now": "Descargar ahora", + "help_in_chapter": "En este capítulo", + "btn_cancel": "Cancelar", + "btn_delete": "Eliminar", + "btn_edit": "Editar", + "btn_save": "Guardar", + "help_toast_article_load_error": "Error al cargar artículo", + "help_toast_chapter_created": "Capítulo creado", + "help_toast_changes_saved": "Cambios guardados", + "help_toast_save_error": "Error al guardar", + "help_toast_uploading_image": "Subiendo imagen...", + "help_toast_image_inserted": "Imagen insertada", + "help_toast_upload_error": "Error al subir", + "help_toast_uploading_file": "Subiendo {name}...", + "help_untitled": "Sin Título", + "help_toast_file_uploaded": "Archivo subido correctamente", + "help_toast_file_upload_error": "Error al subir archivo", + "help_back": "Volver", + "help_hide_preview": "Ocultar Vista Previa", + "help_show_preview": "Ver Vista Previa", + "help_config": "Configuración", + "help_field_title": "Título", + "help_ph_title": "Ej: Introducción", + "help_field_slug": "Identificador (Slug)", + "help_ph_slug": "ej-titulo-articulo", + "help_slug_hint": "Se autogenera del título si se deja vacío.", + "help_field_type": "Tipo de Contenido", + "help_type_article": "Artículo (Markdown)", + "help_type_document": "Otro Documento", + "help_advanced": "Opciones Avanzadas", + "help_field_category": "Categoría", + "help_ph_category": "Ej: General", + "help_field_order": "Orden", + "help_field_context": "Ruta Contextual", + "help_ph_context": "Ej: /dashboard/...", + "help_context_hint": "URL donde aparecerá este artículo.", + "help_field_tags": "Etiquetas", + "help_ph_tags": "Ej: facturas, mermas", + "help_bold": "Negrita", + "help_italic": "Cursiva", + "help_h1": "Título 1", + "help_h2": "Título 2", + "help_list": "Lista", + "help_link": "Enlace", + "help_upload_image": "Subir Imagen", + "help_ph_content": "# Empieza a escribir aquí...", + "help_drag_images": "Arrastra imágenes aquí", + "help_config_pdf": "Configuración de PDF", + "help_config_video": "Configuración de Video", + "help_config_document": "Configuración de Documento", + "help_upload_hint": "Sube el archivo que deseas asociar a este título.", + "help_file_loaded": "Archivo Cargado", + "help_view_file": "Ver Archivo", + "help_change_file": "Cambiar Archivo", + "help_select_file": "Selecciona un archivo", + "help_drag_drop": "O arrastra y suelta aquí" } } diff --git a/frontend/src/routes/dashboard/help-center/+page.svelte b/frontend/src/routes/dashboard/help-center/+page.svelte index cb72049b..a08f6765 100644 --- a/frontend/src/routes/dashboard/help-center/+page.svelte +++ b/frontend/src/routes/dashboard/help-center/+page.svelte @@ -21,6 +21,7 @@ FileCode } from 'lucide-svelte'; import { toast } from 'svelte-sonner'; + import { m } from '$lib/i18n/messages'; let articles: HelpArticle[] = $state([]); let loading = $state(true); @@ -92,7 +93,7 @@ try { articles = await helpApi.listArticles(); } catch (e: any) { - toast.error('Error al cargar artículos: ' + e.message); + toast.error(m['common.help_toast_load_error']() + ': ' + e.message); } finally { loading = false; } @@ -111,11 +112,11 @@ processing = true; try { await helpApi.deleteArticle(selectedArticle.uuid); - toast.success('Capítulo eliminado'); + toast.success(m['common.help_toast_deleted']()); showDeleteDialog = false; await loadArticles(); } catch (e: any) { - toast.error('Error: ' + e.message); + toast.error(m['common.help_toast_error']() + ': ' + e.message); } finally { processing = false; } @@ -138,15 +139,15 @@

- Biblioteca de Conocimiento + {m['common.title_help_library']()}

-

Manuales, Guías y Documentación del Sistema.

+

{m['common.sub_help']()}

{#if canCreate} {/if}
@@ -157,7 +158,7 @@ @@ -172,7 +173,7 @@ {:else if Object.keys(groupedArticles).length === 0}
-

La biblioteca está vacía.

+

{m['common.help_empty']()}

{:else} {#each Object.entries(groupedArticles) as [category, groupArticles]} @@ -219,9 +220,9 @@ {:else}
-

Formato: {article.mime_type || 'Desconocido'}

+

{m['common.help_format']()}: {article.mime_type || m['common.help_unknown']()}

{#if article.file_size} -

Tamaño: {(article.file_size / 1024 / 1024).toFixed(2)} MB

+

{m['common.help_size']()}: {(article.file_size / 1024 / 1024).toFixed(2)} MB

{/if}
{/if} @@ -229,11 +230,11 @@
@@ -272,19 +273,19 @@ - ¿Eliminar capítulo? + {m['common.help_delete_title']()} - Se eliminará permanentemente "{selectedArticle?.title}". + {m['common.help_delete_desc']({ title: selectedArticle?.title ?? '' })} - (showDeleteDialog = false)}>Cancelar + (showDeleteDialog = false)}>{m['common.btn_cancel']()} {#if processing}{/if} - Eliminar + {m['common.btn_delete']()} diff --git a/frontend/src/routes/dashboard/help-center/[uuid]/+page.svelte b/frontend/src/routes/dashboard/help-center/[uuid]/+page.svelte index 0cee42c6..f599e2d6 100644 --- a/frontend/src/routes/dashboard/help-center/[uuid]/+page.svelte +++ b/frontend/src/routes/dashboard/help-center/[uuid]/+page.svelte @@ -1,4 +1,5 @@