| 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. Aquí no se ejecuta el código de ninguna extensión, y 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): no se ejecuta — haría falta un host de extensiones.', |
| 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 | }, |
| 58 | en: { |
| 59 | title: 'Extensions', sub: 'Open VSX', |
| 60 | intro: 'Color themes, grammars, snippets and language settings from VS Code extensions. No extension code runs here, and your project never leaves the browser: Open VSX only sees what you search for and what you install.', |
| 61 | paused: 'Extensions are paused for this session (?noext): none is applied. You can still disable or uninstall them.', |
| 62 | searchPh: 'Search extensions on Open VSX…', |
| 63 | catAll: 'All', catThemes: 'Themes', catSnippets: 'Snippets', catLangs: 'Languages', |
| 64 | vsix: 'Install .vsix…', themeBtn: 'Color Theme…', |
| 65 | installedH: 'Installed ({n})', none: 'None yet. Search above or install a .vsix.', |
| 66 | popular: 'Popular', results: '{n} result|{n} results', noResults: 'No results.', searching: 'Searching…', more: 'More results', |
| 67 | install: 'Install', installing: 'Installing…', downloading: 'Downloading… {pct}%', installedOk: 'Installed ✓', update: 'Update to {v}', |
| 68 | enable: 'Enable', disable: 'Disable', disabled: 'disabled', uninstall: 'Uninstall', confirmUninstall: 'Uninstall “{name}”?', |
| 69 | details: 'Details', loadingDetails: 'Reading the manifest…', |
| 70 | applies: 'Applies: {list}', ignores: 'Not applied: {list}', nothing: 'Nothing in this extension can be applied here.', |
| 71 | needsCode: 'needs its code', notYet: 'not yet', |
| 72 | hasCode: 'Ships code (main/browser): it does not run here — that needs an extension host.', |
| 73 | pack: 'This is a pack of {n} extensions: install them one by one.', |
| 74 | themes: '{n} theme|{n} themes', grammars: '{n} grammar|{n} grammars', snippets: 'snippets ({langs})', languages: '{n} language|{n} languages', |
| 75 | license: 'Licence: {l}', viewLicense: 'view licence', noLicense: 'no licence declared', |
| 76 | verified: 'SHA-256 checked', unverified: 'Open VSX publishes no SHA-256', fromFile: 'from file', |
| 77 | downloads: '{n} downloads', |
| 78 | bigConfirm: 'This extension is {mb} MB. Download it anyway?', |
| 79 | errNet: 'Could not reach Open VSX: {e}', errRate: 'Open VSX is rate-limiting requests: wait a moment and retry.', |
| 80 | errSha: 'The package SHA-256 does not match the published one: not installed.', |
| 81 | errNothing: 'This extension brings nothing that can be applied here (themes, grammars, snippets or languages).', |
| 82 | errNotVsix: 'That is not a VS Code .vsix.', |
| 83 | errNotFound: 'Open VSX does not have that extension or version.', |
| 84 | errHttp: 'Open VSX answered with an error{status}.', |
| 85 | errBig: 'The package is too large to install here.', |
| 86 | errMismatch: 'The package says it is {got}, not {want}: not installed.', |
| 87 | errCorrupt: 'The package is damaged or uses an unsupported zip format{entry}.', |
| 88 | errBadManifest: 'The package.json could not be read: {e}', |
| 89 | errNoName: 'The package.json does not give its name and publisher.', |
| 90 | errUnreadable: 'None of the parts of this extension could be read. {w}', |
| 91 | errBlocked: 'Another Elffuss Code tab is holding the extensions database: close it and try again.', |
| 92 | errQuota: 'There is no browser storage left to install it.', |
| 93 | err: 'Could not do it: {e}', cancelled: 'Cancelled.', |
| 94 | installedMsg: '“{name}” installed.', |
| 95 | grammarNotApplied: '{lang} grammar (Monaco keeps its built-in highlighting)', |
| 96 | settingsNotApplied: '{lang} settings (Monaco keeps its own)', |
| 97 | warnSummary: '{n} part could not be used|{n} parts could not be used', |
| 98 | warn_theme: 'Theme “{name}”: {why}', warn_grammar: 'Grammar {name}: {why}', warn_snippets: 'Snippets {name}: {why}', |
| 99 | warn_config: 'Settings for {name}: {why}', warn_regex: 'Expression discarded in {name}, it could freeze the tab: {why}', |
| 100 | whyMissing: 'the file is not in the package', whyCorrupt: 'the file is damaged', whyBig: 'the file is too large', |
| 101 | whyJson: 'not valid JSON ({e})', whyPlist: 'not a valid plist', whyNotGrammar: 'not a TextMate grammar', |
| 102 | whyNotTheme: 'not a valid theme', whyScope: 'invalid scope name', whyOutside: 'the path leaves the package', |
| 103 | installNamed: 'Install {name}', updateNamed: 'Update {name} to {v}', installedNamed: '{name} is installed', |
| 104 | enableNamed: 'Enable {name}', disableNamed: 'Disable {name}', uninstallNamed: 'Uninstall {name}', |
| 105 | close: 'Close', themeList: 'Color themes', |
| 106 | pickPh: 'Color theme (↑↓ to preview, Enter to select)', builtinGroup: 'Built-in', |
| 107 | builtinDark: 'Dark (default)', builtinLight: 'Light', builtinHc: 'Dark High Contrast', builtinHcLight: 'Light High Contrast', |
| 108 | current: 'current', palExt: 'Extensions…', palTheme: 'Color Theme…', |
| 109 | }, |
| 110 | }; |
| 111 | |
| 112 | export const STRINGS = L; // para comprobar en las pruebas que ES y EN tienen las mismas claves |
| 113 | |
| 114 | export function tx(key, vars) { |
| 115 | const tabla = L[uiLang()] || L.en; |
| 116 | let s = tabla[key] ?? L.en[key] ?? key; |
| 117 | if (s.includes('|') && vars && 'n' in vars) s = s.split('|')[Number(vars.n) === 1 ? 0 : 1]; |
| 118 | return vars ? s.replace(/\{(\w+)\}/g, (_, k) => (vars[k] ?? '')) : s; |
| 119 | } |