R-563: the remote-backup page polls from a status attribute, and „Fut…" is finally translatable
- backups_remote.html: the status stat carries data-status="{{.Offbox.LastStatus}}"; the poll reads
v.dataset.status === 'running' instead of v.textContent.indexOf('Fut'). The English page could never
see a running backup before this (slice 1 shipped the English page with that word left Hungarian).
- The running label becomes {{T "backups_remote.fut"}} — hu „Fut…" unchanged, en „Running…".
- 12 backups_remote parity fixtures re-captured. Proven (audit switch/fixture diff): each differs from
its predecessor ONLY by the data-status attribute and that one poll line; the other 94 are
byte-identical. The displayed Hungarian is unchanged.
- Tests: TestR563_PollStartsFromAttribute (hu and en), TestR563_AttributeFollowsTheStatus.
Red-proofed twice: poll back on textContent → both languages fail; word back inline → the English
page shows Hungarian.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -195,7 +195,7 @@
|
||||
|
||||
<div class="stats-grid backup-page-cards">
|
||||
<div class="stat-card ">
|
||||
<div class="stat-value" id="offbox-status-value" style="font-size:1.15rem">Fut…</div>
|
||||
<div class="stat-value" id="offbox-status-value" data-status="running" style="font-size:1.15rem">Fut…</div>
|
||||
<div class="stat-label">Utolsó távoli mentés<br><span class="relative-time"># napja</span></div>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
@@ -289,7 +289,10 @@
|
||||
var bar = document.getElementById('offbox-progress-bar');
|
||||
var GRACE = 5;
|
||||
var quiet = 0;
|
||||
var sawRunning = (v && v.textContent.indexOf('Fut') >= 0);
|
||||
|
||||
|
||||
|
||||
var sawRunning = (v && v.dataset.status === 'running');
|
||||
|
||||
var timer = setInterval(function(){
|
||||
fetch('/backup/offbox/status',{headers:{'Accept':'application/json'}})
|
||||
|
||||
Reference in New Issue
Block a user