From 0a91e573b4ca9bbdd85cb8f37db02f6d60ce7d11 Mon Sep 17 00:00:00 2001 From: Steffen Becker Date: Sat, 15 Aug 2026 21:12:46 +0200 Subject: [PATCH] refactor: the thesaurus is called Synonyms in the UI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both products name the tool after what it is, which says nothing to a reader who does not know the word. Every label is "Synonyms" now — ribbon, context menu, tools menu, dialog — and "thesaurus" stays in the tooltip so it is still findable by name. Keys and code keep the technical name. --- CHANGELOG.md | 2 +- src/App.svelte | 2 +- src/lib/components/CLAUDE.md | 7 ++++++- src/lib/components/ribbon/tabs/ReviewTab.svelte | 2 +- src/lib/i18n/locales/de.ts | 9 ++++++--- src/lib/i18n/locales/en.ts | 9 ++++++--- 6 files changed, 21 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d884011..699027c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -148,7 +148,7 @@ - Line numbering (Layout ▸ Line numbers, LibreOffice's Tools ▸ Line Numbering): numbers in the left margin, continuous or restarting each page, every nth line, with or without empty lines. Measured off the rendered lines, so the preview and the saved file agree; round-trips as ODF `text:linenumbering-configuration` and Word's `w:lnNumType` - Page design (Layout ▸ Page design): a page background colour, a border around the text area at a settable distance from it, and a text watermark with its own colour, angle and transparency — LibreOffice's Format ▸ Page Style ▸ Area/Borders and its Format ▸ Watermark. All three round-trip: ODF keeps them on the page layout and the master page's header, Word on `w:document` / `w:sectPr` / a VML shape in the header part - Captions (References ▸ Caption, LibreOffice's Insert ▸ Caption): a caption paragraph in the `Caption` style with a running number that counts itself — one counter per category (figure / table), in document order, renumbering as the document is edited. Round-trips as an ODF `` (with LibreOffice's own `ooow:Illustration+1` formula) and a Word `SEQ Figure \* ARABIC` field -- Thesaurus (Ctrl+F7, Review ▸ Thesaurus, the context menu): the word at the caret, the sense groups it appears in, click one to replace it — and a box to look up any other word. The synonyms are LibreOffice's own, its MyThes data re-packed to one group per line (`scripts/make-thesaurus.mjs`, de 3.0 MB / 37k groups, en 6.7 MB / 143k). It loads on first use for the document's language and is scanned, not indexed: ~4 ms per lookup against the ~100 MB an index would cost +- Synonyms (Ctrl+F7, Review ▸ Synonyms, the context menu) — a thesaurus, labelled for what it does rather than by its name in both products: the word at the caret, the sense groups it appears in, click one to replace it — and a box to look up any other word. The synonyms are LibreOffice's own, its MyThes data re-packed to one group per line (`scripts/make-thesaurus.mjs`, de 3.0 MB / 37k groups, en 6.7 MB / 143k). It loads on first use for the document's language and is scanned, not indexed: ~4 ms per lookup against the ~100 MB an index would cost - Word (.docx) export and import — round-trips the editor's formatting (text, fonts, lists, tables, images, headers/footers, page geometry) and opens real Word documents - Document properties (title, subject, author, keywords, comments) in the File menu — LibreOffice's File ▸ Properties / Word's File ▸ Info. Round-trips through ODF `meta.xml` (one `meta:keyword` per keyword) and DOCX `docProps/core.xml` - File handlers: the installed app registers for `.odt` / `.ott` / `.docx` / `.dotx`, so the OS offers it for a double-clicked document and hands the file over through `launchQueue` — with its handle, so the first Save writes that same file. Word templates (`.dotx`) open like `.ott` does: read for their content, never bound as the file to save over diff --git a/src/App.svelte b/src/App.svelte index 86400d3..0e9292c 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1282,7 +1282,7 @@ - diff --git a/src/lib/components/CLAUDE.md b/src/lib/components/CLAUDE.md index 3f82c6c..1c063b2 100644 --- a/src/lib/components/CLAUDE.md +++ b/src/lib/components/CLAUDE.md @@ -151,13 +151,18 @@ Text group, the classic chrome's Tools menu): the library, a click to insert, an from selection" — the selected slice serialized to HTML. `hasSelection` is derived off `open` because the dialog stays mounted and a modal freezes the selection it opened on. -## Thesaurus (`ThesaurusDialog.svelte`, `spell/thesaurus.ts`) +## Synonyms (`ThesaurusDialog.svelte`, `spell/thesaurus.ts`) LibreOffice's Tools ▸ Thesaurus (Ctrl+F7), reachable where Word puts it too (the ribbon's Review ▸ Proofing) and from the context menu: the word at the caret (`wordRangeAt`), the groups it appears in, click one to replace it. The box above looks up any other word, which is how both dialogs follow a chain. +**Named "Synonyms", not "Thesaurus"** — the one place the label deviates from both +products. The word of art names the tool without saying what it does; it stays in the +tooltip (`thesaurus.hint`) so anyone looking for it still finds it. The i18n keys and +the code keep the technical name. + - The data is `public/thesaurus//.txt`, one `;`-separated group per line, generated from LibreOffice's own MyThes files by `scripts/make-thesaurus.mjs` — de 3.0MB / 37k groups, en 6.7MB / 143k groups. MyThes repeats every group once per member, ten diff --git a/src/lib/components/ribbon/tabs/ReviewTab.svelte b/src/lib/components/ribbon/tabs/ReviewTab.svelte index f32dfa7..1f16d8d 100644 --- a/src/lib/components/ribbon/tabs/ReviewTab.svelte +++ b/src/lib/components/ribbon/tabs/ReviewTab.svelte @@ -53,7 +53,7 @@ variant="big" icon="thesaurus" label={t().thesaurus.title} - title={`${t().thesaurus.title} (${shortcutHint('thesaurus')})`} + title={`${t().thesaurus.hint} — ${shortcutHint('thesaurus')}`} onclick={() => window.dispatchEvent(new CustomEvent(OPEN_THESAURUS_EVENT))} />
diff --git a/src/lib/i18n/locales/de.ts b/src/lib/i18n/locales/de.ts index 3fcaa95..b60cbbc 100644 --- a/src/lib/i18n/locales/de.ts +++ b/src/lib/i18n/locales/de.ts @@ -485,10 +485,13 @@ const de: Messages = { ignoreAll: 'Alle ignorieren', }, thesaurus: { - title: 'Thesaurus', - menuItem: 'Thesaurus…', + // "Thesaurus" heißt das Werkzeug in beiden Programmen, sagt aber nicht, was es tut: + // sichtbar ist überall "Synonyme", der Fachbegriff steht im Tooltip. + title: 'Synonyme', + menuItem: 'Synonyme…', + hint: 'Ein anderes Wort mit gleicher Bedeutung finden (Thesaurus)', lookUp: 'Nachschlagen', - word: 'Wort', + word: 'Wort eingeben…', loading: 'Wird geladen…', replaceHint: 'Ein Wort anklicken, um es im Dokument zu ersetzen.', noSynonyms: 'Keine Synonyme gefunden', diff --git a/src/lib/i18n/locales/en.ts b/src/lib/i18n/locales/en.ts index d751025..1f28cba 100644 --- a/src/lib/i18n/locales/en.ts +++ b/src/lib/i18n/locales/en.ts @@ -489,10 +489,13 @@ const en = { ignoreAll: 'Ignore All', }, thesaurus: { - title: 'Thesaurus', - menuItem: 'Thesaurus…', + // Both products call the tool "Thesaurus", which does not say what it does: the + // label everywhere is "Synonyms", the term of art lives in the tooltip. + title: 'Synonyms', + menuItem: 'Synonyms…', + hint: 'Find another word with the same meaning (thesaurus)', lookUp: 'Look up', - word: 'Word', + word: 'Enter a word…', loading: 'Loading…', replaceHint: 'Click a word to replace the one in the document.', noSynonyms: 'No synonyms found',