diff --git a/apps/host/src/components/PrivacyNotes.tsx b/apps/host/src/components/PrivacyNotes.tsx index 599cd35c42..936970dbcd 100644 --- a/apps/host/src/components/PrivacyNotes.tsx +++ b/apps/host/src/components/PrivacyNotes.tsx @@ -1,17 +1,10 @@ import { tr } from '../lib/i18n'; -const NOTES = [ - 'Strata sends no usage telemetry.', - 'Conversations stay in browser storage.', - 'When you choose an API model, that conversation and enabled skill instructions are sent to its provider.', - 'The UI request log keeps client, timing and token metadata in memory.', - 'Native API monitoring can retain request content in memory when enabled.', - 'Connected tools access the resources you configure.', -]; +/** What Strata collects and where things go: one compact paragraph (the six sentences read together, translated as one in every language). */ +const NOTES = 'Strata sends no usage telemetry. Conversations stay in browser storage. When you choose an API model, that conversation and enabled skill instructions are sent to its provider. The UI request log keeps client, timing and token metadata in memory. Native API monitoring can retain request content in memory when enabled. Connected tools access the resources you configure.'; -/** What Strata collects and where things go: plain lines of text, nothing else. */ export function PrivacyNotes() { return
- {NOTES.map(text =>

{tr(text)}

)} +

{tr(NOTES)}

; } diff --git a/apps/host/src/styles/app.css b/apps/host/src/styles/app.css index 05eba544d3..e92cc29e41 100644 --- a/apps/host/src/styles/app.css +++ b/apps/host/src/styles/app.css @@ -7253,8 +7253,8 @@ textarea { .storage-model__size { font-variant-numeric: tabular-nums; font-size: var(--st-fs-sm); } /* ---- About > Privacy: plain text ---- */ -.privacy-notes { display: flex; flex-direction: column; gap: 8px; padding: 2px 0; } -.privacy-notes p { margin: 0; font-size: var(--st-fs-sm); line-height: 1.5; color: var(--st-ink-soft); } +.privacy-notes { padding: 2px 0; } +.privacy-notes p { margin: 0; max-width: 68ch; font-size: var(--st-fs-sm); line-height: 1.6; color: var(--st-ink-soft); } /* ---- an opened task: the name, and a last answer that is easy to read ---- */ .task-name { margin: 0 0 2px; font-size: var(--st-fs-xl); letter-spacing: -.02em; } diff --git a/apps/host/tests/privacy-paragraph.test.mjs b/apps/host/tests/privacy-paragraph.test.mjs new file mode 100644 index 0000000000..0cc3153b7b --- /dev/null +++ b/apps/host/tests/privacy-paragraph.test.mjs @@ -0,0 +1,25 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import {readFileSync} from 'node:fs'; +import {resolve} from 'node:path'; + +const root = resolve(import.meta.dirname, '..'); +const source = readFileSync(resolve(root, 'src/components/PrivacyNotes.tsx'), 'utf8'); +const SENTENCES = ['Strata sends no usage telemetry.', 'Conversations stay in browser storage.', 'When you choose an API model, that conversation and enabled skill instructions are sent to its provider.', 'The UI request log keeps client, timing and token metadata in memory.', 'Native API monitoring can retain request content in memory when enabled.', 'Connected tools access the resources you configure.']; + +test('Privacy is one compact paragraph with all six sentences, in order', () => { + const text = source.match(/const NOTES = '([^']*)';/)?.[1]; + assert.equal(text, SENTENCES.join(' ')); + assert.equal((source.match(/

/g) ?? []).length, 1, 'one paragraph, not a line per sentence'); +}); + +test('the paragraph is translated as a whole in all 9 languages', () => { + const joined = SENTENCES.join(' '); + const en = JSON.parse(readFileSync(resolve(root, 'src/locales/en.json'), 'utf8')); + const id = Object.keys(en).find(k => en[k] === joined); + assert.ok(id, 'the English catalog has the whole paragraph'); + for (const lang of ['zh', 'ja', 'de', 'es', 'ru', 'pt', 'ko', 'fr']) { + const cat = JSON.parse(readFileSync(resolve(root, `src/locales/${lang}.json`), 'utf8')); + assert.ok(cat[id] && cat[id] !== joined && cat[id].length > 80, `${lang} has its own translation of the paragraph`); + } +});