fix: standardize Spanish user-facing copy
This commit is contained in:
+11
-11
@@ -34,7 +34,7 @@ function reportChatDebug(hypothesisId, location, msg, data = {}) {
|
||||
|
||||
const WRENCH_PATH = `<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/>`;
|
||||
const CHAT_BUBBLE_SVG = `<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>`;
|
||||
const EMPTY_STATE_HTML = `<div id="chat-empty" class="chat-empty">${CHAT_BUBBLE_SVG}<span class="chat-empty-title">No messages yet</span><span class="chat-empty-hint">Tap the orb and start talking</span></div>`;
|
||||
const EMPTY_STATE_HTML = `<div id="chat-empty" class="chat-empty">${CHAT_BUBBLE_SVG}<span class="chat-empty-title">Aún no hay mensajes</span><span class="chat-empty-hint">Toca el círculo y empieza a hablar</span></div>`;
|
||||
/**
|
||||
* @param {string} prefix
|
||||
* @param {string} [sep]
|
||||
@@ -298,7 +298,7 @@ export class ChatView {
|
||||
_buildMessageEl({ container, prefix, role, text, partial = false }) {
|
||||
const el = document.createElement("div");
|
||||
el.className = `${container} ${role}`;
|
||||
const label = role === "user" ? "You" : "Assistant";
|
||||
const label = role === "user" ? "Tú" : "Asistente";
|
||||
const stamp = this._nowStamp();
|
||||
if (role === "user") {
|
||||
const uName = this._resolveUserName();
|
||||
@@ -451,17 +451,17 @@ export class ChatView {
|
||||
const el = document.createElement("div");
|
||||
el.className = "hist-msg tool";
|
||||
el.innerHTML = `
|
||||
<div class="hist-role">Tool call</div>
|
||||
<div class="hist-role">Llamada a herramienta</div>
|
||||
<button class="hist-tool-header" aria-expanded="false">
|
||||
<svg class="hist-tool-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${WRENCH_PATH}</svg>
|
||||
<span class="hist-tool-name">${escHtml(name)}</span>
|
||||
<svg class="hist-tool-chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>
|
||||
</button>
|
||||
<div class="hist-tool-body">
|
||||
<div class="hist-tool-label">Input</div>
|
||||
<div class="hist-tool-label">Entrada</div>
|
||||
<div class="hist-tool-block">${escHtml(pretty)}</div>
|
||||
<div class="hist-tool-label">Output</div>
|
||||
<div class="hist-tool-block hist-tool-output">${escHtml(output || "(no output)")}</div>
|
||||
<div class="hist-tool-label">Salida</div>
|
||||
<div class="hist-tool-block hist-tool-output">${escHtml(output || "(sin salida)")}</div>
|
||||
</div>
|
||||
`;
|
||||
const header = /** @type {HTMLButtonElement} */ (el.querySelector(".hist-tool-header"));
|
||||
@@ -482,7 +482,7 @@ export class ChatView {
|
||||
hist.classList.add("interrupted");
|
||||
const note = document.createElement("div");
|
||||
note.className = "hist-note";
|
||||
note.textContent = "Interrupted";
|
||||
note.textContent = "Interrumpido";
|
||||
hist.appendChild(note);
|
||||
}
|
||||
|
||||
@@ -493,7 +493,7 @@ export class ChatView {
|
||||
if (empty) empty.remove();
|
||||
const el = document.createElement("div");
|
||||
el.className = "hist-msg tool";
|
||||
el.innerHTML = `<div class="hist-role">Snapshot</div><img class="hist-image" alt="Webcam snapshot sent to the model" />`;
|
||||
el.innerHTML = `<div class="hist-role">Captura</div><img class="hist-image" alt="Captura de la cámara enviada al modelo" />`;
|
||||
const img = /** @type {HTMLImageElement} */ (el.querySelector("img"));
|
||||
img.src = dataUrl;
|
||||
this._chatHistory.appendChild(el);
|
||||
@@ -607,11 +607,11 @@ export class ChatView {
|
||||
lines.push(head);
|
||||
const args = String(m.args || "").trim();
|
||||
const output = String(m.output || "").trim();
|
||||
if (args) { lines.push(" Input:"); lines.push(" " + args.split("\n").join("\n ")); }
|
||||
if (output) { lines.push(" Output:"); lines.push(" " + output.split("\n").join("\n ")); }
|
||||
if (args) { lines.push(" Entrada:"); lines.push(" " + args.split("\n").join("\n ")); }
|
||||
if (output) { lines.push(" Salida:"); lines.push(" " + output.split("\n").join("\n ")); }
|
||||
lines.push("");
|
||||
} else if (m.type === "image") {
|
||||
const head = [m.timestamp, "SNAPSHOT (imagen web-cámara enviada al modelo)"].filter(Boolean).join(" ");
|
||||
const head = [m.timestamp, "CAPTURA (imagen de la cámara enviada al modelo)"].filter(Boolean).join(" ");
|
||||
lines.push(head);
|
||||
lines.push(" " + String(m.dataUrl || "").slice(0, 80) + (String(m.dataUrl || "").length > 80 ? "…" : ""));
|
||||
lines.push("");
|
||||
|
||||
Reference in New Issue
Block a user