= htmlspecialchars($mcpSlug) ?>
+ MCP →
diff --git a/preview.php b/preview.php
index 931d2c9..c949903 100644
--- a/preview.php
+++ b/preview.php
@@ -18,16 +18,19 @@ $returnPath = '/';
$toolsLogin = 'https://dobetternorge.no/tools-login.php?return=' . urlencode($returnPath);
$toolMcpSlugs = [
- 'transcribe' => 'dbn.transcribe_audio',
- 'timeline' => 'dbn.timeline',
- 'redact' => 'dbn.redact',
- 'korrespond' => 'dbn.korrespond',
- 'barnevernet' => 'dbn.barnevernet_analyze',
- 'advocate' => 'dbn.advocate_brief',
- 'deep-research' => 'dbn.deep_research',
- 'discrepancy' => 'dbn.discrepancy_find',
- 'corpus' => 'dbn.list_documents',
- 'citations' => 'dbn.citation_graph',
+ 'transcribe' => 'dbn.transcribe_audio',
+ 'timeline' => 'dbn.timeline',
+ 'redact' => 'dbn.redact',
+ 'summarize' => 'dbn.summarize',
+ 'legal-analysis' => 'dbn.legal_analysis',
+ 'korrespond' => 'dbn.korrespond',
+ 'barnevernet' => 'dbn.barnevernet_analyze',
+ 'advocate' => 'dbn.advocate_brief',
+ 'deep-research' => 'dbn.deep_research',
+ 'discrepancy' => 'dbn.discrepancy_find',
+ 'corpus' => 'dbn.list_documents',
+ 'citations' => 'dbn.citation_graph',
+ 'translate' => 'dbn.translate',
];
$toolMcpSlug = $toolMcpSlugs[$slug] ?? null;
@@ -207,7 +210,12 @@ $localizedContent = [
// uk/pl fall back to 'en' — sample documents are Norwegian regardless
$contentLang = array_key_exists($uiLang, $localizedContent) ? $uiLang : 'en';
-$localContent = $localizedContent[$contentLang][$slug];
+$localContent = $localizedContent[$contentLang][$slug] ?? $localizedContent['en'][$slug] ?? null;
+if ($localContent === null) {
+ // No marketing copy authored for this slug yet — send the visitor straight to the tool.
+ header('Location: /' . $slug . '.php' . ($uiLang !== 'en' ? '?lang=' . urlencode($uiLang) : ''));
+ exit;
+}
// ── Sample inputs/outputs (always Norwegian — legal domain is Norway) ─────────
$samples = [
@@ -483,7 +491,7 @@ $samples = [
],
];
-$sample = $samples[$slug];
+$sample = $samples[$slug] ?? null;
?>
@@ -551,6 +559,7 @@ $sample = $samples[$slug];
+
= $uiLang === 'no' ? 'Bruk dette verktøyet direkte fra Claude Desktop, Claude Code eller Cursor.' : 'Use this tool directly from Claude Desktop, Claude Code, or Cursor.' ?>
-= htmlspecialchars($toolMcpSlug) ?>
-
- claude_desktop_config.json
-{
- "mcpServers": {
- "dbn-tools": {
- "command": "npx",
- "args": ["-y", "@dobetternorge/mcp"],
- "env": { "DBN_API_TOKEN": "YOUR_TOKEN" }
- }
- }
-}
-
- = $uiLang === 'no'
- ? 'API-token krever Plus- eller Pro-plan. Logg inn for å generere token og se full oppsettsguide.'
- : 'API tokens require a Plus or Pro plan. Log in to generate a token and view the full setup guide.' ?>
+
+ = $uiLang === 'no' ? 'Bruker du Claude Desktop, Claude Code eller Cursor?' : 'Using Claude Desktop, Claude Code, or Cursor?' ?>
+ = $uiLang === 'no' ? 'Se MCP-oppsett for dette verktøyet' : 'See MCP setup for this tool' ?> →