Add interface languages and improve themes and workspace controls for 0.1.36

This commit is contained in:
Knotty Wyvern
2026-10-15 10:55:59 -07:00
parent b066359b66
commit 68e86ab6eb
98 changed files with 5499 additions and 874 deletions
+4 -3
View File
@@ -1,3 +1,4 @@
import { tr } from '../i18n/index.ts';
import type { EditorView } from "@codemirror/view";
import { actionIcon } from "../ui/actionIcons";
import { moveTableAxis, type TableAxis } from "./tableStructure";
@@ -102,7 +103,7 @@ export function tableDragControls(root: HTMLElement, wrapper: HTMLElement, table
if (!preview || !previewLabel || !drag) return;
const valid = drag.to !== undefined;
preview.classList.toggle("is-invalid-drop", !valid);
previewLabel.textContent = `${drag.axis === "row" ? "Row" : "Column"} ${drag.index + 1}${valid ? ` → ${drag.to! + 1}` : " · Release to cancel"}`;
previewLabel.textContent = `${drag.axis === "row" ? tr("Row") : tr("Column")} ${drag.index + 1}${valid ? ` → ${drag.to! + 1}` : tr(" · Release to cancel")}`;
const rect = preview.getBoundingClientRect();
const x = Math.max(8, Math.min(drag.x + 16, window.innerWidth - rect.width - 8));
const y = Math.max(8, Math.min(drag.y + 16, window.innerHeight - rect.height - 8));
@@ -171,8 +172,8 @@ export function tableDragControls(root: HTMLElement, wrapper: HTMLElement, table
button.type = "button";
button.className = `table-drag-handle table-drag-${axis}`;
button.dataset.index = String(index);
const label = `Move ${axis} ${index + 1}`;
const tooltip = `${label} · Drag to reorder · ${axis === "row" ? "↑/↓" : "←/→"} to move`;
const label = tr(axis === "row" ? "Move row {number}" : "Move column {number}", { number: index + 1 });
const tooltip = tr("{label} · Drag to reorder · {keys} to move", { label, keys: axis === "row" ? "↑/↓" : "←/→" });
button.setAttribute("aria-label", label);
tooltipCleanup.push(attachTooltip(button, () => drag ? "" : tooltip));
button.append(actionIcon("grip"));