fix(ui): English labels where Voyage shows Norwegian to every user
Operator decision 56 (2026-10-17): the product shows English. - Annotation HTML: the intent buttons, sidebar badges and the copied prompt read Fix / Change / Question. The stored keys stay fiks / endre / spørsmål, so annotations saved earlier still load. - /trekreview project-memory approval: "Add the line" / "Not now". - README, CLAUDE.md, docs/architecture.md, package.json and plugin.json describe what the product shows; README's hollow-answer line and the "anslag" in the profile section are English; a Norwegian code comment in profile-validator.mjs translated. The Norwegian hollow-answer list in approval-log.mjs and trekbrief.md stays: it matches what a user types. Both new tests failed on the code before the change. Suite 2606 (2604/0/2). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f4bf9a85c6
commit
af5de3fcb8
10 changed files with 48 additions and 26 deletions
|
|
@ -7,7 +7,7 @@
|
|||
// the page renders the artifact as a proper article (headings, lists,
|
||||
// paragraphs, code blocks — not raw lines), and the operator drives every
|
||||
// annotation themselves: select text or click any element, choose intent
|
||||
// (Fiks / Endre / Spørsmål), write a comment, save. The sidebar shows
|
||||
// (Fix / Change / Question), write a comment, save. The sidebar shows
|
||||
// every annotation grouped by section; Copy Prompt assembles them into
|
||||
// one structured markdown the operator pastes back into Claude.
|
||||
//
|
||||
|
|
@ -16,7 +16,9 @@
|
|||
// localStorage persistence, structured markdown export).
|
||||
//
|
||||
// • Operator drives every annotation. No Claude-generated suggestions.
|
||||
// • Three intent categories: Fiks (fix) / Endre (change) / Spørsmål (question).
|
||||
// • Three intent categories: Fix / Change / Question. The stored keys stay
|
||||
// fiks / endre / spørsmål, so annotations saved before the English labels
|
||||
// (operator decision 56) still load.
|
||||
// • Element + selection anchoring — clicking an element captures it whole;
|
||||
// selecting text inside an element captures the exact substring.
|
||||
// • Section context auto-detected (nearest h1/h2 above).
|
||||
|
|
@ -256,9 +258,9 @@ function buildHtml(artifactPath, mdText) {
|
|||
+ ' <blockquote class="ann-form-snippet-text" id="ann-form-snippet">…</blockquote>\n'
|
||||
+ ' </div>\n'
|
||||
+ ' <div class="ann-form-intents">\n'
|
||||
+ ' <button class="ann-intent" data-intent="fiks" title="Something is wrong or broken — needs to be fixed">Fiks</button>\n'
|
||||
+ ' <button class="ann-intent" data-intent="endre" title="Change the wording or content">Endre</button>\n'
|
||||
+ ' <button class="ann-intent" data-intent="spørsmål" title="An open question or clarification request">Spørsmål</button>\n'
|
||||
+ ' <button class="ann-intent" data-intent="fiks" title="Something is wrong or broken — needs to be fixed">Fix</button>\n'
|
||||
+ ' <button class="ann-intent" data-intent="endre" title="Change the wording or content">Change</button>\n'
|
||||
+ ' <button class="ann-intent" data-intent="spørsmål" title="An open question or clarification request">Question</button>\n'
|
||||
+ ' </div>\n'
|
||||
+ ' <textarea class="ann-form-comment" id="ann-form-comment" placeholder="Your comment (optional but helpful)…"></textarea>\n'
|
||||
+ ' <div class="ann-form-actions">\n'
|
||||
|
|
@ -527,7 +529,7 @@ body.ann-mode .article [data-anchor-id].annotated:hover { outline-color: var(--a
|
|||
|
||||
const APP_JS = `
|
||||
const STORAGE_KEY = 'voyage-annotate:v2:' + ARTIFACT_PATH;
|
||||
const INTENT_LABELS = { fiks: 'Fiks', endre: 'Endre', 'spørsmål': 'Spørsmål' };
|
||||
const INTENT_LABELS = { fiks: 'Fix', endre: 'Change', 'spørsmål': 'Question' };
|
||||
const INTENT_ORDER = ['fiks', 'endre', 'spørsmål'];
|
||||
|
||||
let annotations = [];
|
||||
|
|
@ -783,8 +785,8 @@ function buildPromptMarkdown() {
|
|||
return a.id - b.id;
|
||||
});
|
||||
let p = 'Please revise the voyage artifact at \\\`' + ARTIFACT_PATH + '\\\` with the operator annotations below.\\n';
|
||||
p += 'Each annotation has an intent — **Fiks** (something is wrong / fix it), **Endre** (change wording/content),\\n';
|
||||
p += 'or **Spørsmål** (operator question — clarify or answer). The quote shows what the operator anchored to.\\n';
|
||||
p += 'Each annotation has an intent — **Fix** (something is wrong / fix it), **Change** (change wording/content),\\n';
|
||||
p += 'or **Question** (operator question — clarify or answer). The quote shows what the operator anchored to.\\n';
|
||||
p += 'Treat the operator notes as authoritative direction.\\n\\n';
|
||||
p += '## Annotations (' + annotations.length + ' total)\\n\\n';
|
||||
let n = 0;
|
||||
|
|
@ -943,7 +945,7 @@ if (isMain(import.meta.url)) {
|
|||
'Usage: annotate <artifact.md> [--out <file.html>]\n\n'
|
||||
+ 'Builds a self-contained operator-annotation HTML for a voyage\n'
|
||||
+ 'artifact. The operator opens the HTML, selects text or clicks any\n'
|
||||
+ 'element, picks an intent (Fiks / Endre / Spørsmål), writes a\n'
|
||||
+ 'element, picks an intent (Fix / Change / Question), writes a\n'
|
||||
+ 'comment, and copies a structured prompt to paste back into Claude.\n'
|
||||
+ 'Annotations persist in localStorage per artifact path.\n\n'
|
||||
+ 'Default output: <input-basename>.html next to input.\n',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue