GeezerVison is showing github.com — feat: the variables panel sets a variable's prompt and marks what is … · u8array/ZPLab@0e0e200
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboard +123Lines changed: 123 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +// @vitest-environment jsdom | | 2 | +import { describe, it, expect, afterEach, beforeEach } from "vitest"; | | 3 | +import { render, cleanup, act, fireEvent } from "@testing-library/react"; | | 4 | +import { VariablesPanel } from "./VariablesPanel"; | | 5 | +import { useLabelStore } from "../../store/labelStore"; | | 6 | +import { fallbackTranslations as en } from "../../locales"; | | 7 | +import type { LabelObject } from "@zplab/core/types/Group"; | | 8 | +import type { Variable } from "@zplab/core/types/Variable"; | | 9 | + | | 10 | +afterEach(cleanup); | | 11 | + | | 12 | +const label = { widthMm: 100, heightMm: 60, dpmm: 8 }; | | 13 | +const lot: Variable = { id: "v1", name: "LOT", fnNumber: 1, defaultValue: "L42" }; | | 14 | +const field = { id: "t1", type: "text", x: 10, y: 10, rotation: 0, props: { content: "«LOT»", fontHeight: 30, fontWidth: 0, rotation: "N" } } as unknown as LabelObject; | | 15 | +const csv = { kind: "csv" as const, filename: "d.csv", importedAt: "", encoding: "utf-8", delimiter: ",", rowCount: 1 }; | | 16 | + | | 17 | +const stored = () => useLabelStore.getState().variables[0]; | | 18 | + | | 19 | +function promptInput(container: HTMLElement): HTMLInputElement { | | 20 | + const el = container.querySelector<HTMLInputElement>(`input[aria-label="${en.variables.promptLabel}"]`); | | 21 | + if (!el) throw new Error("prompt input not found"); | | 22 | + return el; | | 23 | +} | | 24 | + | | 25 | +function type(container: HTMLElement, text: string) { | | 26 | + const input = promptInput(container); | | 27 | + fireEvent.change(input, { target: { value: text } }); | | 28 | + fireEvent.blur(input); | | 29 | +} | | 30 | + | | 31 | +beforeEach(() => { | | 32 | + act(() => { | | 33 | + useLabelStore.getState().loadDesign(label, [{ objects: [field] }], [lot]); | | 34 | + useLabelStore.setState({ dataset: null, columnMapping: null }); | | 35 | + }); | | 36 | +}); | | 37 | + | | 38 | +describe("the prompt of a variable row", () => { | | 39 | + it("writes the text on blur", () => { | | 40 | + const { container } = render(<VariablesPanel />); | | 41 | + type(container, "Lot number"); | | 42 | + expect(stored()?.prompt).toBe("Lot number"); | | 43 | + }); | | 44 | + | | 45 | + it("refuses a character the command does not take and shows the hint", () => { | | 46 | + const { container, queryByText } = render(<VariablesPanel />); | | 47 | + type(container, "Lot?"); | | 48 | + expect(stored()).not.toHaveProperty("prompt"); | | 49 | + expect(queryByText(en.variables.promptInvalid)).not.toBeNull(); | | 50 | + }); | | 51 | + | | 52 | + it("drops the prompt when the text is empty", () => { | | 53 | + act(() => useLabelStore.getState().updateVariable("v1", { prompt: "Lot number" })); | | 54 | + const { container } = render(<VariablesPanel />); | | 55 | + type(container, ""); | | 56 | + expect(stored()).not.toHaveProperty("prompt"); | | 57 | + }); | | 58 | + | | 59 | + it("treats a blank text as empty", () => { | | 60 | + act(() => useLabelStore.getState().updateVariable("v1", { prompt: "Lot number" })); | | 61 | + const { container, queryByText } = render(<VariablesPanel />); | | 62 | + type(container, " "); | | 63 | + expect(stored()).not.toHaveProperty("prompt"); | | 64 | + expect(queryByText(en.variables.promptInvalid)).toBeNull(); | | 65 | + }); | | 66 | + | | 67 | + it("keeps the spaces at the edges", () => { | | 68 | + const { container } = render(<VariablesPanel />); | | 69 | + type(container, " Lot number "); | | 70 | + expect(stored()?.prompt).toBe(" Lot number "); | | 71 | + }); | | 72 | + | | 73 | + it("leaves a prompt with a trailing space alone when the field is left unchanged", () => { | | 74 | + act(() => useLabelStore.getState().updateVariable("v1", { prompt: "Batch " })); | | 75 | + const before = stored(); | | 76 | + const { container } = render(<VariablesPanel />); | | 77 | + fireEvent.focus(promptInput(container)); | | 78 | + fireEvent.blur(promptInput(container)); | | 79 | + expect(stored()).toBe(before); | | 80 | + }); | | 81 | + | | 82 | + it("clears the refusal once the text changes", () => { | | 83 | + const { container, queryByText } = render(<VariablesPanel />); | | 84 | + type(container, "Lot?"); | | 85 | + fireEvent.change(promptInput(container), { target: { value: "Lot" } }); | | 86 | + expect(queryByText(en.variables.promptInvalid)).toBeNull(); | | 87 | + }); | | 88 | + | | 89 | + it("shows a prompt set outside the row", () => { | | 90 | + const { container } = render(<VariablesPanel />); | | 91 | + act(() => useLabelStore.getState().updateVariable("v1", { prompt: "Lot number" })); | | 92 | + expect(promptInput(container).value).toBe("Lot number"); | | 93 | + }); | | 94 | +}); | | 95 | + | | 96 | +describe("the asked marker", () => { | | 97 | + const marked = () => render(<VariablesPanel />).queryByText(en.variables.askedAtPrint) !== null; | | 98 | + | | 99 | + it("marks a variable with a prompt that a field prints", () => { | | 100 | + act(() => useLabelStore.getState().updateVariable("v1", { prompt: "Lot number" })); | | 101 | + expect(marked()).toBe(true); | | 102 | + }); | | 103 | + | | 104 | + it("is not marked without a prompt", () => { | | 105 | + expect(marked()).toBe(false); | | 106 | + }); | | 107 | + | | 108 | + it("is not marked while no field prints the variable", () => { | | 109 | + act(() => { | | 110 | + useLabelStore.getState().loadDesign(label, [{ objects: [] }], [{ ...lot, prompt: "Lot number" }]); | | 111 | + }); | | 112 | + expect(marked()).toBe(false); | | 113 | + }); | | 114 | + | | 115 | + it("is not marked while a column fills the variable", () => { | | 116 | + act(() => { | | 117 | + useLabelStore.getState().updateVariable("v1", { prompt: "Lot number" }); | | 118 | + useLabelStore.getState().loadDataset({ headers: ["lot"], rows: [["A1"]], source: csv }); | | 119 | + useLabelStore.getState().setColumnMapping({ bindings: { v1: "lot" }, headerSnapshot: ["lot"] }); | | 120 | + }); | | 121 | + expect(marked()).toBe(false); | | 122 | + }); | | 123 | +}); |
Collapse file Copy file name to clipboardExpand all lines: src/components/Variables/VariablesPanel.tsx +33-3Lines changed: 33 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -21,6 +21,7 @@ import { isDesktopShell } from '../../lib/platform'; | 21 | 21 | import { | 22 | 22 | FN_NUMBER_MIN, | 23 | 23 | FN_NUMBER_MAX, | | 24 | + PROMPT_MAX_LENGTH, | 24 | 25 | nextFreeFnNumber, | 25 | 26 | nextDefaultVariableName, | 26 | 27 | isValidVariableName, | @@ -38,6 +39,7 @@ import { | 38 | 39 | type VariableSource, | 39 | 40 | } from '@zplab/core/lib/variableBinding'; | 40 | 41 | import { countBindings } from '@zplab/core/lib/variableField'; | | 42 | +import { askedVariables } from '@zplab/core/lib/printValues'; | 41 | 43 | import { VariableSourceBadge } from './VariableSourceBadge'; | 42 | 44 |
| 43 | 45 | export function VariablesPanel() { | @@ -116,6 +118,7 @@ export function VariablesPanel() { | 116 | 118 | } | 117 | 119 |
| 118 | 120 | const bindingCounts = countBindings(pages, variables); | | 121 | + const asked = new Set(askedVariables(variables, pages, dataset, columnMapping)); | 119 | 122 | const allSlotsTaken = | 120 | 123 | nextFreeFnNumber(variables.map((v) => v.fnNumber)) === null; | 121 | 124 |
| @@ -378,6 +381,7 @@ export function VariablesPanel() { | 378 | 381 | key={entry.id} | 379 | 382 | variable={entry} | 380 | 383 | bindings={bindingCounts.get(entry.id) ?? 0} | | 384 | + asked={asked.has(entry)} | 381 | 385 | source={source} | 382 | 386 | boundHeader={boundHeader} | 383 | 387 | boundCellValue={activeCellValue(entry, activeRow)} | @@ -398,6 +402,7 @@ export function VariablesPanel() { | 398 | 402 | onChangeDefault={(defaultValue) => | 399 | 403 | tryUpdate(entry.id, { defaultValue }, '') | 400 | 404 | } | | 405 | + onChangePrompt={(prompt) => tryUpdate(entry.id, { prompt }, tv.promptInvalid)} | 401 | 406 | onRequestDelete={() => setPendingDelete(entry)} | 402 | 407 | onDirtyChange={() => | 403 | 408 | setRowError((prev) => { | @@ -479,6 +484,7 @@ export function VariablesPanel() { | 479 | 484 | interface RowProps { | 480 | 485 | variable: Variable; | 481 | 486 | bindings: number; | | 487 | + asked: boolean; | 482 | 488 | source: VariableSource; | 483 | 489 | boundHeader: string | undefined; | 484 | 490 | /** Active-row cell for a bound variable; shown as the default field's | @@ -494,6 +500,7 @@ interface RowProps { | 494 | 500 | onChangeName: (next: string) => void; | 495 | 501 | onChangeFnNumber: (next: number) => void; | 496 | 502 | onChangeDefault: (next: string) => void; | | 503 | + onChangePrompt: (next: string) => void; | 497 | 504 | onRequestDelete: () => void; | 498 | 505 | /** Called when any input value diverges from the committed value so | 499 | 506 | * the panel can clear a stale rowError. Without this a duplicate- | @@ -504,6 +511,7 @@ interface RowProps { | 504 | 511 | function VariableRow({ | 505 | 512 | variable, | 506 | 513 | bindings, | | 514 | + asked, | 507 | 515 | source, | 508 | 516 | boundHeader, | 509 | 517 | boundCellValue, | @@ -513,6 +521,7 @@ function VariableRow({ | 513 | 521 | onChangeName, | 514 | 522 | onChangeFnNumber, | 515 | 523 | onChangeDefault, | | 524 | + onChangePrompt, | 516 | 525 | onRequestDelete, | 517 | 526 | onDirtyChange, | 518 | 527 | disabled, | @@ -523,6 +532,7 @@ function VariableRow({ | 523 | 532 | const [name, setName] = useState(variable.name); | 524 | 533 | const [fn, setFn] = useState(String(variable.fnNumber)); | 525 | 534 | const [def, setDef] = useState(variable.defaultValue); | | 535 | + const [prompt, setPrompt] = useState(variable.prompt ?? ''); | 526 | 536 | // Render-time adjust (the React derived-state pattern): an external store | 527 | 537 | // update to this id (undo, file load, MCP push) must flow back into the | 528 | 538 | // mirror, or a later blur would write the stale values over it. | @@ -532,6 +542,7 @@ function VariableRow({ | 532 | 542 | setName(variable.name); | 533 | 543 | setFn(String(variable.fnNumber)); | 534 | 544 | setDef(variable.defaultValue); | | 545 | + setPrompt(variable.prompt ?? ''); | 535 | 546 | } | 536 | 547 |
| 537 | 548 | const commitName = () => { | @@ -557,6 +568,11 @@ function VariableRow({ | 557 | 568 | onChangeDefault(def); | 558 | 569 | }; | 559 | 570 |
| | 571 | + const commitPrompt = () => { | | 572 | + if (prompt === (variable.prompt ?? '')) return; | | 573 | + onChangePrompt(prompt); | | 574 | + }; | | 575 | + | 560 | 576 | return ( | 561 | 577 | <li className="flex flex-col gap-1.5"> | 562 | 578 | <div className="flex items-center gap-2"> | @@ -615,22 +631,36 @@ function VariableRow({ | 615 | 631 | onChange={(e: ChangeEvent<HTMLInputElement>) => setDef(e.target.value)} | 616 | 632 | onBlur={commitDef} | 617 | 633 | /> | 618 | | - <div className="flex justify-between items-center font-mono text-[9px] uppercase tracking-wider text-muted gap-2"> | 619 | | - <span className={bindings === 0 ? 'opacity-60' : undefined}> | | 634 | + <input | | 635 | + className={inputCls} | | 636 | + aria-label={tv.promptLabel} | | 637 | + disabled={disabled} | | 638 | + placeholder={tv.promptLabel} | | 639 | + maxLength={PROMPT_MAX_LENGTH} | | 640 | + value={prompt} | | 641 | + onChange={(e: ChangeEvent<HTMLInputElement>) => { | | 642 | + setPrompt(e.target.value); | | 643 | + onDirtyChange(); | | 644 | + }} | | 645 | + onBlur={commitPrompt} | | 646 | + /> | | 647 | + <div className="flex justify-between items-start font-mono text-[9px] uppercase tracking-wider text-muted gap-2"> | | 648 | + <span className={`whitespace-nowrap ${bindings === 0 ? 'opacity-60' : ''}`}> | 620 | 649 | {bindings === 0 | 621 | 650 | ? tv.noBindings | 622 | 651 | : bindings === 1 | 623 | 652 | ? tv.bindingsSingular | 624 | 653 | : tv.bindingsPluralFmt.replace('{n}', String(bindings))} | 625 | 654 | </span> | 626 | | - <span className="flex items-center gap-2 shrink-0"> | | 655 | + <span className="flex flex-wrap justify-end items-center gap-x-2 text-right"> | 627 | 656 | {/* Length a «marker» of this variable reserves in builders/char | 628 | 657 | counts (inherited from the default; live while typing). */} | 629 | 658 | <Tooltip content={tv.inheritsLengthHint}> | 630 | 659 | <span className={def.length === 0 ? 'opacity-60' : undefined}> | 631 | 660 | {tv.inheritsLengthFmt.replace('{n}', String(def.length))} | 632 | 661 | </span> | 633 | 662 | </Tooltip> | | 663 | + {asked && <span className="text-indigo">{tv.askedAtPrint}</span>} | 634 | 664 | {/* getVariableSource returns 'default' when there is no dataset, so | 635 | 665 | this hides the redundant default badge when nothing is loaded. */} | 636 | 666 | {error ? ( | |
Collapse file Copy file name to clipboardExpand all lines: src/locales/ar.ts +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1725,13 +1725,16 @@ const ar = { | 1725 | 1725 | nameLabel: 'الاسم', | 1726 | 1726 | fnLabel: 'الفتحة', | 1727 | 1727 | defaultLabel: 'الافتراضي', | | 1728 | + promptLabel: 'نص الطلب عند الطباعة', | 1728 | 1729 | noBindings: 'غير مستخدم', | | 1730 | + askedAtPrint: 'يُطلب عند الطباعة', | 1729 | 1731 | confirmDelete: 'حذف', | 1730 | 1732 | cancel: 'إلغاء', | 1731 | 1733 | noSlotsLeft: 'جميع الفتحات الـ99 مأخوذة.', | 1732 | 1734 | nameInUse: 'الاسم مستخدم بالفعل.', | 1733 | 1735 | nameInvalid: 'اسم غير صالح.', | 1734 | 1736 | slotInUse: 'الفتحة مستخدمة بالفعل.', | | 1737 | + promptInvalid: 'فقط الحروف من A إلى Z والأرقام من 1 إلى 9 والمسافات.', | 1735 | 1738 | notBound: 'غير مرتبط', | 1736 | 1739 | createNew: '+ إنشاء متغير جديد…', | 1737 | 1740 | unbindAria: 'إلغاء ربط المتغير', | |
Collapse file Copy file name to clipboardExpand all lines: src/locales/bg.ts +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1725,13 +1725,16 @@ const bg = { | 1725 | 1725 | nameLabel: 'Име', | 1726 | 1726 | fnLabel: 'Слот', | 1727 | 1727 | defaultLabel: 'По подразбиране', | | 1728 | + promptLabel: 'Подкана при печат', | 1728 | 1729 | noBindings: 'неизползвана', | | 1730 | + askedAtPrint: 'пита се при печат', | 1729 | 1731 | confirmDelete: 'Изтрий', | 1730 | 1732 | cancel: 'Отказ', | 1731 | 1733 | noSlotsLeft: 'Всичките 99 слота са заети.', | 1732 | 1734 | nameInUse: 'Името вече се използва.', | 1733 | 1735 | nameInvalid: 'Невалидно име.', | 1734 | 1736 | slotInUse: 'Слотът вече се използва.', | | 1737 | + promptInvalid: 'Само букви от A до Z, цифри от 1 до 9 и интервали.', | 1735 | 1738 | notBound: 'Не е свързано', | 1736 | 1739 | createNew: '+ Създай нова променлива…', | 1737 | 1740 | unbindAria: 'Премахни връзката', | |
Collapse file Copy file name to clipboardExpand all lines: src/locales/ca.ts +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1795,13 +1795,16 @@ const ca = { | 1795 | 1795 | nameLabel: 'Nom', | 1796 | 1796 | fnLabel: 'Posició', | 1797 | 1797 | defaultLabel: 'Per defecte', | | 1798 | + promptLabel: 'Text de petició en imprimir', | 1798 | 1799 | noBindings: 'sense ús', | | 1800 | + askedAtPrint: 'es demana en imprimir', | 1799 | 1801 | confirmDelete: 'Elimina', | 1800 | 1802 | cancel: 'Cancel·la', | 1801 | 1803 | noSlotsLeft: 'Les 99 posicions estan ocupades.', | 1802 | 1804 | nameInUse: 'El nom ja es fa servir.', | 1803 | 1805 | nameInvalid: 'Nom no vàlid.', | 1804 | 1806 | slotInUse: 'La posició ja es fa servir.', | | 1807 | + promptInvalid: "Només lletres de la A a la Z, xifres de l'1 al 9 i espais.", | 1805 | 1808 | notBound: 'Sense vincular', | 1806 | 1809 | createNew: '+ Crea una variable…', | 1807 | 1810 | unbindAria: 'Desvincula la variable', | |
Collapse file Copy file name to clipboardExpand all lines: src/locales/cs.ts +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1725,13 +1725,16 @@ const cs = { | 1725 | 1725 | nameLabel: 'Název', | 1726 | 1726 | fnLabel: 'Slot', | 1727 | 1727 | defaultLabel: 'Výchozí', | | 1728 | + promptLabel: 'Výzva při tisku', | 1728 | 1729 | noBindings: 'nepoužito', | | 1730 | + askedAtPrint: 'zadává se při tisku', | 1729 | 1731 | confirmDelete: 'Smazat', | 1730 | 1732 | cancel: 'Zrušit', | 1731 | 1733 | noSlotsLeft: 'Všech 99 slotů je obsazeno.', | 1732 | 1734 | nameInUse: 'Název už existuje.', | 1733 | 1735 | nameInvalid: 'Neplatný název.', | 1734 | 1736 | slotInUse: 'Slot už existuje.', | | 1737 | + promptInvalid: 'Jen písmena A až Z, číslice 1 až 9 a mezery.', | 1735 | 1738 | notBound: 'Nepřipojeno', | 1736 | 1739 | createNew: '+ Vytvořit novou proměnnou…', | 1737 | 1740 | unbindAria: 'Odpojit proměnnou', | |
Collapse file Copy file name to clipboardExpand all lines: src/locales/da.ts +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1725,13 +1725,16 @@ const da = { | 1725 | 1725 | nameLabel: 'Navn', | 1726 | 1726 | fnLabel: 'Slot', | 1727 | 1727 | defaultLabel: 'Standard', | | 1728 | + promptLabel: 'Prompt ved udskrivning', | 1728 | 1729 | noBindings: 'ubrugt', | | 1730 | + askedAtPrint: 'spørges ved udskrivning', | 1729 | 1731 | confirmDelete: 'Slet', | 1730 | 1732 | cancel: 'Annuller', | 1731 | 1733 | noSlotsLeft: 'Alle 99 pladser er taget.', | 1732 | 1734 | nameInUse: 'Navnet er allerede i brug.', | 1733 | 1735 | nameInvalid: 'Ugyldigt navn.', | 1734 | 1736 | slotInUse: 'Pladsen er allerede i brug.', | | 1737 | + promptInvalid: 'Kun bogstaverne A til Z, cifrene 1 til 9 og mellemrum.', | 1735 | 1738 | notBound: 'Ikke bundet', | 1736 | 1739 | createNew: '+ Opret ny variabel…', | 1737 | 1740 | unbindAria: 'Frigør variabel', | |
Collapse file Copy file name to clipboardExpand all lines: src/locales/de.ts +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1806,13 +1806,16 @@ const de = { | 1806 | 1806 | nameLabel: 'Name', | 1807 | 1807 | fnLabel: 'Slot', | 1808 | 1808 | defaultLabel: 'Standard', | | 1809 | + promptLabel: 'Abfragetext beim Drucken', | 1809 | 1810 | noBindings: 'ungenutzt', | | 1811 | + askedAtPrint: 'wird abgefragt', | 1810 | 1812 | confirmDelete: 'Löschen', | 1811 | 1813 | cancel: 'Abbrechen', | 1812 | 1814 | noSlotsLeft: 'Alle 99 Slots sind belegt.', | 1813 | 1815 | nameInUse: 'Name bereits in Benutzung.', | 1814 | 1816 | nameInvalid: 'Ungültiger Name.', | 1815 | 1817 | slotInUse: 'Slot bereits in Benutzung.', | | 1818 | + promptInvalid: 'Nur Buchstaben A bis Z, Ziffern 1 bis 9 und Leerzeichen.', | 1816 | 1819 | notBound: 'Nicht gebunden', | 1817 | 1820 | createNew: '+ Neue Variable erstellen…', | 1818 | 1821 | unbindAria: 'Variable lösen', | |
Collapse file Copy file name to clipboardExpand all lines: src/locales/el.ts +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1725,13 +1725,16 @@ const el = { | 1725 | 1725 | nameLabel: 'Όνομα', | 1726 | 1726 | fnLabel: 'Υποδοχή', | 1727 | 1727 | defaultLabel: 'Προεπιλογή', | | 1728 | + promptLabel: 'Προτροπή κατά την εκτύπωση', | 1728 | 1729 | noBindings: 'αχρησιμοποίητη', | | 1730 | + askedAtPrint: 'ζητείται στην εκτύπωση', | 1729 | 1731 | confirmDelete: 'Διαγραφή', | 1730 | 1732 | cancel: 'Άκυρο', | 1731 | 1733 | noSlotsLeft: 'Και τα 99 slot είναι κατειλημμένα.', | 1732 | 1734 | nameInUse: 'Το όνομα χρησιμοποιείται ήδη.', | 1733 | 1735 | nameInvalid: 'Μη έγκυρο όνομα.', | 1734 | 1736 | slotInUse: 'Η υποδοχή χρησιμοποιείται ήδη.', | | 1737 | + promptInvalid: 'Μόνο γράμματα A έως Z, ψηφία 1 έως 9 και κενά.', | 1735 | 1738 | notBound: 'Μη συνδεδεμένο', | 1736 | 1739 | createNew: '+ Δημιουργία νέας μεταβλητής…', | 1737 | 1740 | unbindAria: 'Αποσύνδεση μεταβλητής', | |
Collapse file Copy file name to clipboardExpand all lines: src/locales/en.ts +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1806,13 +1806,16 @@ const en = { | 1806 | 1806 | nameLabel: 'Name', | 1807 | 1807 | fnLabel: 'Slot', | 1808 | 1808 | defaultLabel: 'Default', | | 1809 | + promptLabel: 'Prompt at print', | 1809 | 1810 | noBindings: 'unused', | | 1811 | + askedAtPrint: 'asked at print', | 1810 | 1812 | confirmDelete: 'Delete', | 1811 | 1813 | cancel: 'Cancel', | 1812 | 1814 | noSlotsLeft: 'All 99 slots are taken.', | 1813 | 1815 | nameInUse: 'Name already in use.', | 1814 | 1816 | nameInvalid: 'Invalid name.', | 1815 | 1817 | slotInUse: 'Slot already in use.', | | 1818 | + promptInvalid: 'Only letters A to Z, digits 1 to 9 and spaces.', | 1816 | 1819 | notBound: 'Not bound', | 1817 | 1820 | createNew: '+ Create new variable…', | 1818 | 1821 | unbindAria: 'Unbind variable', | |
|