i18n all /dashboard/ corpus pages for en/no/uk/pl

- Add require_once bootstrap.php to all 6 dashboard page files so
  dbnToolsT() is available before layout_dashboard.php is included
- Add dash_upload_category_lbl key to no/uk/pl sections of i18n.php
  (was only in English); Kategori/Категорія/Kategoria
- Fix broken ternary on upload.php Category label — replace with
  dbnToolsT('dash_upload_category_lbl', $uiLang)
- layout_dashboard.php outputs window.DBN_I18N with all js_* keys
  so dashboard JS reads locale-aware strings from PHP translations

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-23 20:10:57 +02:00
parent 90117fa9de
commit a9e64b65ce
8 changed files with 886 additions and 197 deletions
+20 -20
View File
@@ -1,54 +1,54 @@
<?php
declare(strict_types=1);
require_once __DIR__ . '/../includes/bootstrap.php';
$dashboardPage = 'settings';
$dashboardTitle = 'Innstillinger';
$dashboardLead = 'Innstillinger for ditt private korpus.';
$dashboardTitle = dbnToolsT('dash_title_settings', dbnToolsCurrentLanguage());
$dashboardLead = dbnToolsT('dash_lead_settings', dbnToolsCurrentLanguage());
require_once __DIR__ . '/../includes/layout_dashboard.php';
?>
<section class="dash-card">
<div class="dash-card__head">
<h2>Konto</h2>
<h2><?= htmlspecialchars(dbnToolsT('dash_section_account', $uiLang)) ?></h2>
</div>
<dl style="display:grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.5rem; font-size:0.92rem;">
<dt style="color:rgba(22,19,15,0.55);">Klient-ID</dt>
<dt style="color:rgba(22,19,15,0.55);"><?= htmlspecialchars(dbnToolsT('dash_label_client_id', $uiLang)) ?></dt>
<dd><code id="setClientId">—</code></dd>
<dt style="color:rgba(22,19,15,0.55);">Korpus-ID</dt>
<dt style="color:rgba(22,19,15,0.55);"><?= htmlspecialchars(dbnToolsT('dash_label_corpus_id', $uiLang)) ?></dt>
<dd><code id="setCorpusId">—</code></dd>
<dt style="color:rgba(22,19,15,0.55);">Bruker-ID</dt>
<dt style="color:rgba(22,19,15,0.55);"><?= htmlspecialchars(dbnToolsT('dash_label_user_id', $uiLang)) ?></dt>
<dd><code id="setUserId">—</code></dd>
</dl>
</section>
<section class="dash-card">
<div class="dash-card__head">
<h2>RAG-pipeline</h2>
<h2><?= htmlspecialchars(dbnToolsT('dash_section_rag', $uiLang)) ?></h2>
</div>
<dl style="display:grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.5rem; font-size:0.92rem;">
<dt style="color:rgba(22,19,15,0.55);">Chunking</dt>
<dd>600 ord pr. passasje, 75 ords overlapp, heading-aware</dd>
<dt style="color:rgba(22,19,15,0.55);">Embedding-modell</dt>
<dd><code>nomic-embed-text</code> (768-dim) via LiteLLM Colin</dd>
<dd>600 words/passage, 75-word overlap, heading-aware</dd>
<dt style="color:rgba(22,19,15,0.55);">Embedding model</dt>
<dd><code>nomic-embed-text</code> (768-dim) via LiteLLM on Colin</dd>
<dt style="color:rgba(22,19,15,0.55);">Vector DB</dt>
<dd><code>bnl_client_chunks</code> i Qdrant (Colin Docker)</dd>
<dt style="color:rgba(22,19,15,0.55);">Søkemetode</dt>
<dd><code>bnl_client_chunks</code> in Qdrant (Colin Docker)</dd>
<dt style="color:rgba(22,19,15,0.55);">Search method</dt>
<dd>Hybrid (vector + keyword), reciprocal rank fusion, private boost 1.5×</dd>
<dt style="color:rgba(22,19,15,0.55);">Graf-database</dt>
<dd><code>bnl_legal</code> i FalkorDB (Colin) — siterings-edges</dd>
<dt style="color:rgba(22,19,15,0.55);">Graph DB</dt>
<dd><code>bnl_legal</code> in FalkorDB (Colin) — citation edges</dd>
</dl>
</section>
<section class="dash-card">
<div class="dash-card__head">
<h2>Personvern</h2>
<h2><?= htmlspecialchars(dbnToolsT('dash_section_privacy', $uiLang)) ?></h2>
</div>
<p style="margin-top:0; max-width:64ch; line-height:1.6;">
Alt du laster opp eller lagrer her holdes til din konto. Andre brukere kan ikke se eller søke i dine dokumenter.
Felles-pakken <code>family-legal</code> (~220K passasjer av norsk lovverk og rettspraksis) er delt og brukes
for å berike svar med autoritative kilder, men du eier alt du selv legger inn.
<?= htmlspecialchars(dbnToolsT('dash_privacy_p1', $uiLang)) ?>
</p>
<p style="max-width:64ch; line-height:1.6;">
Slett enkelt-dokumenter fra <a href="/dashboard/documents.php">Dokumenter</a>. Trenger du å slette hele
kontoen, kontakt support.
<?= htmlspecialchars(dbnToolsT('dash_privacy_p2a', $uiLang)) ?>
<a href="/dashboard/documents.php"><?= htmlspecialchars(dbnToolsT('dash_nav_documents', $uiLang)) ?></a>.
<?= htmlspecialchars(dbnToolsT('dash_privacy_p2b', $uiLang)) ?>
</p>
</section>