feat(i18n): localize all remaining in-file data arrays — English base fully complete

Converts every last bare-Swedish const array across landing sections
(STATS, TILES, CHAIN, PIPELINE, MODELS, DATASETS, PRINCIPLES, COLUMNS)
and shared components (data-artifact, provenance-badge) to {en,sv} Loc
objects consumed via useT(). Verified by per-file verify agent: 10/10
clean, zero remaining bare-Swedish display text. tsc 0 + build green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-25 11:58:54 +02:00
co-authored by Claude Opus 4.8
parent 125b2e1bbe
commit f4beca3f76
12 changed files with 176 additions and 128 deletions
+1 -1
View File
@@ -176,7 +176,7 @@ export default function SourcesPage() {
border: l.level === 0 ? "1px solid var(--prov-0)" : "none",
}}
/>
{l.text}
{t(l.text)}
</span>
))}
</div>
+19 -15
View File
@@ -18,7 +18,11 @@ import { LoadingSkeleton, ErrorState } from "@/components/states";
* raderas efter jobbet. Inga råa creds lagras i klartext.
*/
const SCOPES = ["Endast läsning", "Utvald tabell", "Vald vy"];
const SCOPES: { id: string; label: { en: string; sv: string } }[] = [
{ id: "read_only", label: { en: "Read only", sv: "Endast läsning" } },
{ id: "selected_table", label: { en: "Selected table", sv: "Utvald tabell" } },
{ id: "selected_view", label: { en: "Selected view", sv: "Vald vy" } },
];
const SECTION =
"border border-border bg-background";
@@ -125,7 +129,7 @@ function ApiKeys() {
function DbAccess() {
const t = useT();
const [conn, setConn] = useState("");
const [scope, setScope] = useState(SCOPES[0]);
const [scope, setScope] = useState(SCOPES[0].id);
const [expires, setExpires] = useState("");
const [submitting, setSubmitting] = useState(false);
const [guidance, setGuidance] = useState<string | null>(null);
@@ -203,8 +207,8 @@ function DbAccess() {
className={INPUT}
>
{SCOPES.map((s) => (
<option key={s} value={s}>
{s}
<option key={s.id} value={s.id}>
{t(s.label)}
</option>
))}
</select>
@@ -263,17 +267,17 @@ function DbAccess() {
<span className={LABEL}>{t({ en: "How it works", sv: "Så fungerar det" })}</span>
<ul className="flex flex-col gap-3 text-[13px] leading-relaxed text-muted-foreground">
{[
["Read-only", "Endast läsrättigheter. Inga skrivningar."],
["Tidsbegränsad", "Rollen löper ut på ditt valda datum."],
["Raderad efteråt", "Åtkomsten dras vid jobbets slut."],
].map(([h, t]) => (
<li key={h} className="flex gap-3">
{ h: { en: "Read-only", sv: "Read-only" }, b: { en: "Read rights only. No writes.", sv: "Endast läsrättigheter. Inga skrivningar." } },
{ h: { en: "Time-boxed", sv: "Tidsbegränsad" }, b: { en: "The role expires on your chosen date.", sv: "Rollen löper ut på ditt valda datum." } },
{ h: { en: "Deleted afterwards", sv: "Raderad efteråt" }, b: { en: "Access is revoked when the job ends.", sv: "Åtkomsten dras vid jobbets slut." } },
].map((row) => (
<li key={row.h.en} className="flex gap-3">
<span
className="mt-1.5 inline-block h-2 w-2 shrink-0"
style={{ backgroundColor: "var(--prov-3)" }}
/>
<span>
<span className="font-medium text-foreground">{h}.</span> {t}
<span className="font-medium text-foreground">{t(row.h)}.</span> {t(row.b)}
</span>
</li>
))}
@@ -292,10 +296,10 @@ function DbAccess() {
/* ── Leverans ────────────────────────────────────────────────────────────── */
const CHANNELS: { id: string; name: string; sub: string; on: boolean }[] = [
{ id: "fivecrm", name: "FiveCRM", sub: "push av berikade poster", on: true },
{ id: "webhook", name: "Webhook", sub: "HTTPS POST per batch", on: false },
{ id: "sheets", name: "Google Sheets", sub: "spegla till kalkylark", on: false },
const CHANNELS: { id: string; name: string; sub: { en: string; sv: string }; on: boolean }[] = [
{ id: "fivecrm", name: "FiveCRM", sub: { en: "push of enriched records", sv: "push av berikade poster" }, on: true },
{ id: "webhook", name: "Webhook", sub: { en: "HTTPS POST per batch", sv: "HTTPS POST per batch" }, on: false },
{ id: "sheets", name: "Google Sheets", sub: { en: "mirror to spreadsheet", sv: "spegla till kalkylark" }, on: false },
];
function Delivery() {
@@ -333,7 +337,7 @@ function Delivery() {
{c.name}
</span>
<span className="font-mono text-[10px] uppercase tracking-[0.14em] text-muted-foreground">
{c.sub}
{t(c.sub)}
</span>
</div>
</div>
+7 -7
View File
@@ -51,14 +51,14 @@ export default function SettingsPage() {
<p className="font-mono text-[11px] uppercase tracking-[0.12em] text-muted-foreground">{t({ en: "Data handling & DPA", sv: "Datahantering & DPA" })}</p>
<ul className="mt-4 space-y-2.5 text-sm">
{[
["Härkomst per fält", "Källa, färskhet, konfidens — på varje uppgift."],
["GDPR-native", "Laglig grund och DPA per leverans."],
["Din data: du pushar", "Read-only roll du skapar. Tidsbegränsad. Raderad efteråt."],
["Revisionslogg", "Vad. När. Varför."],
].map(([t, s]) => (
<li key={t} className="flex items-start gap-2">
{ title: { en: "Provenance per field", sv: "Härkomst per fält" }, body: { en: "Source, freshness, confidence — on every value.", sv: "Källa, färskhet, konfidens — på varje uppgift." } },
{ title: { en: "GDPR-native", sv: "GDPR-native" }, body: { en: "Lawful basis and DPA per delivery.", sv: "Laglig grund och DPA per leverans." } },
{ title: { en: "Your data: you push", sv: "Din data: du pushar" }, body: { en: "A read-only role you create. Time-boxed. Deleted afterwards.", sv: "Read-only roll du skapar. Tidsbegränsad. Raderad efteråt." } },
{ title: { en: "Audit log", sv: "Revisionslogg" }, body: { en: "What. When. Why.", sv: "Vad. När. Varför." } },
].map((item) => (
<li key={item.title.en} className="flex items-start gap-2">
<span className="mt-0.5" style={{ color: "var(--prov-3)" }}>✓</span>
<span><span className="font-medium">{t}.</span> <span className="text-muted-foreground">{s}</span></span>
<span><span className="font-medium">{t(item.title)}.</span> <span className="text-muted-foreground">{t(item.body)}</span></span>
</li>
))}
</ul>
+11 -6
View File
@@ -1,17 +1,19 @@
"use client";
import { useReveal } from "@/hooks/use-reveal";
import { useT } from "@/components/locale-provider";
type Variant = "table" | "map" | "schema" | "chart" | "grid";
type Loc = { en: string; sv: string };
const PROV = ["var(--prov-0)", "var(--prov-1)", "var(--prov-2)", "var(--prov-3)"];
const TABLE_ROWS: [string, string, 0 | 1 | 2 | 3][] = [
const TABLE_ROWS: [string | Loc, string | Loc, 0 | 1 | 2 | 3][] = [
["Volvo Group", "GLEIF", 3],
["Equinor ASA", "Brreg", 3],
["Maersk A/S", "CVR", 2],
["Nokia Oyj", "PRH", 2],
["E-post (FI)", "licens", 0],
[{ en: "Email (FI)", sv: "E-post (FI)" }, { en: "license", sv: "licens" }, 0],
];
const MAP_CELLS: [string, number][] = [
["SE", 98], ["NO", 96], ["DK", 94], ["FI", 89],
@@ -26,20 +28,23 @@ const CHART_BARS = [42, 61, 38, 74, 55, 88];
*/
export function DataArtifact({ variant, className = "" }: { variant: Variant; className?: string }) {
const ref = useReveal<HTMLDivElement>();
const t = useT();
// Resolve a value that may be a plain string (literal token) or a {en,sv} map.
const tx = (v: string | Loc): string => (typeof v === "string" ? v : t(v));
return (
<div ref={ref} className={`group grain-overlay relative overflow-hidden border border-border bg-background ${className}`}>
{variant === "table" ? (
<div>
<div className="flex items-center justify-between border-b border-border px-4 py-2.5">
<span className="font-mono text-[10px] uppercase tracking-[0.18em] text-foreground">dim_company</span>
<span className="font-mono text-[10px] uppercase tracking-[0.18em] text-muted-foreground">härkomst</span>
<span className="font-mono text-[10px] uppercase tracking-[0.18em] text-muted-foreground">{t({ en: "provenance", sv: "härkomst" })}</span>
</div>
{TABLE_ROWS.map((r, i) => (
<div key={i} className={`reveal-left delay-${i + 1} flex items-center justify-between border-b border-border px-4 py-3 transition-colors duration-200 last:border-b-0 hover:bg-secondary`}>
<span className="truncate text-[15px] tracking-tight">{r[0]}</span>
<span className="truncate text-[15px] tracking-tight">{tx(r[0])}</span>
<span className="ml-3 inline-flex items-center gap-2 font-mono text-[10px] uppercase tracking-[0.08em] text-muted-foreground">
<span className="inline-block h-2 w-2" style={{ backgroundColor: r[2] === 0 ? "transparent" : PROV[r[2]], border: r[2] === 0 ? `1px solid ${PROV[0]}` : "none" }} />
{r[1]}
{tx(r[1])}
</span>
</div>
))}
@@ -77,7 +82,7 @@ export function DataArtifact({ variant, className = "" }: { variant: Variant; cl
{variant === "chart" ? (
<div className="relative">
<span className="pointer-events-none absolute left-4 top-3 select-none font-mono text-[10px] uppercase tracking-[0.18em] text-muted-foreground">täckning</span>
<span className="pointer-events-none absolute left-4 top-3 select-none font-mono text-[10px] uppercase tracking-[0.18em] text-muted-foreground">{t({ en: "coverage", sv: "täckning" })}</span>
<span className="pointer-events-none absolute right-4 top-3 select-none font-mono text-5xl font-semibold leading-none tracking-tighter text-border">06</span>
<div className="flex h-44 items-end gap-2.5 px-4 pb-4 pt-12">
{CHART_BARS.map((h, i) => (
+22 -17
View File
@@ -1,17 +1,20 @@
import type { ProvLevel } from "@/lib/data";
"use client";
import type { ProvLevel, Loc } from "@/lib/data";
import { useT } from "@/components/locale-provider";
const PROV_COLOR: Record<ProvLevel, string> = {
0: "var(--prov-0)", // ej tillgänglig / licens
1: "var(--prov-1)", // en källa
2: "var(--prov-2)", // delvis bekräftad
3: "var(--prov-3)", // flera källor överens
0: "var(--prov-0)", // not available / licence
1: "var(--prov-1)", // one source
2: "var(--prov-2)", // partially confirmed
3: "var(--prov-3)", // multiple sources agree
};
const PROV_LABEL: Record<ProvLevel, string> = {
0: "Ej tillgänglig / licens",
1: "En källa",
2: "Delvis bekräftad",
3: "Flera källor överens",
const PROV_LABEL: Record<ProvLevel, Loc> = {
0: { en: "Not available / licence", sv: "Ej tillgänglig / licens" },
1: { en: "One source", sv: "En källa" },
2: { en: "Partially confirmed", sv: "Delvis bekräftad" },
3: { en: "Multiple sources agree", sv: "Flera källor överens" },
};
/**
@@ -28,10 +31,11 @@ export function ProvenanceBadge({
source: string;
freshness?: string;
}) {
const t = useT();
return (
<span
className="inline-flex items-center gap-1.5 border border-border px-1.5 py-0.5 font-mono text-[10.5px] tracking-[0.02em] text-muted-foreground"
title={PROV_LABEL[level]}
title={t(PROV_LABEL[level])}
>
<span
aria-hidden
@@ -54,10 +58,11 @@ export function ProvenanceBadge({
/** Just the 9px status square — for the end of table cells. */
export function CellProvenance({ level }: { level: ProvLevel }) {
const t = useT();
return (
<span
aria-hidden
title={PROV_LABEL[level]}
title={t(PROV_LABEL[level])}
className="ml-1.5 inline-block h-[9px] w-[9px] align-middle"
style={{
backgroundColor: level === 0 ? "transparent" : PROV_COLOR[level],
@@ -67,9 +72,9 @@ export function CellProvenance({ level }: { level: ProvLevel }) {
);
}
export const PROVENANCE_LEGEND: { level: ProvLevel; text: string }[] = [
{ level: 3, text: "Flera källor överens" },
{ level: 2, text: "Delvis bekräftad" },
{ level: 1, text: "En källa" },
{ level: 0, text: "Licens krävs / ej tillgänglig" },
export const PROVENANCE_LEGEND: { level: ProvLevel; text: Loc }[] = [
{ level: 3, text: { en: "Multiple sources agree", sv: "Flera källor överens" } },
{ level: 2, text: { en: "Partially confirmed", sv: "Delvis bekräftad" } },
{ level: 1, text: { en: "One source", sv: "En källa" } },
{ level: 0, text: { en: "Licence required / not available", sv: "Licens krävs / ej tillgänglig" } },
];
@@ -10,24 +10,34 @@ import type { ProvLevel } from "@/lib/data";
const FILTERS = ["Alla", "Bolag", "Beslutsfattare", "Fordon", "Finansiellt"] as const;
type Filter = (typeof FILTERS)[number];
const FILTER_LABELS: Record<Filter, { en: string; sv: string }> = {
Alla: { en: "All", sv: "Alla" },
Bolag: { en: "Companies", sv: "Bolag" },
Beslutsfattare: { en: "Decision-makers", sv: "Beslutsfattare" },
Fordon: { en: "Vehicles", sv: "Fordon" },
Finansiellt: { en: "Financial", sv: "Finansiellt" },
};
type Localized = { en: string; sv: string };
interface Dataset {
markets: string;
title: string;
desc: string;
count: string;
freshness: string;
title: Localized;
desc: Localized;
count: Localized;
freshness: Localized;
level: ProvLevel;
source: string;
source: Localized;
cat: Exclude<Filter, "Alla">;
}
const DATASETS: Dataset[] = [
{ markets: "SE · NO · DK · FI", title: "Nordisk bolagsdata", desc: "Officiella register. Per fält.", count: "4,9M poster", freshness: "daglig", level: 3, source: "GLEIF · Brreg", cat: "Bolag" },
{ markets: "SE · NO · DK · FI", title: "Beslutsfattare i tech", desc: "Roll och väg. Källa per fält.", count: "182k poster", freshness: "veckovis", level: 1, source: "publik webb", cat: "Beslutsfattare" },
{ markets: "SE", title: "Fordon & flotta", desc: "Tekniska data. VehIQ-synergin.", count: "6,1M poster", freshness: "daglig", level: 2, source: "register", cat: "Fordon" },
{ markets: "SE · NO · DK · FI", title: "Finansiella serier", desc: "Omsättning, resultat, nyckeltal.", count: "12 år", freshness: "årlig", level: 2, source: "register", cat: "Finansiellt" },
{ markets: "Norden", title: "Köpsignaler", desc: "Annonser, nyheter, teknikbyten.", count: "löpande", freshness: "veckovis", level: 1, source: "webb", cat: "Bolag" },
{ markets: "EU", title: "Sanktioner / PEP", desc: "Officiella listor. Screening.", count: "global", freshness: "daglig", level: 3, source: "OpenSanctions", cat: "Bolag" },
{ markets: "SE · NO · DK · FI", title: { en: "Nordic company data", sv: "Nordisk bolagsdata" }, desc: { en: "Official registers. Per field.", sv: "Officiella register. Per fält." }, count: { en: "4.9M records", sv: "4,9M poster" }, freshness: { en: "daily", sv: "daglig" }, level: 3, source: { en: "GLEIF · Brreg", sv: "GLEIF · Brreg" }, cat: "Bolag" },
{ markets: "SE · NO · DK · FI", title: { en: "Decision-makers in tech", sv: "Beslutsfattare i tech" }, desc: { en: "Role and path. Source per field.", sv: "Roll och väg. Källa per fält." }, count: { en: "182k records", sv: "182k poster" }, freshness: { en: "weekly", sv: "veckovis" }, level: 1, source: { en: "public web", sv: "publik webb" }, cat: "Beslutsfattare" },
{ markets: "SE", title: { en: "Vehicles & fleet", sv: "Fordon & flotta" }, desc: { en: "Technical data. The VehIQ synergy.", sv: "Tekniska data. VehIQ-synergin." }, count: { en: "6.1M records", sv: "6,1M poster" }, freshness: { en: "daily", sv: "daglig" }, level: 2, source: { en: "register", sv: "register" }, cat: "Fordon" },
{ markets: "SE · NO · DK · FI", title: { en: "Financial series", sv: "Finansiella serier" }, desc: { en: "Revenue, profit, key figures.", sv: "Omsättning, resultat, nyckeltal." }, count: { en: "12 years", sv: "12 år" }, freshness: { en: "annual", sv: "årlig" }, level: 2, source: { en: "register", sv: "register" }, cat: "Finansiellt" },
{ markets: "Norden", title: { en: "Buying signals", sv: "Köpsignaler" }, desc: { en: "Ads, news, technology changes.", sv: "Annonser, nyheter, teknikbyten." }, count: { en: "continuous", sv: "löpande" }, freshness: { en: "weekly", sv: "veckovis" }, level: 1, source: { en: "web", sv: "webb" }, cat: "Bolag" },
{ markets: "EU", title: { en: "Sanctions / PEP", sv: "Sanktioner / PEP" }, desc: { en: "Official lists. Screening.", sv: "Officiella listor. Screening." }, count: { en: "global", sv: "global" }, freshness: { en: "daily", sv: "daglig" }, level: 3, source: { en: "OpenSanctions", sv: "OpenSanctions" }, cat: "Bolag" },
];
export function FeaturedProductsSection() {
@@ -67,7 +77,7 @@ export function FeaturedProductsSection() {
color: filter === f ? "var(--background)" : "var(--foreground)",
}}
>
{f}
{t(FILTER_LABELS[f])}
</button>
))}
</div>
@@ -75,22 +85,22 @@ export function FeaturedProductsSection() {
<div className="mt-px grid grid-cols-1 gap-px border-x border-b border-border bg-border md:grid-cols-3">
{shown.map((d, i) => (
<div key={d.title} className={`reveal-scale delay-${(i % 6) + 1} group relative flex flex-col bg-background p-7 transition-colors hover:bg-secondary/40`}>
<div key={d.title.sv} className={`reveal-scale delay-${(i % 6) + 1} group relative flex flex-col bg-background p-7 transition-colors hover:bg-secondary/40`}>
<span className="absolute left-0 top-0 h-px w-0 transition-all duration-300 group-hover:w-full" style={{ backgroundColor: "var(--accent-red)" }} />
<div className="flex items-baseline justify-between">
<p className="font-mono text-[10px] uppercase tracking-[0.14em] text-muted-foreground">{d.markets}</p>
<span className="font-mono text-[10px] tabular-nums text-foreground/20">{String(i + 1).padStart(2, "0")}</span>
</div>
<h3 className="mt-5 text-xl font-semibold tracking-[-0.01em] transition-transform duration-300 group-hover:translate-x-1">{d.title}</h3>
<p className="mt-2 text-sm text-muted-foreground">{d.desc}</p>
<h3 className="mt-5 text-xl font-semibold tracking-[-0.01em] transition-transform duration-300 group-hover:translate-x-1">{t(d.title)}</h3>
<p className="mt-2 text-sm text-muted-foreground">{t(d.desc)}</p>
<div className="mt-6 flex items-center gap-3 border-t border-border pt-4 font-mono text-[11px] text-muted-foreground">
<span className="text-foreground">{d.count}</span>
<span className="text-foreground">{t(d.count)}</span>
<span className="text-border">·</span>
<span>{d.freshness}</span>
<span>{t(d.freshness)}</span>
</div>
<div className="mt-4">
<ProvenanceBadge level={d.level} source={d.source} freshness={d.freshness} />
<ProvenanceBadge level={d.level} source={t(d.source)} freshness={t(d.freshness)} />
</div>
<div className="mt-auto flex items-center justify-between pt-7">
+10 -9
View File
@@ -4,11 +4,12 @@ import Link from "next/link";
import { useReveal } from "@/hooks/use-reveal";
import { useT } from "@/components/locale-provider";
const COLUMNS: { head: string; links: { label: string; href: string }[] }[] = [
{ head: "Produkt", links: [{ label: "Katalog", href: "/#katalog" }, { label: "Beställ", href: "/bestall" }, { label: "Priser", href: "/#priser" }, { label: "API", href: "/bestall" }] },
{ head: "Källor", links: [{ label: "Sourcing", href: "/#tackning" }, { label: "Färskhet", href: "/#tackning" }, { label: "Licenser", href: "/#motorn" }] },
{ head: "Bolag", links: [{ label: "SIAX", href: "https://siax.io" }, { label: "Kontakt", href: "mailto:hej@siax.io" }] },
{ head: "Juridik", links: [{ label: "DPA", href: "/#" }, { label: "Villkor", href: "/#" }, { label: "Integritet", href: "/#" }] },
type Loc = { en: string; sv: string };
const COLUMNS: { head: Loc; links: { label: Loc; href: string }[] }[] = [
{ head: { en: "Product", sv: "Produkt" }, links: [{ label: { en: "Catalog", sv: "Katalog" }, href: "/#katalog" }, { label: { en: "Order", sv: "Beställ" }, href: "/bestall" }, { label: { en: "Pricing", sv: "Priser" }, href: "/#priser" }, { label: { en: "API", sv: "API" }, href: "/bestall" }] },
{ head: { en: "Sources", sv: "Källor" }, links: [{ label: { en: "Sourcing", sv: "Sourcing" }, href: "/#tackning" }, { label: { en: "Freshness", sv: "Färskhet" }, href: "/#tackning" }, { label: { en: "Licenses", sv: "Licenser" }, href: "/#motorn" }] },
{ head: { en: "Company", sv: "Bolag" }, links: [{ label: { en: "SIAX", sv: "SIAX" }, href: "https://siax.io" }, { label: { en: "Contact", sv: "Kontakt" }, href: "mailto:hej@siax.io" }] },
{ head: { en: "Legal", sv: "Juridik" }, links: [{ label: { en: "DPA", sv: "DPA" }, href: "/#" }, { label: { en: "Terms", sv: "Villkor" }, href: "/#" }, { label: { en: "Privacy", sv: "Integritet" }, href: "/#" }] },
];
export function FooterSection() {
@@ -30,17 +31,17 @@ export function FooterSection() {
</p>
</div>
{COLUMNS.map((c, i) => (
<div key={c.head} className={`reveal delay-${i + 1} md:col-span-2`}>
<h4 className="border-b border-[#1f1f1f] pb-2.5 font-mono text-[10px] uppercase tracking-[0.2em] text-[#737373]">{c.head}</h4>
<div key={c.head.sv} className={`reveal delay-${i + 1} md:col-span-2`}>
<h4 className="border-b border-[#1f1f1f] pb-2.5 font-mono text-[10px] uppercase tracking-[0.2em] text-[#737373]">{t(c.head)}</h4>
<ul className="mt-4 space-y-3">
{c.links.map((l) => (
<li key={l.label}>
<li key={l.label.sv}>
<Link
href={l.href}
className="group inline-flex items-center gap-2 text-[15px] tracking-[-0.01em] text-[#fafafa] transition-colors hover:text-[#fafafa]"
>
<span className="h-px w-0 bg-[#fafafa] transition-all duration-300 group-hover:w-4" />
<span className="transition-transform duration-300 group-hover:translate-x-0">{l.label}</span>
<span className="transition-transform duration-300 group-hover:translate-x-0">{t(l.label)}</span>
</Link>
</li>
))}
+9 -9
View File
@@ -4,12 +4,12 @@ import { useReveal } from "@/hooks/use-reveal";
import { useT } from "@/components/locale-provider";
import { DataArtifact } from "@/components/data-artifact";
const TILES: { variant: "table" | "map" | "schema" | "chart" | "grid"; index: string; title: string; line: string }[] = [
{ variant: "table", index: "01", title: "Tabell", line: "Källa per cell." },
{ variant: "map", index: "02", title: "Täckning", line: "Andel bekräftat." },
{ variant: "schema", index: "03", title: "Schema", line: "Levererad modell." },
{ variant: "chart", index: "04", title: "Dashboard", line: "En serie." },
{ variant: "grid", index: "05", title: "Export", line: "Valfritt format." },
const TILES: { variant: "table" | "map" | "schema" | "chart" | "grid"; index: string; title: { en: string; sv: string }; line: { en: string; sv: string } }[] = [
{ variant: "table", index: "01", title: { en: "Table", sv: "Tabell" }, line: { en: "Source per cell.", sv: "Källa per cell." } },
{ variant: "map", index: "02", title: { en: "Coverage", sv: "Täckning" }, line: { en: "Share confirmed.", sv: "Andel bekräftat." } },
{ variant: "schema", index: "03", title: { en: "Schema", sv: "Schema" }, line: { en: "Delivered model.", sv: "Levererad modell." } },
{ variant: "chart", index: "04", title: { en: "Dashboard", sv: "Dashboard" }, line: { en: "One series.", sv: "En serie." } },
{ variant: "grid", index: "05", title: { en: "Export", sv: "Export" }, line: { en: "Any format.", sv: "Valfritt format." } },
];
export function GallerySection() {
@@ -33,7 +33,7 @@ export function GallerySection() {
<div className="mt-16 grid grid-cols-1 gap-px border border-border bg-border md:grid-cols-2 lg:grid-cols-3">
{TILES.map((t, i) => (
<article
key={t.title}
key={t.index}
className={`group reveal-scale delay-${i + 1} flex flex-col bg-background p-8 transition-opacity duration-300 hover:opacity-[0.92] ${i === 0 ? "md:col-span-2" : ""}`}
>
<div className="flex items-baseline justify-between">
@@ -48,8 +48,8 @@ export function GallerySection() {
</div>
<div className="mt-6 flex items-baseline justify-between border-t border-border pt-4">
<span className="text-base font-medium tracking-[-0.01em]">{t.title}</span>
<span className="font-mono text-[11px] uppercase tracking-[0.1em] text-muted-foreground">{t.line}</span>
<span className="text-base font-medium tracking-[-0.01em]">{tr(t.title)}</span>
<span className="font-mono text-[11px] uppercase tracking-[0.1em] text-muted-foreground">{tr(t.line)}</span>
</div>
</article>
))}
+18 -13
View File
@@ -4,26 +4,31 @@ import Link from "next/link";
import { useReveal } from "@/hooks/use-reveal";
import { useT } from "@/components/locale-provider";
const STATS = [
["20", "marknader"],
["Per fält", "härkomst & konfidens"],
["50/50", "start & godkänt"],
["GDPR", "native, med DPA"],
type Loc = { en: string; sv: string };
type LocOrStr = string | Loc;
const STATS: [LocOrStr, Loc][] = [
["20", { en: "markets", sv: "marknader" }],
[{ en: "Per field", sv: "Per fält" }, { en: "provenance & confidence", sv: "härkomst & konfidens" }],
["50/50", { en: "start & approved", sv: "start & godkänt" }],
["GDPR", { en: "native, with DPA", sv: "native, med DPA" }],
];
// Data-native hero artifact: a miniature company table that "is" the product.
const ROWS: [string, string, string, 0 | 1 | 2 | 3][] = [
const ROWS: [string, LocOrStr, LocOrStr, 0 | 1 | 2 | 3][] = [
["556016-0680", "Volvo Group", "GLEIF", 3],
["915933149", "Equinor ASA", "Brreg", 3],
["25052943", "Maersk A/S", "CVR", 2],
["0112038-9", "Nokia Oyj", "PRH", 2],
["—", "E-post (FI)", "licens", 0],
["—", { en: "Email (FI)", sv: "E-post (FI)" }, { en: "license", sv: "licens" }, 0],
];
const PROV = ["var(--prov-0)", "var(--prov-1)", "var(--prov-2)", "var(--prov-3)"];
export function HeroSection() {
const ref = useReveal<HTMLElement>();
const t = useT();
// Resolve a value that may be a literal string (brand/number) or a localized {en,sv} pair.
const tx = (v: LocOrStr) => (typeof v === "string" ? v : t(v));
return (
<section ref={ref} className="grain-overlay relative overflow-hidden border-b border-border bg-background">
@@ -78,10 +83,10 @@ export function HeroSection() {
</div>
<div className="reveal delay-5 mt-16 grid grid-cols-2 gap-px border border-border bg-border sm:grid-cols-4">
{STATS.map(([n, l]) => (
<div key={l} className="group bg-background p-4 transition-colors hover:bg-muted/40">
<p className="text-2xl font-semibold tracking-[-0.03em]">{n}</p>
<p className="mt-2 font-mono text-[10px] uppercase tracking-[0.1em] text-muted-foreground">{l}</p>
{STATS.map(([n, l], i) => (
<div key={i} className="group bg-background p-4 transition-colors hover:bg-muted/40">
<p className="text-2xl font-semibold tracking-[-0.03em]">{tx(n)}</p>
<p className="mt-2 font-mono text-[10px] uppercase tracking-[0.1em] text-muted-foreground">{t(l)}</p>
</div>
))}
</div>
@@ -100,7 +105,7 @@ export function HeroSection() {
className={`reveal delay-${i + 1} group flex items-center justify-between border-b border-border px-4 py-3.5 transition-colors last:border-b-0 hover:bg-muted/40`}
>
<div className="min-w-0">
<p className="truncate text-sm transition-transform duration-200 group-hover:translate-x-0.5">{r[1]}</p>
<p className="truncate text-sm transition-transform duration-200 group-hover:translate-x-0.5">{tx(r[1])}</p>
<p className="font-mono text-[10.5px] text-muted-foreground">{r[0]}</p>
</div>
<span className="ml-3 inline-flex items-center gap-1.5 border border-border px-1.5 py-0.5 font-mono text-[10px] uppercase text-muted-foreground">
@@ -108,7 +113,7 @@ export function HeroSection() {
className="inline-block h-[7px] w-[7px]"
style={{ backgroundColor: r[3] === 0 ? "transparent" : PROV[r[3]], border: r[3] === 0 ? `1px solid ${PROV[0]}` : "none" }}
/>
{r[2]}
{tx(r[2])}
</span>
</div>
))}
+5 -5
View File
@@ -4,9 +4,9 @@ import { useReveal } from "@/hooks/use-reveal";
import { useT } from "@/components/locale-provider";
const PRINCIPLES = [
["01", "Härkomst per fält.", "Källa, färskhet, konfidens. Hela kedjan syns."],
["02", "Korroborering först.", "Oeniga källor blir osäkert fält."],
["03", "Hellre tomt än gissat.", "Obelagt levereras ej. Aldrig uppfunnet."],
["01", { en: "Provenance per field.", sv: "Härkomst per fält." }, { en: "Source, freshness, confidence. The whole chain is visible.", sv: "Källa, färskhet, konfidens. Hela kedjan syns." }],
["02", { en: "Corroboration first.", sv: "Korroborering först." }, { en: "Sources that disagree become an uncertain field.", sv: "Oeniga källor blir osäkert fält." }],
["03", { en: "Empty over guessed.", sv: "Hellre tomt än gissat." }, { en: "Unverified data is not delivered. Never invented.", sv: "Obelagt levereras ej. Aldrig uppfunnet." }],
];
export function PhilosophySection() {
@@ -36,8 +36,8 @@ export function PhilosophySection() {
{n}
</span>
<div>
<p className="text-[clamp(1.25rem,2vw,1.75rem)] font-medium leading-tight tracking-[-0.02em]">{title}</p>
<p className="mt-2 max-w-[42ch] leading-relaxed text-muted-foreground">{body}</p>
<p className="text-[clamp(1.25rem,2vw,1.75rem)] font-medium leading-tight tracking-[-0.02em]">{t(title)}</p>
<p className="mt-2 max-w-[42ch] leading-relaxed text-muted-foreground">{t(body)}</p>
</div>
</div>
))}
+30 -18
View File
@@ -7,26 +7,38 @@ import { useT } from "@/components/locale-provider";
const MODELS = [
{
index: "01",
name: "Per jobb",
tagline: "Betala för det du beställer.",
points: ["50 % start. 50 % vid godkänt.", "Inga abonnemang.", "Härkomst ingår."],
cta: "Bygg beställning",
name: { en: "Per job", sv: "Per jobb" },
tagline: { en: "Pay for what you order.", sv: "Betala för det du beställer." },
points: [
{ en: "50 % to start. 50 % on approval.", sv: "50 % start. 50 % vid godkänt." },
{ en: "No subscriptions.", sv: "Inga abonnemang." },
{ en: "Provenance included.", sv: "Härkomst ingår." },
],
cta: { en: "Build order", sv: "Bygg beställning" },
featured: true,
},
{
index: "02",
name: "Prenumeration",
tagline: "Löpande feed.",
points: ["Dagliga deltan.", "Webhook vid ändring.", "Färskhet bevakas."],
cta: "Konfigurera feed",
name: { en: "Subscription", sv: "Prenumeration" },
tagline: { en: "Continuous feed.", sv: "Löpande feed." },
points: [
{ en: "Daily deltas.", sv: "Dagliga deltan." },
{ en: "Webhook on change.", sv: "Webhook vid ändring." },
{ en: "Freshness monitored.", sv: "Färskhet bevakas." },
],
cta: { en: "Configure feed", sv: "Konfigurera feed" },
featured: false,
},
{
index: "03",
name: "Custom",
tagline: "Stora uppdrag.",
points: ["Offert innan start.", "ML, BI, dokument.", "Dedikerad API."],
cta: "Boka samtal",
name: { en: "Custom", sv: "Custom" },
tagline: { en: "Large engagements.", sv: "Stora uppdrag." },
points: [
{ en: "Quote before start.", sv: "Offert innan start." },
{ en: "ML, BI, documents.", sv: "ML, BI, dokument." },
{ en: "Dedicated API.", sv: "Dedikerad API." },
],
cta: { en: "Book a call", sv: "Boka samtal" },
featured: false,
},
];
@@ -50,20 +62,20 @@ export function PricingSection() {
<div className="mt-20 grid grid-cols-1 gap-px border border-border bg-border md:grid-cols-3">
{MODELS.map((m, i) => (
<div key={m.name} className={`reveal delay-${i + 1} group relative flex flex-col bg-background p-8`}>
<div key={m.index} className={`reveal delay-${i + 1} group relative flex flex-col bg-background p-8`}>
<div className="flex items-start justify-between">
<span className="font-mono text-[11px] uppercase tracking-[0.18em] text-muted-foreground/60">{m.index}</span>
{m.featured ? <span className="mt-1 inline-block h-2 w-2" style={{ backgroundColor: "var(--accent-red)" }} /> : null}
</div>
<h3 className="mt-10 text-2xl font-semibold tracking-[-0.02em]">{m.name}</h3>
<p className="mt-2 text-sm text-muted-foreground">{m.tagline}</p>
<h3 className="mt-10 text-2xl font-semibold tracking-[-0.02em]">{t(m.name)}</h3>
<p className="mt-2 text-sm text-muted-foreground">{t(m.tagline)}</p>
<ul className="mt-10 flex-1 space-y-px border-t border-border">
{m.points.map((p) => (
<li key={p} className="flex items-center gap-3 border-b border-border py-3 text-sm">
<li key={p.sv} className="flex items-center gap-3 border-b border-border py-3 text-sm">
<span className="inline-block h-1 w-1 shrink-0 bg-foreground" />
<span>{p}</span>
<span>{t(p)}</span>
</li>
))}
</ul>
@@ -77,7 +89,7 @@ export function PricingSection() {
: { border: "1px solid var(--foreground)", color: "var(--foreground)" }
}
>
{m.cta}
{t(m.cta)}
</Link>
</div>
))}
+16 -10
View File
@@ -4,13 +4,19 @@ import { useReveal } from "@/hooks/use-reveal";
import { useT } from "@/components/locale-provider";
const CHAIN = [
["01", "Officiella API:er", "GLEIF · Brreg · Companies House", "var(--prov-3)"],
["02", "Auktoriserad webb", "robots.txt. Rate limits.", "var(--prov-1)"],
["03", "Licensierad partnerdata", "Avtalad åtkomst.", "var(--prov-2)"],
["04", "Annars: tomt", "Vi gissar aldrig.", "transparent"],
];
["01", { en: "Official APIs", sv: "Officiella API:er" }, { en: "GLEIF · Brreg · Companies House", sv: "GLEIF · Brreg · Companies House" }, "var(--prov-3)"],
["02", { en: "Authorized web", sv: "Auktoriserad webb" }, { en: "robots.txt. Rate limits.", sv: "robots.txt. Rate limits." }, "var(--prov-1)"],
["03", { en: "Licensed partner data", sv: "Licensierad partnerdata" }, { en: "Contracted access.", sv: "Avtalad åtkomst." }, "var(--prov-2)"],
["04", { en: "Otherwise: empty", sv: "Annars: tomt" }, { en: "We never guess.", sv: "Vi gissar aldrig." }, "transparent"],
] as const;
const PIPELINE = ["Källracing", "Extraktion", "Strukturering", "Berikning", "QA"];
const PIPELINE = [
{ en: "Source racing", sv: "Källracing" },
{ en: "Extraction", sv: "Extraktion" },
{ en: "Structuring", sv: "Strukturering" },
{ en: "Enrichment", sv: "Berikning" },
{ en: "QA", sv: "QA" },
] as const;
export function TechnologySection() {
const ref = useReveal<HTMLElement>();
@@ -68,8 +74,8 @@ export function TechnologySection() {
}}
/>
</div>
<p className="mt-16 text-[1.0625rem] font-medium leading-tight tracking-[-0.01em]">{title}</p>
<p className="mt-2 font-mono text-[11px] leading-relaxed text-[#a3a3a3]">{sub}</p>
<p className="mt-16 text-[1.0625rem] font-medium leading-tight tracking-[-0.01em]">{t(title)}</p>
<p className="mt-2 font-mono text-[11px] leading-relaxed text-[#a3a3a3]">{t(sub)}</p>
</div>
))}
</div>
@@ -78,9 +84,9 @@ export function TechnologySection() {
<p className="reveal delay-3 mt-24 font-mono text-[11px] uppercase tracking-[0.16em] text-[#737373]">{t({ en: "The pipeline", sv: "Pipelinen" })}</p>
<div className="reveal delay-3 mt-6 flex flex-wrap items-center gap-x-3 gap-y-4">
{PIPELINE.map((s, i) => (
<div key={s} className="flex items-center gap-3">
<div key={i} className="flex items-center gap-3">
<span className="font-mono text-[11px] tracking-[0.06em] text-[#525252]">{String(i + 1).padStart(2, "0")}</span>
<span className="font-mono text-[13px] uppercase tracking-[0.06em] text-[#fafafa]">{s}</span>
<span className="font-mono text-[13px] uppercase tracking-[0.06em] text-[#fafafa]">{t(s)}</span>
{i < PIPELINE.length - 1 ? <span aria-hidden className="text-[#404040]">/</span> : null}
</div>
))}