Translate remaining Go source and overlay.html comments to English

Identifiers, comments, and log/console messages in auth.go, i18n.go,
counter.go, totals.go, and overlay.html's script/CSS comments — the
files the TLS commit didn't already touch. No functional changes.

locales/*.json and overlay.html's own FALLBACK/data-i18n strings stay
bilingual on purpose: that's end-user text for the overlay/panel, a
different audience than the source code, served by the existing i18n
system rather than this convention.
This commit is contained in:
emmatherock committed 2026-09-17 21:51:33 -03:00
1 parent e9fe10f0f7
commit 5a2c3272e9
7 files changed
+213 -211

No files matched your search

+22 -20
View File
@@ -40,8 +40,8 @@
border-top:1px solid var(--gold); border-bottom:1px solid var(--gold);
padding:18px 24px; width:600px; box-sizing:border-box; box-shadow:var(--shadow);
}
/* Con un solo jugador la placa se angosta; el canvas de OBS no cambia,
simplemente ocupa menos. Asi las dimensiones se configuran una vez. */
/* With a single player the plate narrows; the OBS canvas doesn't
change, it just takes up less of it. So the dimensions get set once. */
.plate.solo{width:420px;}
.players{display:flex;align-items:stretch;justify-content:center;}
.pcol{flex:1 1 0;min-width:0;text-align:center;}
@@ -55,9 +55,10 @@
transition:color .15s ease, transform .15s ease;
}
.pnum.pulse{color:var(--gold-bright);transform:scale(1.06);}
/* Una sola linea bajo el numero: dice "muertes" y, cuando hay algo que
contar (jefe, sin conexion), lo agrega ahi mismo. Asi la palabra
siempre esta y el alto del overlay no cambia nunca. */
/* A single line under the number: says "deaths" and, when there's
something else to report (boss, no connection), appends it right
there. That way the word is always present and the overlay's height
never changes. */
.pnote{
font-family:'Cinzel', Georgia, serif;font-size:.7rem;letter-spacing:.22em;text-transform:uppercase;
color:var(--muted);min-height:1.5em;margin-top:.35rem;
@@ -166,9 +167,9 @@
(function(){
var mode = window.__mode || 'control';
// Textos de la interfaz. El diccionario real viene de /strings.json
// (ver i18n.go y locales/*.json). Este de aca es el bote salvavidas:
// si esa peticion falla, se ve ingles y nunca una clave cruda.
// Interface text. The real dictionary comes from /strings.json (see
// i18n.go and locales/*.json). This one here is the lifeboat: if that
// request fails, you see English and never a raw key.
var FALLBACK = {
"overlay.deaths": "deaths",
"overlay.boss": "boss",
@@ -239,18 +240,18 @@
el.className = 'status' + (cls ? ' ' + cls : '');
}
// Cache de las columnas: reconstruir el DOM en cada tick haria
// parpadear el overlay y perderia la animacion del pulso.
// Column cache: rebuilding the DOM on every tick would make the
// overlay flicker and lose the pulse animation.
//
// Se indexan por POSICION, nunca por nombre. Indexarlas por nombre fue
// un bug real: al cambiar de personaje cambiaba la clave, se creaba una
// columna nueva y la vieja quedaba colgada en el DOM, asi que un mismo
// jugador aparecia dos veces. El nombre es contenido, no identidad.
// Indexed by POSITION, never by name. Indexing by name was a real bug:
// switching characters changed the key, spawning a new column and
// leaving the old one stuck in the DOM, so the same player showed up
// twice. The name is content, not identity.
var slots = [];
var prevByName = {};
// ensureSlots deja exactamente n columnas, creando o sacando las que
// hagan falta (con su divisor).
// ensureSlots leaves exactly n columns, creating or removing whatever's
// needed (with its divider).
function ensureSlots(list, n){
while (slots.length > n){
var old = slots.pop();
@@ -291,7 +292,7 @@
for (var i = 0; i < players.length; i++){
var p = players[i];
var slot = slots[i];
// Sin nombre de personaje todavía: etiqueta según el modo.
// No character name yet: label based on the mode.
slot.name.textContent = p.name ||
(players.length < 2 ? t('overlay.deaths') : (p.self ? t('overlay.you') : t('overlay.partner')));
slot.num.textContent = p.connected ? p.deaths : '–';
@@ -363,13 +364,14 @@
setTimeout(poll, 1000);
});
}
// ?lang= en la URL pisa el idioma del config, comodo para tener el
// overlay en un idioma y el panel en otro sin tocar archivos.
// ?lang= in the URL overrides the config's language, handy for having
// the overlay in one language and the panel in another without
// touching any files.
var langParam = new URLSearchParams(location.search).get('lang');
fetch('/strings.json' + (langParam ? '?lang=' + encodeURIComponent(langParam) : ''), {cache:'no-store'})
.then(function(r){ return r.json(); })
.then(function(d){ if (d && typeof d === 'object') STR = d; })
.catch(function(){ /* nos quedamos con FALLBACK */ })
.catch(function(){ /* stick with FALLBACK */ })
.finally(function(){ applyStrings(); poll(); });
})();
</script>