| 1 | // i18n ligero del «chrome» de Elffuss Code. El modelo ya responde en el idioma |
| 2 | // del navegador (agent.js → userLang); esto localiza los textos estáticos y de |
| 3 | // runtime de la UI (placeholder, indicadores «pensando/escribe», estado del |
| 4 | // modelo, saludo del proyecto, la Mente). ES por defecto — cero impacto en |
| 5 | // usuarios españoles — con inglés de fallback. Sustitución simple {var}. |
| 6 | const L = { |
| 7 | es: { |
| 8 | ph: 'Escribe aquí… (@ adjunta un archivo)', |
| 9 | thinking: 'Elffuss está pensando', writing: 'Elffuss escribe · {n} car.', using: 'Elffuss usa {name}', |
| 10 | modelLoading: 'Descargando el modelo IA · {pct}% · {loaded}/{total} MB', |
| 11 | modelReady: 'Modelo IA listo', modelReadyBadge: 'Modelo IA listo ✳', |
| 12 | welcome: '👋 Proyecto «{name}» abierto. Pregúntame por el código, pídeme cambios o dime «árbol». Todo se queda en tu máquina.', |
| 13 | mindTitle: 'MENTE DE ELFFUSS', avatarTitle: 'Mente de Elffuss — cerebro autónomo', |
| 14 | // landing (estático) + tooltips de la barra/toolbar |
| 15 | tagline: 'Abre tu carpeta de código y programa con una elfa al lado.', |
| 16 | tagline2: 'Editor tipo VS Code + agente <b>en tu navegador</b>. Nada sale de tu máquina. 😉', |
| 17 | openProject: '📁 Abrir carpeta de código', resume: 'Reanudar', discard: 'Descartar', cloneOpen: 'Descargar y abrir', |
| 18 | clonePh: 'pega la URL de un repo público (GitHub/Bitbucket)…', |
| 19 | searchPh: 'Buscar archivos por nombre (: para ir a línea, @ para símbolo, > para comandos)', |
| 20 | tFiles: 'Explorador', tSearch: 'Buscar (Cmd/Ctrl+P)', tArch: 'Arquitectura (grafo de dependencias)', |
| 21 | tCity: 'Ciudad 3D', tTerm: 'Terminal (Ctrl+`)', tSkills: 'Skills', tActSettings: 'Ajustes y modelo', |
| 22 | tGitBranch: 'rama actual', tHistory: 'Historial de conversaciones', tTopSettings: 'Ajustes, modelo y API keys', |
| 23 | tTermClose: 'cerrar (Ctrl+`)', tTermResize: 'arrastra para redimensionar', |
| 24 | tCtx: 'contexto acumulado en la conversación', tPlus: 'Adjuntar archivo del proyecto (@)', |
| 25 | tAutoedit: 'Editar archivos automáticamente', |
| 26 | tHardwork: 'Hard Work: lee tu proyecto entero por partes — audita, resume o busca en código que no cabe en el modelo', |
| 27 | tGoal: 'Modo Objetivo: descompone el mensaje en tareas y las ejecuta una a una (planificador + ejecutor)', |
| 28 | tFlip: 'cambiar entre chat y editor', tSlash: 'Comandos', |
| 29 | // pass-3: chrome profundo del IDE (paleta, menús, historial, ajustes, notifs) |
| 30 | tabClose: 'Cerrar pestaña (no borra la conversación)', newConv: 'Nueva conversación', |
| 31 | histEmpty: 'Sin conversaciones guardadas todavía.', histDel: 'Eliminar para siempre', |
| 32 | confirmDel: '¿Eliminar «{title}» para siempre?', thisConv: 'esta conversación', |
| 33 | cmdsSep: 'Comandos', slTree: 'árbol del proyecto', slSearch: 'buscar en el código', |
| 34 | slSkills: 'gestionar skills', slModel: 'proveedores y modelo', slClear: 'nueva conversación', |
| 35 | pTree: 'árbol', pSearch: 'busca ', pCommit: 'resume los cambios y prepárame el mensaje de commit', |
| 36 | pProposal: 'Implementa esta propuesta de mejora con cambios reales en el código:\n\n', |
| 37 | attachSep: 'Adjuntar al mensaje (@)', attachOpen: 'archivo abierto', openProjFirst: 'Abre un proyecto primero', |
| 38 | autoTxt: 'Auto', reviewTxt: 'Revisar', |
| 39 | autoOn: 'Editar archivos automáticamente (clic para revisar antes)', |
| 40 | autoOff: 'Pedir confirmación antes de escribir (clic para automático)', |
| 41 | pSearchCode: 'Buscar en el código…', pManageSkills: 'Gestionar skills', pToggleExplorer: 'Alternar explorador', |
| 42 | pToggleTerm: 'Alternar terminal', pSave: 'Guardar ({k})', palCmd: 'comando', |
| 43 | palGotoSym: 'Ir a símbolo en el editor…', palEmpty: 'Sin resultados', |
| 44 | mNewFile: 'Nuevo archivo…', promptNewPath: 'Ruta del nuevo archivo:', mSave: 'Guardar', mOpenFolder: 'Abrir carpeta…', |
| 45 | mSearchCode: 'Buscar en el código', mGotoFile: 'Ir a archivo…', mGotoSym: 'Ir a símbolo…', |
| 46 | mTerminal: 'Terminal', mArch: 'Arquitectura', mAbout: 'Acerca de Elffuss Code (GitHub)', |
| 47 | gNotRepo: 'No es un repositorio git', gBranch: 'Rama: {b}', gLast: 'Último: {m}', gCommit: 'Pídele a Elffuss que commitee', |
| 48 | nExec: '▶ Ejecutar', nView: 'Ver en la Mente', |
| 49 | fallbackToast: 'Ese Gemma no cargó (memoria/GPU) — uso el ligero…', |
| 50 | setStoreTitle: 'Modelo descargado (se cachea en tu navegador)', setClear: 'Vaciar caché', setClearing: 'Vaciando…', |
| 51 | setCached: '{gb} en caché', setNone: 'Nada cacheado todavía', |
| 52 | setBrToken: 'Token (lo imprime el programa al arrancarlo)', brTokenPh: 'pega aquí el token…', |
| 53 | setFeedbackPh: 'Cuéntanos qué ha pasado o qué te gustaría que hiciera…', |
| 54 | lblModel: 'Modelo', lblApiKey: 'API key', |
| 55 | setCalc: 'Calculando espacio…', setPersist: '✓ almacenamiento persistente (no se borra solo)', |
| 56 | setNoPersist: '⚠ sin persistencia: el navegador podría desalojarlo', setLimit: ' · límite ~{gb}', |
| 57 | setModelPh: 'modelo (p. ej. gpt-4o-mini)', keyNeeded: 'clave (no necesaria)', |
| 58 | wsTitle: "Espacio de trabajo (tu disco)", |
| 59 | wsDesc: "Tus conversaciones y skills viven en este navegador, que puede borrarlas. Guárdalas en una carpeta y quedan como ficheros normales.", |
| 60 | wsNoSupport: "Este navegador no permite elegir carpeta. Usa «Descargar copia».", |
| 61 | wsNoFolder: "Sin carpeta: solo viven en este navegador.", |
| 62 | wsFolder: "Carpeta: {name}", |
| 63 | wsNeedsPerm: "«{name}» necesita permiso otra vez (pasa al recargar).", |
| 64 | wsPick: "Elegir carpeta", |
| 65 | wsUseProject: "Usar la del proyecto", |
| 66 | wsRegrant: "Conceder permiso", |
| 67 | wsSaveNow: "Guardar ahora", |
| 68 | wsSaved: "Guardado ({n} almacenes)", |
| 69 | wsAuto: "Guardar solo", |
| 70 | wsForget: "Olvidar carpeta", |
| 71 | wsDownload: "Descargar copia", |
| 72 | wsWhat: "Qué hay guardado", |
| 73 | setTitle: "Ajustes", |
| 74 | close: "cerrar", |
| 75 | setBrainTitle: "Cerebro (modelo)", |
| 76 | setModelE4bSub: "El mejor · WebGPU local · ~4 GB", |
| 77 | setModelE2bSub: "Ligero · WebGPU local · ~2 GB", |
| 78 | setModelOnnxSub: "Modelo propio · 850 MB · tool-calls + apps", |
| 79 | setModelRulesSub: "Órdenes directas, cero descarga", |
| 80 | setBridgeTitle: "🔌 Bridge local (ejecución real en tu máquina)", |
| 81 | setBridgeDisconnected: "desconectado", |
| 82 | setBridgeFolderPh: "/ruta/completa/a/tu/proyecto", |
| 83 | setBridgeConnect: "Conectar", |
| 84 | setBridgeOnStatus: "✓ conectado — ejecución real activa", |
| 85 | setBridgeNoToken: "⚠️ pega el token que imprimió el programa al arrancarlo", |
| 86 | setBridgeConnecting: "Conectando…", |
| 87 | setBridgeConnectedMsg: "✔ conectado — ejecución real en tu máquina", |
| 88 | setPermTitle: "✅ Permisos de ejecución", |
| 89 | setGoalTitle: "🎯 Modo Objetivo", |
| 90 | setTelTitle: "📨 Errores y feedback", |
| 91 | setTelEmpty: "escribe algo primero", |
| 92 | setTelThanks: "¡enviado, gracias!", |
| 93 | setProvTitle: "Proveedores externos (opcional · la clave se queda en tu navegador)", |
| 94 | setProvUse: "Usar", |
| 95 | setManageSkillsBtn: "Gestionar skills de Claude Code", |
| 96 | skRemove: "Quitar", |
| 97 | skBrowse: "Explorar", |
| 98 | skAddRepoPh: "owner/repo o URL de GitHub (p. ej. OpenClaude/…)", |
| 99 | skAddRepo: "Añadir repo", |
| 100 | hwPlaceholder: "⛏ Hard Work: pregunta algo sobre TODO el proyecto…", |
| 101 | hwNeedBrain: "Hard Work necesita un cerebro cargado: elige un modelo en Ajustes y reintenta.", |
| 102 | hwNeedProject: "Hard Work trabaja sobre tu proyecto. Abre una carpeta primero y vuelve a pulsar ⛏ Hard Work.", |
| 103 | hwReading: "Hard Work · leyendo el proyecto…", |
| 104 | hwNoFiles: "No encontré archivos de texto/código legibles en el proyecto.", |
| 105 | hwTrimmed: " — recortado", |
| 106 | hwPhaseReduce: "Hard Work · sintetizando…", |
| 107 | hwResultTrunc: " Proyecto recortado al máximo — acota con una subcarpeta.", |
| 108 | planPlanning: "planificando…", |
| 109 | planRunning: "ejecutando…", |
| 110 | planDone: "completado", |
| 111 | planFailed: "con fallos", |
| 112 | planStopped: "parado", |
| 113 | stopping: "Parando…", |
| 114 | stopped: "Parado.", |
| 115 | send: "Enviar", |
| 116 | stop: "Parar", |
| 117 | stModelLoadingAI: "Cargando el modelo IA…", |
| 118 | termCapsBridge: "🔌 Bridge local: node/npm/python reales", |
| 119 | termCapsNoBridge: "shell del proyecto · node/npm/python → Bridge local (⚙ Ajustes)", |
| 120 | setBridgeFolderLabel: "Carpeta de trabajo (opcional — si no, usa una temporal)", |
| 121 | setBridgeDesc: "Un pequeño programa que TÚ ejecutas en tu ordenador — le da a la elfa ejecución real (node, npm, python…) sin salir de tu máquina. Nada se instala en el navegador.", |
| 122 | setBridgeDownload: "⬇ Descargar para {os}", |
| 123 | setBridgeOtherOS: "otro sistema operativo", |
| 124 | setBridgeOld: "¿Ya tenías un bridge y ahora no conecta? Descárgalo otra vez (versión 1.1.1): los anteriores no aceptan la dirección nueva de Elffuss Code.", |
| 125 | setModelRulesName: "Básico (sin modelo)", |
| 126 | // ronda UX 2026-10: cola, guardar, avisos honestos |
| 127 | queuedTitle: "En cola: sale en cuanto termine lo de ahora", |
| 128 | queuedCancelled: "Descartado: pulsaste ■ antes de que le tocara", |
| 129 | hwPhasePlan: "Hard Work · {n} partes ({k}k){trim}", |
| 130 | hwPhaseMap: "Hard Work · leyendo {i}/{n}", |
| 131 | hwPhaseGroup: "Hard Work · fundiendo {g}/{n}", |
| 132 | hwResult: "⛏ Hard Work (RLM): {n} partes, {k} con señal.", |
| 133 | hwFailed: "Hard Work falló: {e}", |
| 134 | // editor: guardar, cerrar con cambios, pestañas y árbol |
| 135 | saved: "💾 {path} guardado", saveFailed: "No pude guardar {path}: {e}", noFileOpen: "Abre un fichero primero", |
| 136 | openFailed: "No pude abrir {path}: {e}", |
| 137 | dirtyTitle: "¿Guardar los cambios de «{name}»?", dirtyBody: "Si no los guardas, se pierden.", |
| 138 | dirtySave: "Guardar", dirtyDiscard: "No guardar", dirtyCancel: "Cancelar", |
| 139 | editorTabs: "Ficheros abiertos", closeFile: "Cerrar {name}", closeFileDirty: "Cerrar {name} (cambios sin guardar)", |
| 140 | fileDeletedDirty: "borrado del disco; guárdalo para recrearlo", |
| 141 | tmClose: "Cerrar", tmCloseOthers: "Cerrar otras", tmCloseRight: "Cerrar las de la derecha", tmCloseAll: "Cerrar todas", |
| 142 | tmCopyPath: "Copiar ruta", tmViewSource: "Ver código fuente", tmPreview: "Vista previa", |
| 143 | tmNewFile: "Nuevo archivo…", tmNewFolder: "Nueva carpeta…", tmOpen: "Abrir", tmRename: "Renombrar…", tmDelete: "Eliminar", |
| 144 | promptNewFile: "Nombre del nuevo archivo:", promptNewFolder: "Nombre de la nueva carpeta:", promptRename: "Nuevo nombre:", |
| 145 | confirmDelete: "¿Eliminar «{name}»?", opFailed: "No se pudo: {e}", |
| 146 | created: "Creado «{name}»", renamed: "Renombrado «{from}» → «{to}»", deleted: "Eliminado «{name}»", |
| 147 | pathCopied: "Ruta copiada: {path}", pathCopyFailed: "No pude copiar la ruta (el navegador no dejó usar el portapapeles)", |
| 148 | explorer: "Explorador del proyecto", treeMore: "… y {n} más (no se muestran)", |
| 149 | editorEmpty: "Abre un fichero del explorador, o pídele algo a la elfa.", |
| 150 | mPalette: "Paleta de comandos", |
| 151 | // landing |
| 152 | openFolderFailed: "No pude abrir la carpeta: {e}", openingIde: "Abriendo el editor…", |
| 153 | noFsAccess: "Este navegador no deja abrir carpetas de tu disco (hace falta Chrome o Edge en un ordenador). Puedes probar con una carpeta privada del navegador.", |
| 154 | tryBrowser: "Probar en el navegador (sin carpeta)", |
| 155 | clonePasteUrl: "Pega la URL de un repo público de GitHub o Bitbucket.", |
| 156 | cloneBadUrl: "URL no reconocida. Usa github.com/usuario/repo o bitbucket.org/usuario/repo", |
| 157 | cloneListing: "Listando el repo…", cloneHalf: "Descarga a medias de {repo} ({n}/{total} ficheros)", |
| 158 | reopenFolder: "Reabrir «{name}»", |
| 159 | openFolderBusy: "La elfa está trabajando en este proyecto. ¿Abrir otra carpeta igualmente?", |
| 160 | // Mente y cerebro autónomo |
| 161 | mindThought: "pensamiento", mindEmpty: "(sin contenido)", mindOpenProposal: "Abrir la propuesta {name}", |
| 162 | mindOpenPath: "abrir {path} en el editor", mindExec: "▶ Ejecutar esta propuesta", mindOpenEditor: "Abrir en el editor", |
| 163 | mindFlyTo: "Llevar la cámara a {name}", mindLegend: "Perfiles del cerebro", |
| 164 | mindMusic: "♪ Poner música", mindMusicTitle: "Carga un reproductor de SoundCloud (esto sí sale a internet)", |
| 165 | mindMusicPlayer: "música", mindMusicOff: "■ Quitar música", |
| 166 | mindActivate: "▶ activar cerebro autónomo", mindResume: "▶ reanudar cerebro", mindPause: "⏸ pausar cerebro", |
| 167 | mindActivateTitle: "Cuando estés ocioso, revisa el proyecto con el modelo cargado y deja propuestas en {dir}/ (no toca tu código). Necesita un modelo de verdad.", |
| 168 | mindPauseTitle: "Pausar: deja de trabajar por su cuenta", |
| 169 | mindConfig: "⚙ cerebro", mindConfigTitle: "reprogramar el cerebro", mindHistory: "≡ historial", mindHistoryTitle: "ver todo lo que ha llegado", |
| 170 | mindClose: "✕ salir", mindCloseTitle: "salir (Esc)", mindLogTitle: "Historial completo", |
| 171 | cfgTitle: "⚙ Reprogramar el cerebro", cfgNotif: "🔔 Notificaciones del navegador:", cfgNotifAsk: "Activar", |
| 172 | cfgNotifUnsupported: "no soportadas por este navegador", cfgNotifGranted: "✓ concedidas — avisaré cuando encuentre algo bueno", |
| 173 | cfgNotifDenied: "✕ bloqueadas — actívalas en los ajustes del sitio del navegador", cfgNotifDefault: "aún no pedidas", |
| 174 | cfgMission: "Misión (qué quieres que haga por su cuenta)", cfgDir: "Carpeta-alma (dentro del proyecto)", |
| 175 | cfgProfiles: "Perfiles — cada uno piensa en paralelo, con el color de su estrella", cfgAddProf: "+ nuevo perfil", |
| 176 | cfgColor: "Color", cfgName: "Nombre", cfgFocus: "En qué se centra", cfgRemove: "quitar", |
| 177 | cfgThink: "Pensar ahora", cfgSave: "Reprogramar", |
| 178 | cfgNote: "La elfa trabajará según esto cuando estés ocioso y volcará todo en esa carpeta.", |
| 179 | cfgCant_provider: "Sin un modelo cargado no pienso: en modo Básico solo saldrían propuestas sin sentido. Elige un modelo en ⚙ Ajustes → Cerebro.", |
| 180 | cfgCant_workspace: "Abre una carpeta de proyecto primero.", |
| 181 | cfgCant_running: "Ya estoy pensando: espera a que termine este ciclo.", |
| 182 | cfgCant_leader: "Otra pestaña lleva el cerebro: hazlo desde ahí.", |
| 183 | avatarLabel: "Mente de Elffuss", |
| 184 | }, |
| 185 | en: { |
| 186 | ph: 'Type here… (@ attaches a file)', |
| 187 | thinking: 'Elffuss is thinking', writing: 'Elffuss writes · {n} chars', using: 'Elffuss uses {name}', |
| 188 | modelLoading: 'Downloading AI model · {pct}% · {loaded}/{total} MB', |
| 189 | modelReady: 'AI model ready', modelReadyBadge: 'AI model ready ✳', |
| 190 | welcome: '👋 Project “{name}” open. Ask me about the code, request changes, or say “tree”. Everything stays on your machine.', |
| 191 | mindTitle: 'ELFFUSS MIND', avatarTitle: 'Elffuss Mind — autonomous brain', |
| 192 | tagline: 'Open your code folder and program with an elf by your side.', |
| 193 | tagline2: 'VS Code–style editor + agent <b>in your browser</b>. Nothing leaves your machine. 😉', |
| 194 | openProject: '📁 Open code folder', resume: 'Resume', discard: 'Discard', cloneOpen: 'Download & open', |
| 195 | clonePh: 'paste the URL of a public repo (GitHub/Bitbucket)…', |
| 196 | searchPh: 'Search files by name (: to go to line, @ for symbol, > for commands)', |
| 197 | tFiles: 'Explorer', tSearch: 'Search (Cmd/Ctrl+P)', tArch: 'Architecture (dependency graph)', |
| 198 | tCity: '3D City', tTerm: 'Terminal (Ctrl+`)', tSkills: 'Skills', tActSettings: 'Settings & model', |
| 199 | tGitBranch: 'current branch', tHistory: 'Conversation history', tTopSettings: 'Settings, model & API keys', |
| 200 | tTermClose: 'close (Ctrl+`)', tTermResize: 'drag to resize', |
| 201 | tCtx: 'context accumulated in the conversation', tPlus: 'Attach a project file (@)', |
| 202 | tAutoedit: 'Edit files automatically', |
| 203 | tHardwork: 'Hard Work: reads your whole project in chunks — audits, summarises or searches code that does not fit in the model', |
| 204 | tGoal: 'Goal mode: breaks the message into tasks and runs them one by one (planner + executor)', |
| 205 | tFlip: 'switch between chat and editor', tSlash: 'Commands', |
| 206 | tabClose: 'Close tab (doesn’t delete the conversation)', newConv: 'New conversation', |
| 207 | histEmpty: 'No saved conversations yet.', histDel: 'Delete forever', |
| 208 | confirmDel: 'Delete “{title}” forever?', thisConv: 'this conversation', |
| 209 | cmdsSep: 'Commands', slTree: 'project tree', slSearch: 'search the code', |
| 210 | slSkills: 'manage skills', slModel: 'providers & model', slClear: 'new conversation', |
| 211 | pTree: 'tree', pSearch: 'search ', pCommit: 'summarize the changes and prepare my commit message', |
| 212 | pProposal: 'Implement this improvement proposal with real changes to the code:\n\n', |
| 213 | attachSep: 'Attach to message (@)', attachOpen: 'open file', openProjFirst: 'Open a project first', |
| 214 | autoTxt: 'Auto', reviewTxt: 'Review', |
| 215 | autoOn: 'Edit files automatically (click to review first)', |
| 216 | autoOff: 'Ask before writing (click for automatic)', |
| 217 | pSearchCode: 'Search the code…', pManageSkills: 'Manage skills', pToggleExplorer: 'Toggle explorer', |
| 218 | pToggleTerm: 'Toggle terminal', pSave: 'Save ({k})', palCmd: 'command', |
| 219 | palGotoSym: 'Go to symbol in editor…', palEmpty: 'No results', |
| 220 | mNewFile: 'New file…', promptNewPath: 'New file path:', mSave: 'Save', mOpenFolder: 'Open folder…', |
| 221 | mSearchCode: 'Search the code', mGotoFile: 'Go to file…', mGotoSym: 'Go to symbol…', |
| 222 | mTerminal: 'Terminal', mArch: 'Architecture', mAbout: 'About Elffuss Code (GitHub)', |
| 223 | gNotRepo: 'Not a git repository', gBranch: 'Branch: {b}', gLast: 'Latest: {m}', gCommit: 'Ask Elffuss to commit', |
| 224 | nExec: '▶ Run', nView: 'View in the Mind', |
| 225 | fallbackToast: 'That Gemma didn’t load (memory/GPU) — using the light one…', |
| 226 | setStoreTitle: 'Downloaded model (cached in your browser)', setClear: 'Clear cache', setClearing: 'Clearing…', |
| 227 | setCached: '{gb} cached', setNone: 'Nothing cached yet', |
| 228 | setBrToken: 'Token (printed by the program on startup)', brTokenPh: 'paste the token here…', |
| 229 | setFeedbackPh: 'Tell us what happened or what you’d like it to do…', |
| 230 | lblModel: 'Model', lblApiKey: 'API key', |
| 231 | setCalc: 'Calculating space…', setPersist: '✓ persistent storage (won’t be auto-cleared)', |
| 232 | setNoPersist: '⚠ not persistent: the browser could evict it', setLimit: ' · limit ~{gb}', |
| 233 | setModelPh: 'model (e.g. gpt-4o-mini)', keyNeeded: 'key (not needed)', |
| 234 | wsTitle: "Workspace (your disk)", |
| 235 | wsDesc: "Your conversations and skills live in this browser, which can wipe them. Save them to a folder and they stay as normal files.", |
| 236 | wsNoSupport: "This browser can't pick a folder. Use «Download copy».", |
| 237 | wsNoFolder: "No folder: they only live in this browser.", |
| 238 | wsFolder: "Folder: {name}", |
| 239 | wsNeedsPerm: "«{name}» needs permission again (happens after a reload).", |
| 240 | wsPick: "Pick a folder", |
| 241 | wsUseProject: "Use the project's", |
| 242 | wsRegrant: "Grant permission", |
| 243 | wsSaveNow: "Save now", |
| 244 | wsSaved: "Saved ({n} stores)", |
| 245 | wsAuto: "Save automatically", |
| 246 | wsForget: "Forget folder", |
| 247 | wsDownload: "Download copy", |
| 248 | wsWhat: "What's stored", |
| 249 | setTitle: "Settings", |
| 250 | close: "close", |
| 251 | setBrainTitle: "Brain (model)", |
| 252 | setModelE4bSub: "The best · local WebGPU · ~4 GB", |
| 253 | setModelE2bSub: "Light · local WebGPU · ~2 GB", |
| 254 | setModelOnnxSub: "Our own model · 850 MB · tool-calls + apps", |
| 255 | setModelRulesSub: "Direct commands, zero download", |
| 256 | setBridgeTitle: "🔌 Local bridge (real execution on your machine)", |
| 257 | setBridgeDisconnected: "disconnected", |
| 258 | setBridgeFolderPh: "/full/path/to/your/project", |
| 259 | setBridgeConnect: "Connect", |
| 260 | setBridgeOnStatus: "✓ connected — real execution active", |
| 261 | setBridgeNoToken: "⚠️ paste the token the program printed on startup", |
| 262 | setBridgeConnecting: "Connecting…", |
| 263 | setBridgeConnectedMsg: "✔ connected — real execution on your machine", |
| 264 | setPermTitle: "✅ Execution permissions", |
| 265 | setGoalTitle: "🎯 Goal mode", |
| 266 | setTelTitle: "📨 Errors and feedback", |
| 267 | setTelEmpty: "type something first", |
| 268 | setTelThanks: "sent, thanks!", |
| 269 | setProvTitle: "External providers (optional · the key stays in your browser)", |
| 270 | setProvUse: "Use", |
| 271 | setManageSkillsBtn: "Manage Claude Code skills", |
| 272 | skRemove: "Remove", |
| 273 | skBrowse: "Browse", |
| 274 | skAddRepoPh: "owner/repo or GitHub URL (e.g. OpenClaude/…)", |
| 275 | skAddRepo: "Add repo", |
| 276 | hwPlaceholder: "⛏ Hard Work: ask something about the WHOLE project…", |
| 277 | hwNeedBrain: "Hard Work needs a loaded brain: pick a model in Settings and try again.", |
| 278 | hwNeedProject: "Hard Work works on your project. Open a folder first, then press ⛏ Hard Work again.", |
| 279 | hwReading: "Hard Work · reading the project…", |
| 280 | hwNoFiles: "I found no readable text/code files in the project.", |
| 281 | hwTrimmed: " — trimmed", |
| 282 | hwPhaseReduce: "Hard Work · synthesizing…", |
| 283 | hwResultTrunc: " Project trimmed to the max — narrow it down to a subfolder.", |
| 284 | planPlanning: "planning…", |
| 285 | planRunning: "running…", |
| 286 | planDone: "completed", |
| 287 | planFailed: "with failures", |
| 288 | planStopped: "stopped", |
| 289 | stopping: "Stopping…", |
| 290 | stopped: "Stopped.", |
| 291 | send: "Send", |
| 292 | stop: "Stop", |
| 293 | stModelLoadingAI: "Loading the AI model…", |
| 294 | termCapsBridge: "🔌 Local bridge: real node/npm/python", |
| 295 | termCapsNoBridge: "project shell · node/npm/python → Local bridge (⚙ Settings)", |
| 296 | setBridgeFolderLabel: "Working folder (optional — otherwise a temporary one is used)", |
| 297 | setBridgeDesc: "A small program that YOU run on your computer — it gives the elf real execution (node, npm, python…) without leaving your machine. Nothing is installed in the browser.", |
| 298 | setBridgeDownload: "⬇ Download for {os}", |
| 299 | setBridgeOtherOS: "another operating system", |
| 300 | setBridgeOld: "Already had a bridge and now it won't connect? Download it again (version 1.1.1): older ones don't accept Elffuss Code's new address.", |
| 301 | setModelRulesName: "Basic (no model)", |
| 302 | // UX round 2026-10: queue, save, honest notices |
| 303 | queuedTitle: "Queued: it goes out as soon as the current work ends", |
| 304 | queuedCancelled: "Dropped: you pressed ■ before its turn", |
| 305 | hwPhasePlan: "Hard Work · {n} chunks ({k}k){trim}", |
| 306 | hwPhaseMap: "Hard Work · reading {i}/{n}", |
| 307 | hwPhaseGroup: "Hard Work · merging {g}/{n}", |
| 308 | hwResult: "⛏ Hard Work (RLM): {n} chunks, {k} with signal.", |
| 309 | hwFailed: "Hard Work failed: {e}", |
| 310 | // editor: save, close with changes, tabs and tree |
| 311 | saved: "💾 {path} saved", saveFailed: "Couldn't save {path}: {e}", noFileOpen: "Open a file first", |
| 312 | openFailed: "Couldn't open {path}: {e}", |
| 313 | dirtyTitle: "Save the changes to “{name}”?", dirtyBody: "If you don't save them, they are lost.", |
| 314 | dirtySave: "Save", dirtyDiscard: "Don't save", dirtyCancel: "Cancel", |
| 315 | editorTabs: "Open files", closeFile: "Close {name}", closeFileDirty: "Close {name} (unsaved changes)", |
| 316 | fileDeletedDirty: "deleted from disk; save it to recreate it", |
| 317 | tmClose: "Close", tmCloseOthers: "Close others", tmCloseRight: "Close to the right", tmCloseAll: "Close all", |
| 318 | tmCopyPath: "Copy path", tmViewSource: "View source", tmPreview: "Preview", |
| 319 | tmNewFile: "New file…", tmNewFolder: "New folder…", tmOpen: "Open", tmRename: "Rename…", tmDelete: "Delete", |
| 320 | promptNewFile: "Name of the new file:", promptNewFolder: "Name of the new folder:", promptRename: "New name:", |
| 321 | confirmDelete: "Delete “{name}”?", opFailed: "Couldn't do it: {e}", |
| 322 | created: "Created “{name}”", renamed: "Renamed “{from}” → “{to}”", deleted: "Deleted “{name}”", |
| 323 | pathCopied: "Path copied: {path}", pathCopyFailed: "Couldn't copy the path (the browser blocked the clipboard)", |
| 324 | explorer: "Project explorer", treeMore: "… and {n} more (not shown)", |
| 325 | editorEmpty: "Open a file from the explorer, or ask the elf for something.", |
| 326 | mPalette: "Command palette", |
| 327 | // landing |
| 328 | openFolderFailed: "Couldn't open the folder: {e}", openingIde: "Opening the editor…", |
| 329 | noFsAccess: "This browser can't open folders on your disk (you need Chrome or Edge on a computer). You can try a private folder inside the browser.", |
| 330 | tryBrowser: "Try it in the browser (no folder)", |
| 331 | clonePasteUrl: "Paste the URL of a public GitHub or Bitbucket repo.", |
| 332 | cloneBadUrl: "Unrecognised URL. Use github.com/user/repo or bitbucket.org/user/repo", |
| 333 | cloneListing: "Listing the repo…", cloneHalf: "Half-finished download of {repo} ({n}/{total} files)", |
| 334 | reopenFolder: "Reopen “{name}”", |
| 335 | openFolderBusy: "The elf is working on this project. Open another folder anyway?", |
| 336 | // Mind and autonomous brain |
| 337 | mindThought: "thought", mindEmpty: "(no content)", mindOpenProposal: "Open the proposal {name}", |
| 338 | mindOpenPath: "open {path} in the editor", mindExec: "▶ Run this proposal", mindOpenEditor: "Open in the editor", |
| 339 | mindFlyTo: "Fly the camera to {name}", mindLegend: "Brain profiles", |
| 340 | mindMusic: "♪ Play music", mindMusicTitle: "Loads a SoundCloud player (this does go to the internet)", |
| 341 | mindMusicPlayer: "music", mindMusicOff: "■ Remove music", |
| 342 | mindActivate: "▶ turn on the autonomous brain", mindResume: "▶ resume brain", mindPause: "⏸ pause brain", |
| 343 | mindActivateTitle: "When you are idle, it reviews the project with the loaded model and leaves proposals in {dir}/ (it does not touch your code). Needs a real model.", |
| 344 | mindPauseTitle: "Pause: stop working on its own", |
| 345 | mindConfig: "⚙ brain", mindConfigTitle: "reprogram the brain", mindHistory: "≡ history", mindHistoryTitle: "see everything that came in", |
| 346 | mindClose: "✕ exit", mindCloseTitle: "exit (Esc)", mindLogTitle: "Full history", |
| 347 | cfgTitle: "⚙ Reprogram the brain", cfgNotif: "🔔 Browser notifications:", cfgNotifAsk: "Turn on", |
| 348 | cfgNotifUnsupported: "not supported by this browser", cfgNotifGranted: "✓ granted — I'll let you know when I find something good", |
| 349 | cfgNotifDenied: "✕ blocked — turn them on in the browser's site settings", cfgNotifDefault: "not asked yet", |
| 350 | cfgMission: "Mission (what you want it to do on its own)", cfgDir: "Soul folder (inside the project)", |
| 351 | cfgProfiles: "Profiles — each one thinks in parallel, with the colour of its star", cfgAddProf: "+ new profile", |
| 352 | cfgColor: "Colour", cfgName: "Name", cfgFocus: "What it focuses on", cfgRemove: "remove", |
| 353 | cfgThink: "Think now", cfgSave: "Reprogram", |
| 354 | cfgNote: "The elf will work on this when you are idle and put everything in that folder.", |
| 355 | cfgCant_provider: "I don't think without a loaded model: in Basic mode only nonsense proposals would come out. Pick a model in ⚙ Settings → Brain.", |
| 356 | cfgCant_workspace: "Open a project folder first.", |
| 357 | cfgCant_running: "I'm already thinking: wait for this cycle to end.", |
| 358 | cfgCant_leader: "Another tab runs the brain: do it from there.", |
| 359 | avatarLabel: "Elffuss Mind", |
| 360 | }, |
| 361 | }; |
| 362 | |
| 363 | // Idioma del chrome: 2 letras, ES por defecto. |
| 364 | export function uiLang() { |
| 365 | return (navigator.language || 'es').slice(0, 2).toLowerCase(); |
| 366 | } |
| 367 | |
| 368 | // Traduce una clave de runtime con sustitución {var}. Fallback: idioma → |
| 369 | // inglés → la propia clave. |
| 370 | export function t(key, vars) { |
| 371 | const s = (L[uiLang()] || L.en)[key] ?? L.en[key] ?? key; |
| 372 | return vars ? s.replace(/\{(\w+)\}/g, (_, k) => (vars[k] ?? '')) : s; |
| 373 | } |
| 374 | |
| 375 | // Textos estáticos del HTML (landing, placeholders, tooltips) que no pasan por |
| 376 | // t() en runtime. Se cablean una vez al arrancar; ES es el HTML por defecto. |
| 377 | export function applyI18n() { |
| 378 | document.documentElement.lang = uiLang(); |
| 379 | const set = (sel, prop, key) => { const e = document.querySelector(sel); if (e) e[prop] = t(key); }; |
| 380 | set('#prompt', 'placeholder', 'ph'); |
| 381 | const tag = document.querySelector('#landing .tag'); |
| 382 | if (tag) tag.innerHTML = `${t('tagline')}<br>${t('tagline2')}`; |
| 383 | set('#open-project', 'textContent', 'openProject'); |
| 384 | set('#resume-clone-btn', 'textContent', 'resume'); |
| 385 | set('#discard-clone-btn', 'textContent', 'discard'); |
| 386 | set('#clone-btn', 'textContent', 'cloneOpen'); |
| 387 | set('#clone-url', 'placeholder', 'clonePh'); |
| 388 | set('#try-browser', 'textContent', 'tryBrowser'); |
| 389 | set('#pal-input', 'placeholder', 'searchPh'); |
| 390 | const titles = { |
| 391 | '#act-files': 'tFiles', '#act-search': 'tSearch', '#act-arch': 'tArch', '#act-city': 'tCity', |
| 392 | '#act-term': 'tTerm', '#act-skills': 'tSkills', '#act-settings': 'tActSettings', |
| 393 | '#git-branch': 'tGitBranch', '#btn-history': 'tHistory', '#btn-settings': 'tTopSettings', |
| 394 | '#term-close': 'tTermClose', '#term-resize': 'tTermResize', '#ctx-meter': 'tCtx', |
| 395 | '#btn-plus': 'tPlus', '#btn-autoedit': 'tAutoedit', '#btn-goal': 'tGoal', |
| 396 | '#btn-hardwork': 'tHardwork', |
| 397 | '#code-flip': 'tFlip', '#btn-slash': 'tSlash', '#btn-send': 'send', |
| 398 | }; |
| 399 | for (const [sel, key] of Object.entries(titles)) set(sel, 'title', key); |
| 400 | } |