Fix translation key references across all pages

Fixes critical issue where translation keys were displaying as literal text instead of translations.

Changes:
- home.js: Fix stat headers (home.* → entities.*)
- dashboard.js: Fix stat headers, chart labels, table columns
- nodes.js: Fix table columns and filter labels (common.* → entities.*)
- advertisements.js: Fix filter widgets and table headers
- messages.js: Fix table column header
- map.js: Fix filter label and dropdown
- admin/node-tags.js: Fix node label reference

All translation keys now correctly reference entities.* section.
Used common.all_entity pattern instead of non-existent common.all_members.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Louis King
2026-02-13 22:31:59 +00:00
parent 5272a72647
commit 1f55d912ea
7 changed files with 18 additions and 18 deletions

View File

@@ -321,7 +321,7 @@ ${flashHtml}
<h2 class="card-title">${t('admin_node_tags.select_node')}</h2>
<div class="flex gap-4 items-end">
<div class="form-control flex-1">
<label class="label"><span class="label-text">${t('common.node')}</span></label>
<label class="label"><span class="label-text">${t('entities.node')}</span></label>
<select id="node-selector" class="select select-bordered w-full">
<option value="">${t('admin_node_tags.select_node_placeholder')}</option>
${allNodes.map(n => {

View File

@@ -57,7 +57,7 @@ ${content}`, container);
? html`
<div class="form-control">
<label class="label py-1">
<span class="label-text">${t('common.node')}</span>
<span class="label-text">${t('entities.node')}</span>
</label>
<select name="public_key" class="select select-bordered select-sm" @change=${autoSubmit}>
<option value="">${t('common.all_nodes')}</option>
@@ -70,10 +70,10 @@ ${content}`, container);
? html`
<div class="form-control">
<label class="label py-1">
<span class="label-text">${t('common.member')}</span>
<span class="label-text">${t('entities.member')}</span>
</label>
<select name="member_id" class="select select-bordered select-sm" @change=${autoSubmit}>
<option value="">${t('common.all_members')}</option>
<option value="">${t('common.all_entity', { entity: t('entities.members') })}</option>
${members.map(m => html`<option value=${m.member_id} ?selected=${member_id === m.member_id}>${m.name}${m.callsign ? ` (${m.callsign})` : ''}</option>`)}
</select>
</div>`
@@ -187,7 +187,7 @@ ${content}`, container);
<table class="table table-zebra">
<thead>
<tr>
<th>${t('common.node')}</th>
<th>${t('entities.node')}</th>
<th>${t('common.time')}</th>
<th>${t('common.receivers')}</th>
</tr>

View File

@@ -67,7 +67,7 @@ function renderRecentAds(ads) {
<table class="table table-compact w-full">
<thead>
<tr>
<th>${t('common.node')}</th>
<th>${t('entities.node')}</th>
<th>${t('common.type')}</th>
<th class="text-right">${t('common.received')}</th>
</tr>
@@ -162,7 +162,7 @@ ${topCount > 0 ? html`
<div class="stat-figure" style="color: ${pageColors.adverts}">
${iconAdvertisements('h-8 w-8')}
</div>
<div class="stat-title">${t('dashboard.advertisements')}</div>
<div class="stat-title">${t('entities.advertisements')}</div>
<div class="stat-value" style="color: ${pageColors.adverts}">${stats.advertisements_7d}</div>
<div class="stat-desc">${t('time.last_7_days')}</div>
</div>` : nothing}
@@ -172,7 +172,7 @@ ${topCount > 0 ? html`
<div class="stat-figure" style="color: ${pageColors.messages}">
${iconMessages('h-8 w-8')}
</div>
<div class="stat-title">${t('dashboard.messages')}</div>
<div class="stat-title">${t('entities.messages')}</div>
<div class="stat-value" style="color: ${pageColors.messages}">${stats.messages_7d}</div>
<div class="stat-desc">${t('time.last_7_days')}</div>
</div>` : nothing}
@@ -198,7 +198,7 @@ ${topCount > 0 ? html`
<div class="card-body">
<h2 class="card-title text-base">
${iconAdvertisements('h-5 w-5')}
${t('dashboard.advertisements')}
${t('entities.advertisements')}
</h2>
<p class="text-xs opacity-70">${t('time.per_day_last_7_days')}</p>
<div class="h-32">
@@ -212,7 +212,7 @@ ${topCount > 0 ? html`
<div class="card-body">
<h2 class="card-title text-base">
${iconMessages('h-5 w-5')}
${t('dashboard.messages')}
${t('entities.messages')}
</h2>
<p class="text-xs opacity-70">${t('time.per_day_last_7_days')}</p>
<div class="h-32">

View File

@@ -124,7 +124,7 @@ export async function render(container, params, router) {
<div class="stat-figure" style="color: ${pageColors.adverts}">
${iconAdvertisements('h-8 w-8')}
</div>
<div class="stat-title">${t('home.advertisements')}</div>
<div class="stat-title">${t('entities.advertisements')}</div>
<div class="stat-value" style="color: ${pageColors.adverts}">${stats.advertisements_7d}</div>
<div class="stat-desc">${t('time.last_7_days')}</div>
</div>` : nothing}
@@ -134,7 +134,7 @@ export async function render(container, params, router) {
<div class="stat-figure" style="color: ${pageColors.messages}">
${iconMessages('h-8 w-8')}
</div>
<div class="stat-title">${t('home.messages')}</div>
<div class="stat-title">${t('entities.messages')}</div>
<div class="stat-value" style="color: ${pageColors.messages}">${stats.messages_7d}</div>
<div class="stat-desc">${t('time.last_7_days')}</div>
</div>` : nothing}

View File

@@ -206,10 +206,10 @@ export async function render(container, params, router) {
</div>
<div class="form-control">
<label class="label py-1">
<span class="label-text">${t('common.member')}</span>
<span class="label-text">${t('entities.member')}</span>
</label>
<select id="filter-member" class="select select-bordered select-sm" @change=${applyFilters}>
<option value="">${t('common.all_members')}</option>
<option value="">${t('common.all_entity', { entity: t('entities.members') })}</option>
${sortedMembers
.filter(m => m.member_id)
.map(m => {

View File

@@ -171,7 +171,7 @@ ${content}`, container);
<th>${t('common.type')}</th>
<th>${t('common.time')}</th>
<th>${t('common.from')}</th>
<th>${t('common.message')}</th>
<th>${t('entities.message')}</th>
<th>${t('common.receivers')}</th>
</tr>
</thead>

View File

@@ -51,10 +51,10 @@ ${content}`, container);
? html`
<div class="form-control">
<label class="label py-1">
<span class="label-text">${t('common.member')}</span>
<span class="label-text">${t('entities.member')}</span>
</label>
<select name="member_id" class="select select-bordered select-sm" @change=${autoSubmit}>
<option value="">${t('common.all_members')}</option>
<option value="">${t('common.all_entity', { entity: t('entities.members') })}</option>
${members.map(m => html`<option value=${m.member_id} ?selected=${member_id === m.member_id}>${m.name}${m.callsign ? ` (${m.callsign})` : ''}</option>`)}
</select>
</div>`
@@ -170,7 +170,7 @@ ${content}`, container);
<table class="table table-zebra">
<thead>
<tr>
<th>${t('common.node')}</th>
<th>${t('entities.node')}</th>
<th>${t('common.last_seen')}</th>
<th>${t('common.tags')}</th>
</tr>