Summary
Several of netsuke's own identifiers, localization key constants, and Fluent
message IDs spell "canonicalise" with the British -ise ending. Per the project
convention, identifiers should use en-GB-oxendict (Oxford -ize) spelling unless
they reference an external API. These are internal names, so they should be
canonicalize.
The rest of the codebase already follows this — the cycle module, hasher, and
runner::process::paths all use canonicalize, and the external
std::fs::canonicalize call is (correctly) spelled -ize. The stdlib::which
and stdlib::path modules are the outliers.
This was surfaced while adding the typos spelling gate (#407): references to
canonicalise in the docs had to be wrapped in backticks precisely because they
name these real identifiers. Renaming the identifiers is the proper fix; the doc
backticks can then be removed.
Affected identifiers (internal — should become -ize)
Enum variants and helpers in the which resolver:
src/stdlib/which/resolve_error.rs: ResolveError::Canonicalise,
ResolveError::CanonicaliseNonUtf8, and their string discriminants
"canonicalise" / "canonicalise_non_utf8"
src/stdlib/which/lookup/mod.rs: pub(super) fn canonicalise(...) and its
call sites (lines 65, 96, 113, 234)
src/stdlib/which/mod.rs: fn canonicalise_message(...) and the match arms
over the renamed variants
Localization key constants in src/localization/keys.rs:
STDLIB_PATH_ACTION_CANONICALISE
STDLIB_WHICH_CANONICALISE_FAILED
STDLIB_WHICH_CANONICALISE_NON_UTF8
Fluent message IDs (the string values of those constants), which must be renamed
in lockstep across every locale or the build-time l10n audit
(build_l10n_audit.rs) will fail:
stdlib.path.action.canonicalise
stdlib.which.canonicalise_failed
stdlib.which.canonicalise_non_utf8
- Files:
locales/en-US/messages.ftl, locales/es-ES/messages.ftl
Tests and doc comments:
tests/std_filter_tests/which_filter_tests.rs: test name
which_filter_all_with_duplicates_deduplicates_canonicalised_paths
- Doc comments in
src/runner/process/paths.rs,
src/stdlib/which/lookup/mod.rs, and src/stdlib/path/path_utils.rs
- The context string
"canonicalise stdlib cache URL" in
tests/bdd/steps/stdlib/assertions.rs
Explicitly out of scope (keep as-is)
std::fs::canonicalize (src/stdlib/which/lookup/mod.rs:264) — external API,
already -ize.
Suggested acceptance criteria
Summary
Several of netsuke's own identifiers, localization key constants, and Fluent
message IDs spell "canonicalise" with the British
-iseending. Per the projectconvention, identifiers should use en-GB-oxendict (Oxford
-ize) spelling unlessthey reference an external API. These are internal names, so they should be
canonicalize.The rest of the codebase already follows this — the cycle module, hasher, and
runner::process::pathsall usecanonicalize, and the externalstd::fs::canonicalizecall is (correctly) spelled-ize. Thestdlib::whichand
stdlib::pathmodules are the outliers.This was surfaced while adding the
typosspelling gate (#407): references tocanonicalisein the docs had to be wrapped in backticks precisely because theyname these real identifiers. Renaming the identifiers is the proper fix; the doc
backticks can then be removed.
Affected identifiers (internal — should become
-ize)Enum variants and helpers in the
whichresolver:src/stdlib/which/resolve_error.rs:ResolveError::Canonicalise,ResolveError::CanonicaliseNonUtf8, and their string discriminants"canonicalise"/"canonicalise_non_utf8"src/stdlib/which/lookup/mod.rs:pub(super) fn canonicalise(...)and itscall sites (lines 65, 96, 113, 234)
src/stdlib/which/mod.rs:fn canonicalise_message(...)and the match armsover the renamed variants
Localization key constants in
src/localization/keys.rs:STDLIB_PATH_ACTION_CANONICALISESTDLIB_WHICH_CANONICALISE_FAILEDSTDLIB_WHICH_CANONICALISE_NON_UTF8Fluent message IDs (the string values of those constants), which must be renamed
in lockstep across every locale or the build-time l10n audit
(
build_l10n_audit.rs) will fail:stdlib.path.action.canonicalisestdlib.which.canonicalise_failedstdlib.which.canonicalise_non_utf8locales/en-US/messages.ftl,locales/es-ES/messages.ftlTests and doc comments:
tests/std_filter_tests/which_filter_tests.rs: test namewhich_filter_all_with_duplicates_deduplicates_canonicalised_pathssrc/runner/process/paths.rs,src/stdlib/which/lookup/mod.rs, andsrc/stdlib/path/path_utils.rs"canonicalise stdlib cache URL"intests/bdd/steps/stdlib/assertions.rsExplicitly out of scope (keep as-is)
std::fs::canonicalize(src/stdlib/which/lookup/mod.rs:264) — external API,already
-ize.Suggested acceptance criteria
canonicalise/Canonicaliseidentifiers renamed to theOxford
-izespelling.in lockstep across
keys.rs,locales/en-US/messages.ftl, andlocales/es-ES/messages.ftl, withmake test/ the build-time l10n auditgreen.
canonicalisethat were backticked in Enforce en-GB-oxendict spelling with typos #407 (forexample in
docs/execplans/3-14-4-command-available-non-throwing-executable-probe.md)updated to the new identifier where they name the code.
make check-fmt,make lint,make test, andmake markdownlintpass.