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
41 lines
1.5 KiB
Bash
Executable File
41 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
repo_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
gallery="$repo_dir/config/dot/quickshell/prism-gallery.qml"
|
|
launcher="$repo_dir/config/dot/quickshell/scripts/panama-prism-gallery"
|
|
|
|
fail() {
|
|
printf 'Prism gallery contract: %s\n' "$1" >&2
|
|
exit 1
|
|
}
|
|
|
|
[[ -f "$gallery" ]] || fail 'the real-component gallery is missing'
|
|
[[ -x "$launcher" ]] || fail 'the gallery launcher is missing or not executable'
|
|
|
|
rg -Fq 'import qs.widgets' "$gallery" || fail 'gallery does not use the shared widget module'
|
|
for component in Pill Toggle ValueSlider ThemedIcon PrismEdge; do
|
|
rg -q "^[[:space:]]*${component}[[:space:]]*\\{" "$gallery" \
|
|
|| fail "gallery does not render the real ${component} component"
|
|
done
|
|
|
|
rg -Fq 'title: "Panama Prism Gallery"' "$gallery" \
|
|
|| fail 'gallery does not expose a stable compositor window title'
|
|
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 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'
|
|
fi
|
|
|
|
rg -Fq 'qs -p "$gallery" --daemonize' "$launcher" \
|
|
|| fail 'launcher does not start the isolated Quickshell gallery config'
|
|
rg -Fq 'qs -p "$gallery" kill' "$launcher" \
|
|
|| fail 'launcher cannot close an already-open gallery instance'
|
|
|
|
printf 'Prism gallery contract: PASS\n'
|