From 84f5fc8302ef31a272fac534af7587599b98c8f1 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 3 Aug 2026 20:17:31 +0200 Subject: docs: spec query bar completion, require translatable strings Design for backlog item 17. Completion covers query prefixes, tag values, date values, path values and mimetype values, each carrying a description so the bar documents the query language while it is typed. A new QueryCompleter class owns it, with the cursor-context tokenizer as a pure function so the parsing rules are testable without a widget or a database. NotmuchWorker gains an all-tags call, which did not exist. Addresses for from:/to: are out of scope: libnotmuch exposes no all-addresses call. Both prefixes still appear so the vocabulary reads complete. Account maildirs belong to path:, not folder:. Account::scopedQuery builds path:"/**", and folder: is a different matcher in notmuch, against the folder name rather than the directory path. Also records the translatable-strings rule in CLAUDE.md. Existing code is not yet audited against it. --- CLAUDE.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CLAUDE.md') diff --git a/CLAUDE.md b/CLAUDE.md index 1b6a1bc..ed8faca 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -75,6 +75,12 @@ combined `thread:a or thread:b` query rather than one query per thread. The only escape hatch is `general/notmuch_config`, pointing at an alternate notmuch config. Per-account subdirectories *are* configured, since notmuch does not model accounts at all. +**Every user-facing string is translatable.** Wrap UI text in `tr()`, including strings +that are only ever shown in passing: status bar messages, tooltips, dialog prose, +completion descriptions. Query syntax itself is not user-facing text — notmuch keywords +like `tag:` and `date:` are wire format and must never be translated, only the prose +describing them. Pre-existing code has not been audited against this rule. + **Config format gotcha:** QSettings treats `/` in a section name as a group separator, so account sections are `[account.work]`, not `[account/work]`. `childKeys` returns keys sorted alphabetically, never in file order. **`[general]` keys are read WITHOUT the -- cgit v1.2.3