fix: standardize Spanish user-facing copy
This commit is contained in:
+19
-19
@@ -80,7 +80,7 @@ export class Account {
|
||||
if (!me.loggedIn) {
|
||||
// Signed-out: a sign-in pill (only when OAuth is actually available).
|
||||
if (me.auth && me.loginUrl) {
|
||||
this._root.innerHTML = `<a class="signin-pill" href="${escHtml(me.loginUrl)}" title="Sign in for more time"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" y1="12" x2="3" y2="12"/></svg><span>Sign in</span></a>`;
|
||||
this._root.innerHTML = `<a class="signin-pill" href="${escHtml(me.loginUrl)}" title="Inicia sesión para obtener más tiempo"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" y1="12" x2="3" y2="12"/></svg><span>Iniciar sesión</span></a>`;
|
||||
} else {
|
||||
this._root.innerHTML = "";
|
||||
this._root.hidden = true;
|
||||
@@ -97,28 +97,28 @@ export class Account {
|
||||
: `<span class="account-avatar account-avatar-fallback">${escHtml((me.username || "?")[0].toUpperCase())}</span>`;
|
||||
const remaining =
|
||||
isUnlimited || me.remainingSec == null
|
||||
? "Unlimited"
|
||||
: `${fmt(me.remainingSec)} left today`;
|
||||
const tierLabel = isPro ? "PRO" : isUnlimited ? "Team" : "Free";
|
||||
? "Sin límite"
|
||||
: `${fmt(me.remainingSec)} restantes hoy`;
|
||||
const tierLabel = isPro ? "PRO" : isUnlimited ? "Equipo" : "Gratis";
|
||||
|
||||
this._root.innerHTML = `
|
||||
<button id="account-chip" class="account-chip" aria-haspopup="true" aria-expanded="false">
|
||||
${avatar}
|
||||
<span class="account-handle">${escHtml(me.username || "you")}</span>
|
||||
<span class="account-handle">${escHtml(me.username || "tú")}</span>
|
||||
${isPro
|
||||
? '<span class="account-pro">PRO</span>'
|
||||
: me.tier === "org"
|
||||
? '<span class="account-pro account-team">TEAM</span>'
|
||||
? '<span class="account-pro account-team">EQUIPO</span>'
|
||||
: ""}
|
||||
</button>
|
||||
<div id="account-pop" class="account-pop" hidden>
|
||||
<div class="account-pop-row account-pop-name">${escHtml(me.username || "you")}</div>
|
||||
<div class="account-pop-row account-pop-name">${escHtml(me.username || "tú")}</div>
|
||||
<div class="account-pop-row account-pop-meta">
|
||||
<span class="account-tier">${tierLabel}</span>
|
||||
<span class="account-remaining">${escHtml(remaining)}</span>
|
||||
</div>
|
||||
${isUnlimited ? "" : `<a class="account-pop-link" href="${PRO_URL}" target="_blank" rel="noopener">Upgrade to PRO</a>`}
|
||||
<a class="account-pop-link account-signout" href="${escHtml(me.logoutUrl || "#")}">Sign out</a>
|
||||
${isUnlimited ? "" : `<a class="account-pop-link" href="${PRO_URL}" target="_blank" rel="noopener">Pasar a PRO</a>`}
|
||||
<a class="account-pop-link account-signout" href="${escHtml(me.logoutUrl || "#")}">Cerrar sesión</a>
|
||||
</div>`;
|
||||
|
||||
const chip = $("#account-chip");
|
||||
@@ -152,13 +152,13 @@ export class Account {
|
||||
*/
|
||||
showLimit(tier = this.tier) {
|
||||
const canSignIn = this._me.auth && this._me.loginUrl;
|
||||
this._modalTitle.textContent = "Thanks for chatting!";
|
||||
this._modalTitle.textContent = "¡Gracias por conversar!";
|
||||
if (tier === "anon") {
|
||||
this._modalMsg.textContent =
|
||||
"Guest conversations run for 5 minutes. Sign in with Hugging Face to get 10 minutes a day for free, and PRO members chat with no limit at all.";
|
||||
this._modalNote.textContent = "Your free minutes refresh tomorrow.";
|
||||
"Las conversaciones de invitados duran 5 minutos. Inicia sesión con Hugging Face para obtener 10 minutos gratis al día. Los miembros PRO pueden conversar sin límite.";
|
||||
this._modalNote.textContent = "Tus minutos gratis se renuevan mañana.";
|
||||
if (canSignIn) {
|
||||
this._modalCta.innerHTML = `${HF_MARK}<span>Sign in with Hugging Face</span>`;
|
||||
this._modalCta.innerHTML = `${HF_MARK}<span>Iniciar sesión con Hugging Face</span>`;
|
||||
this._modalCta.href = /** @type {string} */ (this._me.loginUrl);
|
||||
this._modalCta.hidden = false;
|
||||
} else {
|
||||
@@ -167,9 +167,9 @@ export class Account {
|
||||
} else {
|
||||
// Signed-in, non-PRO.
|
||||
this._modalMsg.textContent =
|
||||
"You've enjoyed your 10 minutes for today. Go PRO for unlimited conversations and to support open source AI.";
|
||||
this._modalNote.textContent = "Or come back tomorrow. Your minutes reset daily.";
|
||||
this._modalCta.innerHTML = "<span>Upgrade to PRO</span>";
|
||||
"Ya has usado tus 10 minutos de hoy. Pasa a PRO para conversar sin límite y apoyar la IA de código abierto.";
|
||||
this._modalNote.textContent = "También puedes volver mañana. Tus minutos se renuevan cada día.";
|
||||
this._modalCta.innerHTML = "<span>Pasar a PRO</span>";
|
||||
this._modalCta.href = PRO_URL;
|
||||
this._modalCta.hidden = false;
|
||||
}
|
||||
@@ -179,10 +179,10 @@ export class Account {
|
||||
/** Show a warm "we're at capacity" message when even the waiting line is full.
|
||||
* Reuses the limit modal shell; no call-to-action, just reassurance. */
|
||||
showBusy() {
|
||||
this._modalTitle.textContent = "Hugged to the limit 🤗";
|
||||
this._modalTitle.textContent = "¡Estamos al límite de abrazos! 🤗";
|
||||
this._modalMsg.textContent =
|
||||
"Every slot and the whole line are full right now. Too much love! Grab a coffee and pop back in a minute.";
|
||||
this._modalNote.textContent = "A spot usually opens up within a few minutes.";
|
||||
"Todos los lugares y la cola están ocupados. ¡Demasiado cariño! Tómate un café y vuelve en un minuto.";
|
||||
this._modalNote.textContent = "Normalmente se libera un lugar en pocos minutos.";
|
||||
this._modalCta.hidden = true;
|
||||
if (!this._modal.open) this._modal.showModal();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user