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
+1 -1
View File
@@ -69,7 +69,7 @@ fi
# ── Signal strength is a ratio, and the labels must reflect that ─────────────
while IFS='|' read -r value expect; do
got="$(run ipc call connectivity-test labelFor "$value")"
[[ "$got" == "$expect" ]] || fail "signal $value labelled '$got', expected '$expect'"
[[ "$got" == "$expect" ]] || fail "signal $value labeled '$got', expected '$expect'"
done <<'CASES'
1.0|Excellent
0.85|Excellent
@@ -5,7 +5,7 @@
#
# This exists because the lists had drifted badly. jq is used by thirty-one call
# sites across the helpers and the contracts; kitty has a full shipped config
# and a dock pin; tmux and btop have shipped themes that the colour scheme
# and a dock pin; tmux and btop have shipped themes that the color scheme
# switches. None of the four were declared. So a fresh machine that followed
# this repository's own install instructions would not have them.
#
+1 -1
View File
@@ -3,7 +3,7 @@
# Every pinned application must resolve to an installed desktop entry.
#
# DockBody drops a pin it cannot resolve rather than drawing a broken icon,
# which is the right behaviour at runtime and a terrible one to debug: a typo in
# which is the right behavior at runtime and a terrible one to debug: a typo in
# the shipped list, or an application that changed its desktop id, simply
# removes an icon from the dock with nothing logged.
#
+3 -3
View File
@@ -2,9 +2,9 @@
# Every enum backed by a Hyprland option must offer values that option accepts.
#
# This exists because of a bug that shipped: followMouse offered 0/1/2 labelled
# This exists because of a bug that shipped: followMouse offered 0/1/2 labeled
# "Never" / "Click to focus" / "Sloppy focus", while Hyprland's actual mapping
# is disabled=0, follow=1, detached=2, separate=3. The desktop was labelled
# is disabled=0, follow=1, detached=2, separate=3. The desktop was labeled
# "Click to focus" and was in fact following the pointer, the way to GET click
# to focus was to choose "Never", and value 3 did not exist in the UI at all.
#
@@ -85,7 +85,7 @@ while IFS=$'\t' read -r key option values; do
while read -r published; do
[[ -n "$published" ]] || continue
grep -qx "$published" <<<"$(tr ',' '\n' <<<"$values")" \
|| fail "$option publishes value $published but $key does not offer it, so that behaviour is unreachable from Settings"
|| fail "$option publishes value $published but $key does not offer it, so that behavior is unreachable from Settings"
done <<<"$(tr ',' '\n' <<<"$map_values")"
fi
+2 -2
View File
@@ -65,7 +65,7 @@ rg -Fq 'SystemSettings.openGnomePanel("system", "users")' "$settings_dir/HealthP
rg -Fq 'SystemSettings.openGnomePanel("sharing")' "$settings_dir/HealthPage.qml" \
|| fail 'Fedora ownership boundary lost the Sharing handoff'
rg -Fq 'SystemSettings.openGnomePanel("color")' "$settings_dir/HealthPage.qml" \
|| fail 'Fedora ownership boundary lost the Colour profiles handoff'
|| fail 'Fedora ownership boundary lost the Color profiles handoff'
rg -Fq 'SystemSettings.openGnomePanel("wellbeing")' "$settings_dir/HealthPage.qml" \
|| fail 'Fedora ownership boundary lost the Digital wellbeing handoff'
# Exact authored handoffs are asserted above. Also prove every panel named by
@@ -307,7 +307,7 @@ jq -e '
and .fedoraHandoffs == [
{id:"users", label:"Users", action:"Open users"},
{id:"sharing", label:"Sharing", action:"Open sharing"},
{id:"color", label:"Colour profiles", action:"Open colour"},
{id:"color", label:"Color profiles", action:"Open color"},
{id:"wellbeing", label:"Digital wellbeing", action:"Open wellbeing"}
]
and .summaryHeight == 126
@@ -101,10 +101,10 @@ rg -Fq 'color = rgba(225, 226, 231, 1.0)' "$generated" || fail 'light solid mode
rg -Fq 'inner_color = rgba(208, 213, 227, 0.85)' "$generated" || fail 'light password field does not match the themed fallback'
rg -Fq 'font_color = rgba(55, 96, 191, 1.0)' "$generated" || fail 'light foreground does not match Theme.fg'
rg -Fq 'outer_color = rgba(46, 125, 233, 0.9)' "$generated" || fail 'light focus ring does not match Theme.accent'
rg -Fq 'check_color = rgba(46, 125, 233, 1.0)' "$generated" || fail 'light success colour does not match Theme.accent'
rg -Fq 'fail_color = rgba(245, 42, 101, 1.0)' "$generated" || fail 'light error colour does not match Theme.red'
rg -Fq 'foreground="##6172b0"' "$generated" || fail 'light placeholder markup retained the dark muted colour'
rg -Fq 'foreground="##f52a65"' "$generated" || fail 'light failure markup retained the dark error colour'
rg -Fq 'check_color = rgba(46, 125, 233, 1.0)' "$generated" || fail 'light success color does not match Theme.accent'
rg -Fq 'fail_color = rgba(245, 42, 101, 1.0)' "$generated" || fail 'light error color does not match Theme.red'
rg -Fq 'foreground="##6172b0"' "$generated" || fail 'light placeholder markup retained the dark muted color'
rg -Fq 'foreground="##f52a65"' "$generated" || fail 'light failure markup retained the dark error color'
rg -Fq 'blur_passes = 0' "$generated" || fail 'blur level zero did not disable passes'
rg -Fq 'blur_size = 1' "$generated" || fail 'blur level zero did not use the safe size'
rg -Fq 'fade_on_empty = true' "$generated" || fail 'fade-on-empty setting was ignored'
@@ -120,12 +120,12 @@ fi
write_settings '{"accentName":"orchid","colorScheme":"dark"}'
run_helper generate
rg -Fq 'outer_color = rgba(192, 153, 255, 0.9)' "$generated" || fail 'dark orchid accent did not drive the focus ring'
rg -Fq 'check_color = rgba(192, 153, 255, 1.0)' "$generated" || fail 'dark orchid accent did not drive the success colour'
rg -Fq 'check_color = rgba(192, 153, 255, 1.0)' "$generated" || fail 'dark orchid accent did not drive the success color'
write_settings '{"accentName":"orchid","colorScheme":"light"}'
run_helper generate
rg -Fq 'outer_color = rgba(120, 71, 189, 0.9)' "$generated" || fail 'light orchid accent did not drive the focus ring'
rg -Fq 'check_color = rgba(120, 71, 189, 1.0)' "$generated" || fail 'light orchid accent did not drive the success colour'
rg -Fq 'check_color = rgba(120, 71, 189, 1.0)' "$generated" || fail 'light orchid accent did not drive the success color'
write_settings '{"accentName":"not-a-real-accent","colorScheme":"dark"}'
run_helper generate
+13 -13
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# The lock screen follows the colour scheme.
# The lock screen follows the color scheme.
#
# It did not. hyprlock.conf shipped with Tokyo Night Moon hardcoded in six
# places, so choosing light mode left the one screen a user sees most often
@@ -26,11 +26,11 @@ fail() {
[[ -r "$template" ]] || fail 'hyprlock.conf.template is missing, so nothing generates the lock screen'
# The committed template must carry no literal colours. One left behind is a
# colour that silently stays dark in light mode -- exactly the original bug.
# The committed template must carry no literal colors. One left behind is a
# color that silently stays dark in light mode -- exactly the original bug.
literal="$(grep -vE '^\s*#' "$template" | grep -oE 'rgba\([0-9]+, *[0-9]+, *[0-9]+' || true)"
[[ -z "$literal" ]] \
|| fail "the template still contains hardcoded colours, which will not follow the scheme: $literal"
|| fail "the template still contains hardcoded colors, which will not follow the scheme: $literal"
fixture="$(mktemp -d /tmp/panama-lockscreen.XXXXXX)"
trap 'rm -rf "$fixture"' EXIT
@@ -44,31 +44,31 @@ for scheme in dark light; do
[[ -r "$generated" ]] || fail "no hyprlock.conf was generated for $scheme"
# An unsubstituted placeholder is not a parse error to hyprlock; it is an
# invalid colour it quietly ignores, falling back to its own default.
# invalid color it quietly ignores, falling back to its own default.
leftover="$(grep -oE '@[A-Z_]+@' "$generated" || true)"
[[ -z "$leftover" ]] \
|| fail "$scheme left placeholders unsubstituted: $leftover"
# Every colour hyprlock is given must be a complete decimal triple. It
# Every color hyprlock is given must be a complete decimal triple. It
# takes rgba(r, g, b, a), NOT hex, and a hex value here is silently ignored.
while read -r colour; do
[[ -n "$colour" ]] || continue
grep -qE '^rgba\([0-9]{1,3}, [0-9]{1,3}, [0-9]{1,3}$' <<<"$colour" \
|| fail "$scheme produced a malformed colour: $colour"
while read -r color; do
[[ -n "$color" ]] || continue
grep -qE '^rgba\([0-9]{1,3}, [0-9]{1,3}, [0-9]{1,3}$' <<<"$color" \
|| fail "$scheme produced a malformed color: $color"
done < <(grep -vE '^\s*#' "$generated" | grep -oE 'rgba\([^)]*' | sed 's/,[^,]*$//')
# The Pango markup values are hex, and hyprlock wants them doubled-hashed.
while read -r pango; do
[[ -n "$pango" ]] || continue
grep -qE '^##[0-9a-f]{6}$' <<<"$pango" \
|| fail "$scheme produced malformed Pango markup colour: $pango"
|| fail "$scheme produced malformed Pango markup color: $pango"
done < <(grep -vE '^\s*#' "$generated" | grep -oE '##[0-9a-fA-F]{6}')
# The whole background block, not a fixed number of lines after it: the
# colour sits near the end, after the blur and noise settings.
# color sits near the end, after the blur and noise settings.
background="$(awk '/^background \{/,/^\}/' "$generated" \
| grep -vE '^\s*#' | grep -oE 'color = rgba\([0-9]+' | grep -oE '[0-9]+$' | head -1)"
[[ -n "$background" ]] || fail "$scheme produced no background colour"
[[ -n "$background" ]] || fail "$scheme produced no background color"
# The point of the whole exercise: a light lock screen must actually be
# light. 128 splits the two cleanly for these palettes.
+2 -2
View File
@@ -4,7 +4,7 @@
#
# The schema says what a setting IS; it cannot say what a setting USED to be.
# Rename a key, change its units, or split one setting into two, and the stored
# value stops being recognised -- and unrecognised keys are deliberately carried
# value stops being recognized -- and unrecognized keys are deliberately carried
# through untouched, so the user's choice silently stops taking effect with
# nothing to explain it.
#
@@ -67,6 +67,6 @@ check '.failure.v == 3 and .failure.count == 2 and .failure.kept == true' \
# The promise that makes rollback safe.
check '.preserved.kept == true' \
'a migration must not discard keys it does not recognise' '.preserved'
'a migration must not discard keys it does not recognize' '.preserved'
printf 'migrations contract: PASS\n'
+1 -1
View File
@@ -26,7 +26,7 @@ rg -Fq 'FloatingWindow {' "$gallery" \
|| fail 'gallery must be a normal tiled application window'
if rg -q '#[0-9a-fA-F]{3,8}' "$gallery"; then
fail 'gallery hardcodes a colour instead of using the Theme vocabulary'
fail 'gallery hardcodes a color instead of using the Theme vocabulary'
fi
if rg -q 'loops:[[:space:]]*(Animation\.Infinite|-1)|running:[[:space:]]*true' "$gallery"; then
fail 'gallery contains an always-running animation'
+2 -2
View File
@@ -63,7 +63,7 @@ restore_result="$(run restore "$name")" || fail 'restore failed'
[[ "$(jq -r .windowRounding "$settings")" == "6" ]] || fail 'restore lost a key'
[[ "$(jq -r '.displays["DP-2"].scale' "$settings")" == "1.5" ]] \
|| fail 'restore bypassed display confirmation by applying snapshot geometry'
[[ "$(jq -r '.favorites[0].id' "$home")" == "light.desk" ]] || fail 'restore did not bring back Home favourites'
[[ "$(jq -r '.favorites[0].id' "$home")" == "light.desk" ]] || fail 'restore did not bring back Home favorites'
[[ "$(jq -r '.favorites[0].alias' "$home")" == "Desk" ]] || fail 'restore lost a Home alias'
jq -e '.home.present == true and .home.data.favorites[0].id == "light.desk"' <<<"$restore_result" >/dev/null \
|| fail 'restore did not return Home state for the live service to reload'
@@ -169,7 +169,7 @@ jq -n '{
]
}}
}' >"$backups/$invalid_home"
run restore "$invalid_home" >/dev/null 2>&1 && fail 'a snapshot with duplicate Home favourites was restored'
run restore "$invalid_home" >/dev/null 2>&1 && fail 'a snapshot with duplicate Home favorites was restored'
[[ "$(jq -r .gapsOut "$settings")" == "91" ]] || fail 'an invalid Home snapshot still damaged desktop settings'
printf '{ truncated' >"$home"
@@ -28,7 +28,7 @@ cleanup() {
trap cleanup EXIT
# The production command boundary must remain argv-only.
rg -Fq 'actionRun.exec([root.helperPath, "save", root.serialiseHomeState()]);' "$service" \
rg -Fq 'actionRun.exec([root.helperPath, "save", root.serializeHomeState()]);' "$service" \
|| fail 'save does not pass live Home state as one argument'
rg -Fq 'actionRun.exec([root.helperPath, "restore", name]);' "$service" \
|| fail 'restore is not executed through an argument array'
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Two behaviours the settings rows depend on:
# Two behaviors the settings rows depend on:
#
# commitPreference(key, value)
# One entry point for every row. A compositor-backed key must reach Hyprland
@@ -11,7 +11,7 @@
#
# restoreDefaults()
# Panama keeps user state in more than one file. Resetting only the schema
# store would leave a customised Home accessory arrangement in place while
# store would leave a customized Home accessory arrangement in place while
# claiming to have restored Panama's defaults. That is worse than having no
# reset at all, because it is silent.
@@ -168,7 +168,7 @@ done
home_after="$(qs_for_harness ipc call settings-system-test homeState)"
jq -e '.count == 0 and .initialized == false' <<<"$home_after" >/dev/null \
|| fail "reset left the Home accessory store customised: $home_after"
|| fail "reset left the Home accessory store customized: $home_after"
# Resetting a stored value does not itself apply compositor policy, so the last
# isolated batch must contain the shipped default.
@@ -196,7 +196,7 @@ opacity=$(hyprctl -j getoption decoration:inactive_opacity | jq -r .float), \
writer-reported error=\"$(qs_for_harness ipc call settings-system-test status | jq -r .lastError)\""
fi
# Verification must recognise those shapes as success, not report them rejected.
# Verification must recognize those shapes as success, not report them rejected.
last_error="$(qs_for_harness ipc call settings-system-test status | jq -r .lastError)"
if [[ -n "$last_error" ]]; then
fail "a verified typed write was reported as failed: $last_error"
@@ -139,14 +139,14 @@ if not start or not end:
# Written as a Lua TABLE, not a string: the string form of a Hyprland gradient
# carries only one stop, so writing it that way is accepted and silently
# keeps whatever the previous accent left behind. Built through the same
# serialiseValue() SystemSettings.qml uses for every other gradient, rather
# serializeValue() SystemSettings.qml uses for every other gradient, rather
# than a second hand-rolled (and unescaped) copy of that table syntax here.
if 'SystemSettings.serialiseValue({' not in without_comments:
raise SystemExit("ColorScheme does not build the focused border through the shared gradient serialiser")
if 'SystemSettings.serializeValue({' not in without_comments:
raise SystemExit("ColorScheme does not build the focused border through the shared gradient serializer")
if 'colors: [root.accentBorderStart, root.accentBorderEnd]' not in without_comments:
raise SystemExit("ColorScheme does not derive the focused-border gradient from the chosen accent")
if 'active_border = ${activeBorder}' not in without_comments:
raise SystemExit("ColorScheme does not write the focused border as the serialised gradient table")
raise SystemExit("ColorScheme does not write the focused border as the serialized gradient table")
if 'inactive_border = "${root.inactiveBorder}"' not in scheme:
raise SystemExit("ColorScheme does not apply its effective inactive role")