Extend .typos.toml to enforce american english (#7284)

More or less the same list we use at Rerun
This commit is contained in:
Emil Ernerfeldt 2025-07-01 15:54:00 +02:00 committed by GitHub
parent 737c61867b
commit 9d1dce51eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 134 additions and 6 deletions

View File

@ -18,5 +18,133 @@ teselation = "tessellation"
tessalation = "tessellation" tessalation = "tessellation"
tesselation = "tessellation" tesselation = "tessellation"
# Use the more common spelling
adaptor = "adapter"
adaptors = "adapters"
# For consistency we prefer American English:
aeroplane = "airplane"
analogue = "analog"
analyse = "analyze"
appetiser = "appetizer"
arbour = "arbor"
ardour = "arbor"
armour = "armor"
artefact = "artifact"
authorise = "authorize"
behaviour = "behavior"
behavioural = "behavioral"
British = "American"
calibre = "caliber"
# cancelled = "canceled" # winit uses this :(
candour = "candor"
capitalise = "capitalize"
catalogue = "catalog"
centre = "center"
characterise = "characterize"
chequerboard = "checkerboard"
chequered = "checkered"
civilise = "civilize"
clamour = "clamor"
colonise = "colonize"
colour = "color"
coloured = "colored"
cosy = "cozy"
criticise = "criticize"
defence = "defense"
demeanour = "demeanor"
dialogue = "dialog"
distil = "distill"
doughnut = "donut"
dramatise = "dramatize"
draught = "draft"
emphasise = "emphasize"
endeavour = "endeavor"
enrol = "enroll"
epilogue = "epilog"
equalise = "equalize"
favour = "favor"
favourite = "favorite"
fibre = "fiber"
flavour = "flavor"
fulfil = "fufill"
gaol = "jail"
grey = "gray"
greys = "grays"
greyscale = "grayscale"
harbour = "habor"
honour = "honor"
humour = "humor"
instalment = "installment"
instil = "instill"
jewellery = "jewelry"
kerb = "curb"
labour = "labor"
litre = "liter"
lustre = "luster"
meagre = "meager"
metre = "meter"
mobilise = "mobilize"
monologue = "monolog"
naturalise = "naturalize"
neighbour = "neighbor"
neighbourhood = "neighborhood"
normalise = "normalize"
normalised = "normalized"
odour = "odor"
offence = "offense"
organise = "organize"
parlour = "parlor"
plough = "plow"
popularise = "popularize"
pretence = "pretense"
programme = "program"
prologue = "prolog"
rancour = "rancor"
realise = "realize"
recognise = "recognize"
recognised = "recognized"
rigour = "rigor"
rumour = "rumor"
sabre = "saber"
satirise = "satirize"
saviour = "savior"
savour = "savor"
sceptical = "skeptical"
sceptre = "scepter"
sepulchre = "sepulcher"
serialisation = "serialization"
serialise = "serialize"
serialised = "serialized"
skilful = "skillful"
sombre = "somber"
specialisation = "specialization"
specialise = "specialize"
specialised = "specialized"
splendour = "splendor"
standardise = "standardize"
sulphur = "sulfur"
symbolise = "symbolize"
theatre = "theater"
tonne = "ton"
travelogue = "travelog"
tumour = "tumor"
valour = "valor"
vaporise = "vaporize"
vigour = "vigor"
# null-terminated is the name of the wikipedia article!
# https://en.wikipedia.org/wiki/Null-terminated_string
nullterminated = "null-terminated"
zeroterminated = "null-terminated"
zero-terminated = "null-terminated"
[files] [files]
extend-exclude = ["web_demo/egui_demo_app.js"] # auto-generated extend-exclude = ["web_demo/egui_demo_app.js"] # auto-generated
[default]
extend-ignore-re = [
"#\\[doc\\(alias = .*", # We suggest "grey" in some doc
]

View File

@ -36,7 +36,7 @@ There are snapshots test that might need to be updated.
Run the tests with `UPDATE_SNAPSHOTS=true cargo test --workspace --all-features` to update all of them. Run the tests with `UPDATE_SNAPSHOTS=true cargo test --workspace --all-features` to update all of them.
If CI keeps complaining about snapshots (which could happen if you don't use macOS, snapshots in CI are currently If CI keeps complaining about snapshots (which could happen if you don't use macOS, snapshots in CI are currently
rendered with macOS), you can instead run `./scripts/update_snapshots_from_ci.sh` to update your local snapshots from rendered with macOS), you can instead run `./scripts/update_snapshots_from_ci.sh` to update your local snapshots from
the last CI run of your PR (which will download the `test_results` artefact). the last CI run of your PR (which will download the `test_results` artifact).
For more info about the tests see [egui_kittest](./crates/egui_kittest/README.md). For more info about the tests see [egui_kittest](./crates/egui_kittest/README.md).
Snapshots and other big files are stored with git lfs. See [Working with git lfs](#working-with-git-lfs) for more info. Snapshots and other big files are stored with git lfs. See [Working with git lfs](#working-with-git-lfs) for more info.
If you see an `InvalidSignature` error when running snapshot tests, it's probably a problem related to git-lfs. If you see an `InvalidSignature` error when running snapshot tests, it's probably a problem related to git-lfs.

View File

@ -72,7 +72,7 @@ fn roaming_appdata() -> Option<PathBuf> {
}; };
let path = if result == S_OK { let path = if result == S_OK {
// SAFETY: SHGetKnownFolderPath indicated success and is supposed to allocate a nullterminated string for us. // SAFETY: SHGetKnownFolderPath indicated success and is supposed to allocate a null-terminated string for us.
let path_slice = unsafe { slice::from_raw_parts(path_raw, wcslen(path_raw)) }; let path_slice = unsafe { slice::from_raw_parts(path_raw, wcslen(path_raw)) };
Some(PathBuf::from(OsString::from_wide(path_slice))) Some(PathBuf::from(OsString::from_wide(path_slice)))
} else { } else {

View File

@ -438,7 +438,7 @@ impl ViewportBuilder {
} }
/// macOS: Set to `true` to allow the window to be moved by dragging the background. /// macOS: Set to `true` to allow the window to be moved by dragging the background.
/// Enabling this feature can result in unexpected behaviour with draggable UI widgets such as sliders. /// Enabling this feature can result in unexpected behavior with draggable UI widgets such as sliders.
#[inline] #[inline]
pub fn with_movable_by_background(mut self, value: bool) -> Self { pub fn with_movable_by_background(mut self, value: bool) -> Self {
self.movable_by_window_background = Some(value); self.movable_by_window_background = Some(value);

View File

@ -100,9 +100,9 @@ impl BytesLoader for FileLoader {
let entry = entry.get_mut(); let entry = entry.get_mut();
*entry = Poll::Ready(result); *entry = Poll::Ready(result);
ctx.request_repaint(); ctx.request_repaint();
log::trace!("finished loading {uri:?}"); log::trace!("Finished loading {uri:?}");
} else { } else {
log::trace!("cancelled loading {uri:?}\nNote: This can happen if `forget_image` is called while the image is still loading."); log::trace!("Canceled loading {uri:?}\nNote: This can happen if `forget_image` is called while the image is still loading.");
} }
} }
}) })

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# This script searches for the last CI run with your branch name, downloads the test_results artefact # This script searches for the last CI run with your branch name, downloads the test_results artifact
# and replaces your existing snapshots with the new ones. # and replaces your existing snapshots with the new ones.
# Make sure you have the gh cli installed and authenticated before running this script. # Make sure you have the gh cli installed and authenticated before running this script.
# If prompted to select a default repo, choose the emilk/egui one # If prompted to select a default repo, choose the emilk/egui one