no-em-dash pre-commit hook for user-facing strings, existing em-dashes rewritten
frontend/scripts/no-em-dash.ts walks src/ with the TypeScript parser and flags an em-dash in JSX text, string literals and template text. A bare "—" placeholder passes, separators go in no-em-dash.allow.json. The script is identical to index's copy.
This commit is contained in:
@@ -39,8 +39,8 @@ export function ConnectionNotice() {
|
||||
}
|
||||
notify(
|
||||
connection.lastSeen
|
||||
? `Instance offline — last seen ${ago(connection.lastSeen / 1000)}, reconnecting…`
|
||||
: "Instance offline — reconnecting…",
|
||||
? `Instance offline (last seen ${ago(connection.lastSeen / 1000)}), reconnecting…`
|
||||
: "Instance offline, reconnecting…",
|
||||
"warning",
|
||||
{ id: ID, persistent: true },
|
||||
)
|
||||
|
||||
@@ -802,8 +802,8 @@ export function DashboardEditor({
|
||||
>
|
||||
<span className="truncate text-sm">
|
||||
{clipped.length === 1
|
||||
? "1 widget sits below the canvas — a panel this size will not show it."
|
||||
: `${clipped.length} widgets sit below the canvas — a panel this size will not show them.`}
|
||||
? "1 widget sits below the canvas. A panel this size will not show it."
|
||||
: `${clipped.length} widgets sit below the canvas. A panel this size will not show them.`}
|
||||
</span>
|
||||
<Button
|
||||
variant="outline"
|
||||
@@ -885,7 +885,7 @@ export function DashboardEditor({
|
||||
hasDraft={hasDraft}
|
||||
saving={save.isPending}
|
||||
publishing={publish.isPending}
|
||||
draftHint="Saved — publish to put it on the panels"
|
||||
draftHint="Saved. Publish to put it on the panels"
|
||||
onPublish={() => void publishDashboard()}
|
||||
/>
|
||||
|
||||
|
||||
@@ -293,7 +293,7 @@ export function FlowDock({
|
||||
saving={saving}
|
||||
publishing={publishing}
|
||||
offline={!connected}
|
||||
draftHint="Saved — publish to put it live"
|
||||
draftHint="Saved. Publish to put it live"
|
||||
onPublish={onPublish}
|
||||
/>
|
||||
</Dock>
|
||||
|
||||
@@ -1139,7 +1139,7 @@ function FlowEditorInner({
|
||||
JSON.stringify({ nodes: picked, sources } satisfies NodeClipboard),
|
||||
)
|
||||
if (!stored) {
|
||||
notify("That is too much to copy — the browser store is full.", "error")
|
||||
notify("That is too much to copy. The browser store is full.", "error")
|
||||
}
|
||||
}, [canvasNodes, definitions, flowName, selectedId, sourceTypes])
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ const NODE_ICONS = {
|
||||
const STATUS_STYLES = {
|
||||
queued: {
|
||||
dot: "bg-muted-foreground",
|
||||
label: "Queued — waiting for a machine",
|
||||
label: "Queued, waiting for a machine",
|
||||
},
|
||||
running: { dot: "bg-primary animate-pulse", label: "Running" },
|
||||
success: { dot: "bg-status-success", label: "Last run succeeded" },
|
||||
@@ -282,7 +282,7 @@ function FlowNodeComponent({ data, selected }: NodeProps) {
|
||||
)}
|
||||
aria-label={
|
||||
failedEarlier
|
||||
? `Failed at ${failedAt} — show the traceback`
|
||||
? `Failed at ${failedAt}. Show the traceback`
|
||||
: "Show what this node printed"
|
||||
}
|
||||
data-testid="node-traceback"
|
||||
@@ -299,7 +299,7 @@ function FlowNodeComponent({ data, selected }: NodeProps) {
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
{failedEarlier
|
||||
? `Failed at ${failedAt} — show the traceback`
|
||||
? `Failed at ${failedAt}. Show the traceback`
|
||||
: "Show the traceback"}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
|
||||
@@ -64,7 +64,7 @@ export function LiveIndicator() {
|
||||
<Activity className="size-4 shrink-0 text-muted-foreground" />
|
||||
<span className="font-medium">Live updates disconnected</span>
|
||||
<span className="text-muted-foreground">
|
||||
values and activity are frozen — reconnecting…
|
||||
values and activity are frozen, reconnecting…
|
||||
</span>
|
||||
</motion.div>
|
||||
) : null}
|
||||
|
||||
@@ -255,7 +255,7 @@ export function RunsScreen({
|
||||
names={selected.map(shortId)}
|
||||
noun="run"
|
||||
pending={remove.isPending}
|
||||
description="A run still going is cancelled first. What it recorded — its numbers, its nodes and the outputs other runs reuse from the cache — goes with it, and nothing brings it back."
|
||||
description="A run still going is cancelled first. Its numbers, its nodes and the outputs other runs reuse from the cache go with it, and nothing brings them back."
|
||||
onConfirm={() => remove.mutate(selected)}
|
||||
/>
|
||||
|
||||
@@ -288,10 +288,10 @@ export function RunsScreen({
|
||||
{runs.length} run{runs.length === 1 ? "" : "s"}
|
||||
{selected.length > 0 ? `, ${selected.length} picked` : ""}
|
||||
{selected.length >= MAX_SELECTION
|
||||
? ` — ${MAX_SELECTION} is as many as one comparison carries`
|
||||
? `. ${MAX_SELECTION} is as many as one comparison carries`
|
||||
: ""}
|
||||
{!hasNextPage && runs.length >= LIST_CAP
|
||||
? ` — the newest ${LIST_CAP}, which is as deep as this list reads`
|
||||
? `. The newest ${LIST_CAP} is as deep as this list reads`
|
||||
: ""}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -283,7 +283,7 @@ export async function cancelThenDelete(runId: string) {
|
||||
* left as an empty chart, which reads as a fault.
|
||||
*/
|
||||
export const NO_CURVE =
|
||||
"No curve was recorded. A node restored from the cache is read back from the run that produced it, so this draws nothing once that run has been deleted — its outputs are still on the result."
|
||||
"No curve was recorded. A node restored from the cache is read back from the run that produced it, so this draws nothing once that run has been deleted. Its outputs are still on the result."
|
||||
|
||||
/**
|
||||
* Which restored nodes lost their curve, and with which deleted run.
|
||||
|
||||
@@ -159,7 +159,7 @@ export function RemoteAccess() {
|
||||
<CardHeader>
|
||||
<CardTitle>Remote access</CardTitle>
|
||||
<CardDescription>
|
||||
Reach this instance from fluksio.com. Entirely optional — without it,
|
||||
Reach this instance from fluksio.com. Entirely optional. Without it,
|
||||
this instance talks to nothing outside your network.
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
@@ -179,7 +179,7 @@ export function RemoteAccess() {
|
||||
</span>
|
||||
</>
|
||||
) : status.last_error ? (
|
||||
`Reconnecting — ${status.last_error}`
|
||||
`Reconnecting: ${status.last_error}`
|
||||
) : (
|
||||
"Reconnecting…"
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user