Convert British spellings to American across the repo

colour -> color, behaviour -> behavior, centre -> center, favourite ->
favorite, and about twenty other pairs, applied consistently across
comments, docs, error/UI copy, and a handful of QML identifiers that
used the British spelling as their actual name: SystemSettings'
serialiseValue/serialiseTable/normaliseGradient, Displays'
normaliseModes, Wallpaper's normalisePolicy, SettingsBackup's
serialiseHomeState, DateTime's ntpSynchronised property, Clipboard's
_normalise helper, and ShortcutCapture's cancelled signal (with its
onCancelled handler in ShortcutsPage.qml). Every call site and the two
tests that assert on the literal source text (settings-ownership and
settings-backup-live contracts) were updated in lockstep.

Left untouched: config/dot/espanso/match/packages/misspell-en/ is a
vendored third-party autocorrect dictionary -- its entries are typo
corrections, not our prose, and rewriting them would fight the
package's own purpose (and any future re-sync from upstream).

The already-American `favorites` property (Home page pinned
accessories) was never actually misspelled -- only nearby comments and
error strings said "favourites" -- so no data migration was needed
there.

Claude-Session: https://claude.ai/code/session_01E6TJUAh41HaP25MVHWkhRZ
This commit is contained in:
Gabriel Brown
2026-08-19 08:07:55 -04:00
parent 8156fc47ca
commit d96863b687
113 changed files with 322 additions and 322 deletions
+2 -2
View File
@@ -220,7 +220,7 @@ Singleton {
}
try {
root.entries = JSON.parse(text).map(row => root._normalise(row));
root.entries = JSON.parse(text).map(row => root._normalize(row));
} catch (e) {
console.warn("Clipboard: could not parse history —", e);
root.entries = [];
@@ -231,7 +231,7 @@ Singleton {
// Turn a raw row into what the UI actually asks questions of, so no
// delegate has to know about column names or Vicinae's integer kinds.
function _normalise(row: var): var {
function _normalize(row: var): var {
const encrypted = row.enc !== 0;
const textual = row.kind === root.kindText || row.kind === root.kindLink;
const raw = row.preview || "";
@@ -6,7 +6,7 @@ pragma Singleton
// because every token there is a binding. Two other things draw on this desktop
// and do not read Panama's store:
//
// GTK applications read gsettings colour-scheme and gtk-theme
// GTK applications read gsettings color-scheme and gtk-theme
// the compositor draws window borders and shadows
//
// A toolbar or a window border still wearing the other scheme is more jarring
@@ -31,10 +31,10 @@ Singleton {
readonly property string inactiveBorder: root.dark ? root.inactiveBorderDark : root.inactiveBorderLight
// The focused border follows the chosen accent. `ee` is the shipped alpha
// for the Prism gradient; Theme owns which colours, this owns the form the
// for the Prism gradient; Theme owns which colors, this owns the form the
// compositor wants them in.
function hyprColor(value: var): string {
// Qt gives "#rrggbb" -- or "#aarrggbb" if the colour ever carries an
// Qt gives "#rrggbb" -- or "#aarrggbb" if the color ever carries an
// alpha channel. slice(-6) keeps the trailing rrggbb either way;
// slice(0, 6) would instead grab "aarrgg" out of an 8-digit string and
// call it RGB. Hyprland wants rgba(rrggbbaa).
@@ -59,7 +59,7 @@ Singleton {
id: runner
onExited: (exitCode, exitStatus) => {
if (exitCode !== 0)
root.lastError = "The colour scheme could not be applied everywhere.";
root.lastError = "The color scheme could not be applied everywhere.";
root.drain();
}
}
@@ -153,16 +153,16 @@ Singleton {
// Each accent carries a separate pair for light and dark, so this
// runs on either kind of change: a scheme flip restates the same
// accent's other pair, and an accent change restates the same
// scheme's other colours.
// scheme's other colors.
//
// A two-stop gradient at the shipped angle. Written as a Lua TABLE:
// the string form of a gradient carries only one stop, and passing
// "rgba(a) rgba(b) 115deg" as a string is accepted and silently
// keeps the previous value. Multi-stop must be the table form --
// built by the same serialiseValue() SystemSettings uses for every
// built by the same serializeValue() SystemSettings uses for every
// other gradient, rather than a second hand-rolled copy of that
// escaping here.
const activeBorder = SystemSettings.serialiseValue({
const activeBorder = SystemSettings.serializeValue({
colors: [root.accentBorderStart, root.accentBorderEnd],
angle: 115
});
+4 -4
View File
@@ -23,7 +23,7 @@ Singleton {
property string timezone: ""
property bool ntpEnabled: false
property bool ntpSynchronised: false
property bool ntpSynchronized: false
property string localTime: ""
property string universalTime: ""
property string rtcTime: ""
@@ -79,7 +79,7 @@ Singleton {
// status is re-read either way.
root.lastError = exitCode === 0
? ""
: "The system rejected that change, or authentication was cancelled.";
: "The system rejected that change, or authentication was canceled.";
root.refresh();
}
}
@@ -101,7 +101,7 @@ Singleton {
else if (key === "NTP")
root.ntpEnabled = value === "yes";
else if (key === "NTPSynchronized")
root.ntpSynchronised = value === "yes";
root.ntpSynchronized = value === "yes";
}
root.lastError = "";
}
@@ -115,7 +115,7 @@ Singleton {
// caller-supplied text reaches the command.
function setTimezone(zone: string): bool {
if (root.zones.indexOf(zone) < 0) {
root.lastError = "That is not a timezone this system recognises.";
root.lastError = "That is not a timezone this system recognizes.";
return false;
}
if (writeRun.running)
+2 -2
View File
@@ -141,7 +141,7 @@ Singleton {
? persistedPrimaries[0].name
: (origin?.name ?? raw[0]?.name ?? "");
root.monitors = raw.map(monitor => {
const modes = root.normaliseModes(monitor.availableModes ?? []);
const modes = root.normalizeModes(monitor.availableModes ?? []);
const width = monitor.width ?? 0;
const height = monitor.height ?? 0;
const refreshRate = monitor.refreshRate ?? 0;
@@ -200,7 +200,7 @@ Singleton {
// resolution at distinct rates such as 60.00 and 59.94. Those identities
// remain separate because confirmation and recovery must read back the
// exact mode the user chose, even when their rounded labels look similar.
function normaliseModes(raw: var): var {
function normalizeModes(raw: var): var {
const seen = {};
const out = [];
for (const entry of raw) {
+1 -1
View File
@@ -114,7 +114,7 @@ Singleton {
}
// Stores a chosen place. Coordinates are rounded to four decimals -- roughly
// ten metres, far finer than a weather reading resolves, and it keeps a
// ten meters, far finer than a weather reading resolves, and it keeps a
// precise home location out of the settings file.
function choose(place: var): bool {
const latitude = Math.round(place.latitude * 10000) / 10000;
@@ -81,7 +81,7 @@ Singleton {
}
// "AMD ... [Radeon RX 7700 XT / 7800 XT] (rev c8)" is what lspci gives; the
// bracketed marketing name is the part anyone recognises.
// bracketed marketing name is the part anyone recognizes.
function shortName(name: string): string {
const bracketed = String(name).match(/\[([^\]]+)\]\s*(?:\(rev[^)]*\))?\s*$/);
return bracketed ? bracketed[1] : String(name).replace(/\s*\(rev[^)]*\)\s*$/, "");
@@ -43,7 +43,7 @@ Singleton {
readonly property bool scheduled: root.inWindow(clock.hours + clock.minutes / 60)
// A manual toggle always wins: it drops out of the schedule rather than
// being silently reverted a minute later. Same as GNOME's behaviour when
// being silently reverted a minute later. Same as GNOME's behavior when
// you flip night light off during a scheduled evening.
function toggle(): void {
if (root.automatic) {
+2 -2
View File
@@ -10,7 +10,7 @@ pragma Singleton
// the *live* objects rather than copies: that keeps actions and inline replies
// working from the tray, which is what GNOME does. The cost is that a
// notification an app closes itself (progress bars, "download finished"
// replacing "downloading") disappears from history too — correct behaviour,
// replacing "downloading") disappears from history too — correct behavior,
// but the reason history is not append-only.
// ─────────────────────────────────────────────────────────────────────────────
@@ -34,7 +34,7 @@ Singleton {
// Suppresses toasts entirely. Notifications still reach history.
property bool doNotDisturb: false
// Cleared when the notification centre is opened. The bar binds to this.
// Cleared when the notification center is opened. The bar binds to this.
property int unreadCount: 0
// Kept separate from the persisted map so this version can safely run
@@ -33,7 +33,7 @@ Singleton {
// Non-empty when the machine cannot actually deliver the profile it is set
// to -- thermal throttling, or a laptop running on battery. Worth showing,
// because otherwise "performance" is a claim the hardware is not honouring.
// because otherwise "performance" is a claim the hardware is not honoring.
property string degraded: ""
readonly property bool available: root.profiles.length > 0
@@ -52,7 +52,7 @@ Singleton {
function detail(profile: string): string {
switch (profile) {
case "power-saver": return "Reduces performance to save energy and run quieter";
case "balanced": return "Standard behaviour, scaling up only when needed";
case "balanced": return "Standard behavior, scaling up only when needed";
case "performance": return "Holds higher clocks, using more power and making more noise";
default: return "";
}
@@ -107,7 +107,7 @@ Singleton {
if (restoreAccepted)
root.lastError = "";
else if (root.lastError === "")
root.lastError = "Desktop settings were restored, but Home favourites could not be reloaded.";
root.lastError = "Desktop settings were restored, but Home favorites could not be reloaded.";
if (!restoreAccepted) {
root.setDisplayBlocked(false);
root.protectedDisplays = ({});
@@ -192,10 +192,10 @@ Singleton {
if (actionRun.running)
return;
actionRun.restoring = false;
actionRun.exec([root.helperPath, "save", root.serialiseHomeState()]);
actionRun.exec([root.helperPath, "save", root.serializeHomeState()]);
}
function serialiseHomeState(): string {
function serializeHomeState(): string {
const current = root.readHomeState();
const favorites = [];
for (const favorite of current.favorites ?? []) {
@@ -59,7 +59,7 @@ Singleton {
// on a settings app that plainly has one.
readonly property var extraEntries: [
{ label: "Timezone", detail: "Set the system timezone", page: "datetime" },
{ label: "Network time", detail: "Synchronise the clock with a time server", page: "datetime" },
{ label: "Network time", detail: "Synchronize the clock with a time server", page: "datetime" },
{ label: "Wi-Fi", detail: "Managed by GNOME Settings", page: "connectivity" },
{ label: "Bluetooth", detail: "Managed by GNOME Settings", page: "connectivity" },
{ label: "Printers", detail: "Managed by GNOME Settings", page: "connectivity" },
@@ -68,7 +68,7 @@ Singleton {
{ label: "Keyboard shortcuts", detail: "Every shortcut the compositor has bound", page: "shortcuts" },
{ label: "System Health", detail: "Check Panama services, integrations, tools, and recovery actions", page: "services" },
{ label: "Copy health report", detail: "Copy a redacted Panama doctor report", page: "services" },
{ label: "Lock screen background", detail: "Choose a blurred desktop, wallpaper, or solid colour", page: "appearance" },
{ label: "Lock screen background", detail: "Choose a blurred desktop, wallpaper, or solid color", page: "appearance" },
{ label: "Password field", detail: "Choose whether the empty lock-screen field stays visible", page: "appearance" },
{ label: "Per-display wallpaper", detail: "Assign a different image to each connected display", page: "appearance" },
{ label: "Arrange displays", detail: "Drag connected displays into their physical positions", page: "displays" },
@@ -1,6 +1,6 @@
pragma Singleton
// GNOME and GTK applications already honour these desktop sound preferences.
// GNOME and GTK applications already honor these desktop sound preferences.
// Panama controls the same durable keys so moving between sessions does not
// create two competing notions of whether event feedback is enabled.
@@ -277,7 +277,7 @@ Singleton {
function hyprValue(entry: var, value: var): var {
// Some options are phrased as a negative by the compositor -- the four
// Hyprland notices are all `disable_x` -- while the setting reads as
// "show x", because a switch labelled "Disable splash text" that must
// "show x", because a switch labeled "Disable splash text" that must
// be ON to hide something is a small cruelty. `invert` bridges the two,
// in exactly one place, so nothing downstream has to remember which
// options are backwards.
@@ -289,7 +289,7 @@ Singleton {
return value;
}
// Serialises validated values into a nested hl.config{} call. Table paths
// Serializes validated values into a nested hl.config{} call. Table paths
// come from the schema and values have already passed coerce(), including
// the pattern check on constrained strings, so nothing caller-supplied
// reaches the payload unchecked.
@@ -301,12 +301,12 @@ Singleton {
let node = tree;
for (let i = 0; i < path.length - 1; i++)
node = node[path[i]] = node[path[i]] ?? {};
node[path[path.length - 1]] = root.serialiseValue(root.hyprValue(entry, requested[key]));
node[path[path.length - 1]] = root.serializeValue(root.hyprValue(entry, requested[key]));
}
return `hl.config(${root.serialiseTable(tree)})`;
return `hl.config(${root.serializeTable(tree)})`;
}
function serialiseValue(value: var): string {
function serializeValue(value: var): string {
if (typeof value === "boolean")
return value ? "true" : "false";
if (typeof value === "number")
@@ -330,22 +330,22 @@ Singleton {
if (Array.isArray(value) && value.length === 2)
return `{ ${Number(value[0])}, ${Number(value[1])} }`;
// Strings only reach here after the schema's pattern check; quoting is
// belt-and-braces rather than the primary defence.
// belt-and-braces rather than the primary defense.
return `"${String(value).replace(/["\\]/g, "")}"`;
}
function serialiseTable(node: var): string {
function serializeTable(node: var): string {
const parts = [];
for (const name in node) {
const child = node[name];
// A leaf arrives pre-serialised as a string; anything else is
// A leaf arrives pre-serialized as a string; anything else is
// either a nested section or a structured value (gradient, vec2)
// that serialiseValue knows how to render.
// that serializeValue knows how to render.
const rendered = typeof child === "string"
? child
: (Array.isArray(child) || (child && child.colors !== undefined)
? root.serialiseValue(child)
: root.serialiseTable(child));
? root.serializeValue(child)
: root.serializeTable(child));
parts.push(`${name} = ${rendered}`);
}
return `{ ${parts.join(", ")} }`;
@@ -403,11 +403,11 @@ Singleton {
function gradientMatches(expected: var, observed: string): bool {
if (typeof observed !== "string")
return false;
return root.normaliseGradient(expected) === root.normaliseGradient(observed);
return root.normalizeGradient(expected) === root.normalizeGradient(observed);
}
// Both notations reduced to "aarrggbb aarrggbb Ndeg".
function normaliseGradient(value: var): string {
function normalizeGradient(value: var): string {
const stops = [];
let angle = 0;
@@ -518,8 +518,8 @@ Singleton {
// Panama's shipped DP-2 placement and automatic placement elsewhere.
// Home accessories keep their own store (panama-home.json), so a reset
// that only cleared the schema store would silently leave a customised
// favourites list behind while claiming to restore Panama's defaults.
// that only cleared the schema store would silently leave a customized
// favorites list behind while claiming to restore Panama's defaults.
//
// HomePreferences owns the write-through boundary so the state file is
// rewritten before this reset can be considered complete.
@@ -593,7 +593,7 @@ Singleton {
// `subpage` reaches the panels GNOME 50 nests under System -- users,
// about, datetime, region -- which its own desktop entries open as
// `gnome-control-center system users`. Without it, a row labelled "Users"
// `gnome-control-center system users`. Without it, a row labeled "Users"
// lands on System's front page and leaves the user to navigate, which is
// most of the way to a broken button.
function openGnomePanel(panel: string, subpage: string): bool {
+6 -6
View File
@@ -187,7 +187,7 @@ Singleton {
};
}
function normalisePolicy(policy: var): var {
function normalizePolicy(policy: var): var {
if (!policy || typeof policy !== "object")
return null;
const mode = ["single", "slideshow", "per-monitor"].includes(policy.mode)
@@ -220,8 +220,8 @@ Singleton {
function applyPolicy(policy: var, persist: bool, automatic: bool): bool {
if (root.busy)
return false;
const normalised = root.normalisePolicy(policy);
if (normalised === null) {
const normalized = root.normalizePolicy(policy);
if (normalized === null) {
root.lastError = "That wallpaper policy is not valid.";
return false;
}
@@ -231,8 +231,8 @@ Singleton {
return false;
}
const expected = WallpaperPolicy.effectiveMap(
normalised.mode, normalised.globalPath, normalised.slideshowPath,
normalised.assignments, outputs, normalised.candidates);
normalized.mode, normalized.globalPath, normalized.slideshowPath,
normalized.assignments, outputs, normalized.candidates);
if (Object.keys(expected).length !== outputs.length
|| Object.values(expected).some(path => path === "")) {
root.lastError = "That wallpaper policy is not valid.";
@@ -242,7 +242,7 @@ Singleton {
root.transaction = {
expected,
remaining: outputs.slice(),
policy: normalised,
policy: normalized,
persist: persist === true,
automatic: automatic === true
};