| 1 | // Textos del panel de extensiones (ES/EN). Van aparte de js/i18n.js para no |
| 2 | // tocar ese fichero; mismo idioma (uiLang) y misma sustitución {var}. |
| 3 | import { uiLang } from '../i18n.js'; |
| 4 | |
| 5 | const L = { |
| 6 | es: { |
| 7 | title: 'Extensiones', sub: 'Open VSX', |
| 8 | intro: 'Temas de color, gramáticas, snippets y ajustes de lenguaje de extensiones de VS Code. El código de una extensión no se ejecuta salvo que lo enciendas para ella, y entonces solo en un recinto sellado sin internet; tu proyecto no sale del navegador: a Open VSX solo va lo que buscas y lo que instalas.', |
| 9 | paused: 'Extensiones en pausa en esta sesión (?noext): no se aplica ninguna. Puedes desactivarlas o desinstalarlas.', |
| 10 | searchPh: 'Buscar extensiones en Open VSX…', |
| 11 | catAll: 'Todo', catThemes: 'Temas', catSnippets: 'Snippets', catLangs: 'Lenguajes', |
| 12 | vsix: 'Instalar .vsix…', themeBtn: 'Tema de color…', |
| 13 | installedH: 'Instaladas ({n})', none: 'Ninguna todavía. Busca arriba o instala un .vsix.', |
| 14 | popular: 'Populares', results: '{n} resultado|{n} resultados', noResults: 'Sin resultados.', searching: 'Buscando…', more: 'Más resultados', |
| 15 | install: 'Instalar', installing: 'Instalando…', downloading: 'Descargando… {pct}%', installedOk: 'Instalada ✓', update: 'Actualizar a {v}', |
| 16 | enable: 'Activar', disable: 'Desactivar', disabled: 'desactivada', uninstall: 'Desinstalar', confirmUninstall: '¿Desinstalar «{name}»?', |
| 17 | details: 'Detalles', loadingDetails: 'Leyendo el manifiesto…', |
| 18 | applies: 'Aplica: {list}', ignores: 'No aplica: {list}', nothing: 'Nada de esta extensión se puede aplicar aquí.', |
| 19 | needsCode: 'necesita su código', notYet: 'aún no', |
| 20 | hasCode: 'Trae código (main/browser) que aquí no se ejecuta: necesita Node.', |
| 21 | pack: 'Es un paquete de {n} extensiones: instálalas una a una.', |
| 22 | themes: '{n} tema|{n} temas', grammars: '{n} gramática|{n} gramáticas', snippets: 'snippets ({langs})', languages: '{n} lenguaje|{n} lenguajes', |
| 23 | license: 'Licencia: {l}', viewLicense: 'ver licencia', noLicense: 'sin licencia declarada', |
| 24 | verified: 'suma SHA-256 comprobada', unverified: 'Open VSX no publica suma SHA-256', fromFile: 'desde fichero', |
| 25 | downloads: '{n} descargas', |
| 26 | bigConfirm: 'Esta extensión pesa {mb} MB. ¿Descargarla igualmente?', |
| 27 | errNet: 'No pude hablar con Open VSX: {e}', errRate: 'Open VSX está limitando peticiones: espera un momento y reintenta.', |
| 28 | errSha: 'La suma SHA-256 del paquete no coincide con la publicada: no se instala.', |
| 29 | errNothing: 'Esta extensión no trae nada que se pueda aplicar aquí (temas, gramáticas, snippets o lenguajes).', |
| 30 | errNotVsix: 'Eso no es un .vsix de VS Code.', |
| 31 | errNotFound: 'Open VSX no tiene esa extensión o esa versión.', |
| 32 | errHttp: 'Open VSX respondió con un error{status}.', |
| 33 | errBig: 'El paquete es demasiado grande para instalarlo aquí.', |
| 34 | errMismatch: 'El paquete dice ser {got}, no {want}: no se instala.', |
| 35 | errCorrupt: 'El paquete está dañado o usa un formato zip que no se admite{entry}.', |
| 36 | errBadManifest: 'No se pudo leer el package.json del paquete: {e}', |
| 37 | errNoName: 'El package.json del paquete no dice su nombre (name) y su editor (publisher).', |
| 38 | errUnreadable: 'No se pudo leer ninguna de las partes de esta extensión. {w}', |
| 39 | errBlocked: 'Otra pestaña de Elffuss Code tiene ocupada la base de extensiones: ciérrala y vuelve a intentarlo.', |
| 40 | errQuota: 'No queda espacio en el almacenamiento del navegador para instalarla.', |
| 41 | err: 'No se pudo: {e}', cancelled: 'Cancelado.', |
| 42 | installedMsg: '«{name}» instalada.', |
| 43 | grammarNotApplied: 'gramática de {lang} (Monaco conserva su coloreado de serie)', |
| 44 | settingsNotApplied: 'configuración de {lang} (Monaco conserva la suya)', |
| 45 | warnSummary: '{n} parte no se pudo usar|{n} partes no se pudieron usar', |
| 46 | warn_theme: 'Tema «{name}»: {why}', warn_grammar: 'Gramática {name}: {why}', warn_snippets: 'Snippets {name}: {why}', |
| 47 | warn_config: 'Configuración de {name}: {why}', warn_regex: 'Expresión descartada en {name}, podría congelar la pestaña: {why}', |
| 48 | whyMissing: 'el fichero no está en el paquete', whyCorrupt: 'el fichero está dañado', whyBig: 'el fichero es demasiado grande', |
| 49 | whyJson: 'no es JSON válido ({e})', whyPlist: 'no es un plist válido', whyNotGrammar: 'no es una gramática TextMate', |
| 50 | whyNotTheme: 'no es un tema válido', whyScope: 'nombre de ámbito no válido', whyOutside: 'la ruta sale del paquete', |
| 51 | installNamed: 'Instalar {name}', updateNamed: 'Actualizar {name} a {v}', installedNamed: '{name} ya está instalada', |
| 52 | enableNamed: 'Activar {name}', disableNamed: 'Desactivar {name}', uninstallNamed: 'Desinstalar {name}', |
| 53 | close: 'Cerrar', themeList: 'Temas de color', |
| 54 | pickPh: 'Tema de color (↑↓ para previsualizar, Enter para elegir)', builtinGroup: 'Integrados', |
| 55 | builtinDark: 'Oscuro (por defecto)', builtinLight: 'Claro', builtinHc: 'Alto contraste oscuro', builtinHcLight: 'Alto contraste claro', |
| 56 | current: 'actual', palExt: 'Extensiones…', palTheme: 'Tema de color…', |
| 57 | // nivel 2: lo que el panel enseña a todos (lo demás, en ../ext2/strings.js) |
| 58 | introCode: 'Los temas, gramáticas, snippets y ajustes de lenguaje de las extensiones de VS Code se aplican directamente. Las que traen código para navegador pueden ejecutarlo si lo permites, pero solo en un recinto sellado en otro sitio: no tiene internet, no puede leer el almacenamiento de Code (tus proyectos, conversaciones o claves), solo ve los ficheros que tienes abiertos y no puede guardar nada; sus cambios quedan sin guardar hasta que tú guardas. Los enlaces que quiera abrir te preguntan antes y muestran la dirección completa. A Open VSX solo va lo que buscas y lo que instalas, y, con el filtro «Funciona en Code», los manifiestos de los resultados que comprueba.', |
| 59 | isoTitle: 'Cómo se aíslan las extensiones', |
| 60 | iso1: 'El código de una extensión corre en un recinto en otro sitio web, sin ningún host en su política de seguridad: no puede pedir nada a internet, ni a Open VSX, ni a este servidor.', |
| 61 | iso2: 'Es otro sitio: no puede leer el almacenamiento de Code (proyectos, conversaciones, claves, modelos).', |
| 62 | iso3: 'Solo ve los ficheros que tienes abiertos; sus cambios quedan sin guardar hasta que guardas tú. No puede guardar.', |
| 63 | iso4: 'Lo que enseña (avisos, ayudas, diagnósticos) se pinta como texto: sin imágenes remotas ni enlaces que salgan solos.', |
| 64 | iso5: 'Abrir una dirección siempre pregunta antes y enseña la dirección entera. La vista previa de un fichero que cambió una extensión, y las peticiones web del agente, también preguntan.', |
| 65 | iso6: 'Quitar una extensión borra sus ficheros; apagar su código lo para en el acto, sin recargar (el recinto vuelve a arrancar con las demás, si las hay).', |
| 66 | chipWorks: 'Funciona en Code', |
| 67 | worksPrivacy: 'A Open VSX también le llegan las consultas de los manifiestos de estos resultados.', |
| 68 | worksChecked: '{k} funcionan · comprobadas {n} de {total}', |
| 69 | worksNone: 'Ninguna funciona en Code (comprobadas {n} de {total}).', |
| 70 | errCodeonly: 'Solo trae código: usa «Instalar y ejecutar su código…».', |
| 71 | }, |
| 72 | en: { |
| 73 | title: 'Extensions', sub: 'Open VSX', |
| 74 | intro: 'Color themes, grammars, snippets and language settings from VS Code extensions. No extension code runs unless you turn it on for one extension, and then only in a sealed sandbox with no internet; your project never leaves the browser: Open VSX only sees what you search for and what you install.', |
| 75 | paused: 'Extensions are paused for this session (?noext): none is applied. You can still disable or uninstall them.', |
| 76 | searchPh: 'Search extensions on Open VSX…', |
| 77 | catAll: 'All', catThemes: 'Themes', catSnippets: 'Snippets', catLangs: 'Languages', |
| 78 | vsix: 'Install .vsix…', themeBtn: 'Color Theme…', |
| 79 | installedH: 'Installed ({n})', none: 'None yet. Search above or install a .vsix.', |
| 80 | popular: 'Popular', results: '{n} result|{n} results', noResults: 'No results.', searching: 'Searching…', more: 'More results', |
| 81 | install: 'Install', installing: 'Installing…', downloading: 'Downloading… {pct}%', installedOk: 'Installed ✓', update: 'Update to {v}', |
| 82 | enable: 'Enable', disable: 'Disable', disabled: 'disabled', uninstall: 'Uninstall', confirmUninstall: 'Uninstall “{name}”?', |
| 83 | details: 'Details', loadingDetails: 'Reading the manifest…', |
| 84 | applies: 'Applies: {list}', ignores: 'Not applied: {list}', nothing: 'Nothing in this extension can be applied here.', |
| 85 | needsCode: 'needs its code', notYet: 'not yet', |
| 86 | hasCode: 'Ships code (main/browser) that does not run here: it needs Node.', |
| 87 | pack: 'This is a pack of {n} extensions: install them one by one.', |
| 88 | themes: '{n} theme|{n} themes', grammars: '{n} grammar|{n} grammars', snippets: 'snippets ({langs})', languages: '{n} language|{n} languages', |
| 89 | license: 'Licence: {l}', viewLicense: 'view licence', noLicense: 'no licence declared', |
| 90 | verified: 'SHA-256 checked', unverified: 'Open VSX publishes no SHA-256', fromFile: 'from file', |
| 91 | downloads: '{n} downloads', |
| 92 | bigConfirm: 'This extension is {mb} MB. Download it anyway?', |
| 93 | errNet: 'Could not reach Open VSX: {e}', errRate: 'Open VSX is rate-limiting requests: wait a moment and retry.', |
| 94 | errSha: 'The package SHA-256 does not match the published one: not installed.', |
| 95 | errNothing: 'This extension brings nothing that can be applied here (themes, grammars, snippets or languages).', |
| 96 | errNotVsix: 'That is not a VS Code .vsix.', |
| 97 | errNotFound: 'Open VSX does not have that extension or version.', |
| 98 | errHttp: 'Open VSX answered with an error{status}.', |
| 99 | errBig: 'The package is too large to install here.', |
| 100 | errMismatch: 'The package says it is {got}, not {want}: not installed.', |
| 101 | errCorrupt: 'The package is damaged or uses an unsupported zip format{entry}.', |
| 102 | errBadManifest: 'The package.json could not be read: {e}', |
| 103 | errNoName: 'The package.json does not give its name and publisher.', |
| 104 | errUnreadable: 'None of the parts of this extension could be read. {w}', |
| 105 | errBlocked: 'Another Elffuss Code tab is holding the extensions database: close it and try again.', |
| 106 | errQuota: 'There is no browser storage left to install it.', |
| 107 | err: 'Could not do it: {e}', cancelled: 'Cancelled.', |
| 108 | installedMsg: '“{name}” installed.', |
| 109 | grammarNotApplied: '{lang} grammar (Monaco keeps its built-in highlighting)', |
| 110 | settingsNotApplied: '{lang} settings (Monaco keeps its own)', |
| 111 | warnSummary: '{n} part could not be used|{n} parts could not be used', |
| 112 | warn_theme: 'Theme “{name}”: {why}', warn_grammar: 'Grammar {name}: {why}', warn_snippets: 'Snippets {name}: {why}', |
| 113 | warn_config: 'Settings for {name}: {why}', warn_regex: 'Expression discarded in {name}, it could freeze the tab: {why}', |
| 114 | whyMissing: 'the file is not in the package', whyCorrupt: 'the file is damaged', whyBig: 'the file is too large', |
| 115 | whyJson: 'not valid JSON ({e})', whyPlist: 'not a valid plist', whyNotGrammar: 'not a TextMate grammar', |
| 116 | whyNotTheme: 'not a valid theme', whyScope: 'invalid scope name', whyOutside: 'the path leaves the package', |
| 117 | installNamed: 'Install {name}', updateNamed: 'Update {name} to {v}', installedNamed: '{name} is installed', |
| 118 | enableNamed: 'Enable {name}', disableNamed: 'Disable {name}', uninstallNamed: 'Uninstall {name}', |
| 119 | close: 'Close', themeList: 'Color themes', |
| 120 | pickPh: 'Color theme (↑↓ to preview, Enter to select)', builtinGroup: 'Built-in', |
| 121 | builtinDark: 'Dark (default)', builtinLight: 'Light', builtinHc: 'Dark High Contrast', builtinHcLight: 'Light High Contrast', |
| 122 | current: 'current', palExt: 'Extensions…', palTheme: 'Color Theme…', |
| 123 | // level 2: what the panel shows everyone (the rest is in ../ext2/strings.js) |
| 124 | introCode: 'Themes, grammars, snippets and language settings from VS Code extensions apply directly. Extensions that bring browser code can also run it if you allow it, but only in a sealed sandbox on a separate site: it has no internet access, can’t read Code’s storage (your projects, conversations or keys), sees only the files you have open and can’t save anything; its changes stay unsaved until you save them. Links it wants to open ask you first and show the full address. Open VSX only sees what you search for and what you install, and, with the “Works in Code” filter on, the manifests of the results it checks.', |
| 125 | isoTitle: 'How extensions are isolated', |
| 126 | iso1: 'An extension’s code runs in a sandbox on another website, with no host in its security policy: it can’t request anything from the internet, from Open VSX or from this server.', |
| 127 | iso2: 'It is another site: it can’t read Code’s storage (projects, conversations, keys, models).', |
| 128 | iso3: 'It sees only the files you have open; its changes stay unsaved until you save. It can’t save.', |
| 129 | iso4: 'What it shows (notifications, hovers, diagnostics) is drawn as text: no remote images and no links that open on their own.', |
| 130 | iso5: 'Opening an address always asks first and shows the whole address. Previewing a file an extension changed, and the agent’s web requests, ask too.', |
| 131 | iso6: 'Uninstalling an extension deletes its files; turning its code off stops it at once, without a reload (the sandbox starts again with the others, if any).', |
| 132 | chipWorks: 'Works in Code', |
| 133 | worksPrivacy: 'Open VSX also sees the manifest lookups for these results.', |
| 134 | worksChecked: '{k} work · checked {n} of {total}', |
| 135 | worksNone: 'None of them works in Code (checked {n} of {total}).', |
| 136 | errCodeonly: 'It only brings code: use “Install and run its code…”.', |
| 137 | }, |
| 138 | }; |
| 139 | |
| 140 | // los del nivel 2 (../ext2/strings.js) se añaden al cargarse |
| 141 | export function addStrings(t) { for (const lang of Object.keys(L)) Object.assign(L[lang], t[lang] || {}); } |
| 142 | export const STRINGS = L; // para comprobar en las pruebas que ES y EN tienen las mismas claves |
| 143 | |
| 144 | export function tx(key, vars) { |
| 145 | const tabla = L[uiLang()] || L.en; |
| 146 | let s = tabla[key] ?? L.en[key] ?? key; |
| 147 | if (s.includes('|') && vars && 'n' in vars) s = s.split('|')[Number(vars.n) === 1 ? 0 : 1]; |
| 148 | return vars ? s.replace(/\{(\w+)\}/g, (_, k) => (vars[k] ?? '')) : s; |
| 149 | } |