pkg: Fix typos discovered by codespell

This commit is contained in:
Jelle van der Waa 2026-08-05 12:09:06 +02:00 committed by Jelle van der Waa
parent 0972eec00c
commit 3834a50f25
9 changed files with 18 additions and 18 deletions

View file

@ -102,7 +102,7 @@ def element(xml, tag):
"""Get an XML element from the DOM tag
Retrieves the element with the matching language or by best effort
- If element has the selected language (or langauge selection is none), return it
- If element has the selected language (or language selection is none), return it
- If the selected language can't be found, use empty language as a fallback
- If no elements are found with empty language attribute, use first element found
"""

View file

@ -10,7 +10,7 @@ QUnit.test("simple read", async assert => {
assert.equal(await file.read(), "1234\n", "correct result");
});
QUnit.test("read non-existent", async assert => {
QUnit.test("read non-existant", async assert => {
assert.equal(await cockpit.file(dir + "/blah").read(), null, "correct result");
});

View file

@ -547,7 +547,7 @@ export class Dnf5DaemonManager implements PackageManager {
}
// Map the advisory type to the severity which PackageKit uses
// Critical == Security upate
// Critical == Security update
// Important == Bug fix
// Moderate == Enhancement
let severity = Severity.LOW;

View file

@ -2558,7 +2558,7 @@ function factory() {
/* Callbacks that want to stream or get headers */
let streamer = null;
let responsers = null;
let responders = null;
let resp = null;
@ -2573,9 +2573,9 @@ function factory() {
/* Anyone looking for response details? */
if (options.command == "response") {
resp = options;
if (responsers) {
if (responders) {
resp.headers = resp.headers || { };
invoke_functions(responsers, ret, [resp.status, resp.headers]);
invoke_functions(responders, ret, [resp.status, resp.headers]);
}
}
}
@ -2622,9 +2622,9 @@ function factory() {
return ret;
};
ret.response = function(callback) {
if (responsers === null)
responsers = [];
responsers.push(callback);
if (responders === null)
responders = [];
responders.push(callback);
return ret;
};
ret.input = function(message, stream) {

View file

@ -369,7 +369,7 @@
You should call this only from a action function passed to
"run_action" and you need to take care to reset this via
"dlg.set_cancel(null)" once the cancel function should no longer be
called. When a action funtion finishes or throws an error from
called. When a action function finishes or throws an error from
within "dlg.run_action", the cancel function is automatically
reset.
@ -438,7 +438,7 @@
minimum storage requirements of the OS. Sometimes you can do
everything at render time, but sometimes you might want to run some
code as part of the event handler for the user action, and
sometimes you need to run asynchornous code.
sometimes you need to run asynchronous code.
(Don't use useEffect, please, just stick the code into the event
handler.)
@ -654,7 +654,7 @@ function toSpliced<T>(arr: T[], start: number, deleteCount: number, ...rest: T[]
dlg.field("combo").validate(v => {
return {
size: true, // TypeScript error here as expected, because true is not a string
unt: "No such unit", // Want a TypeScript error here bc there is no "unt" in the type, but wont happen
unt: "No such unit", // Want a TypeScript error here bc there is no "unt" in the type, but won't happen
}
});
@ -1108,7 +1108,7 @@ export class DialogState<V> extends EventEmitter<DialogStateEvents> {
this._run_all_debouncing_now();
// Wait for the tasks that are currently running. While
// waiting, new things might have been qeued up for
// waiting, new things might have been queued up for
// debouncing or new tasks might have been started, so we
// have to go back to the beginning.

View file

@ -69,7 +69,7 @@ $phone: 767px;
white-space: normal;
}
// Modals should accomodate content width, as languages can make elements (especially buttons) too long
// Modals should accommodate content width, as languages can make elements (especially buttons) too long
// https://github.com/patternfly/patternfly/issues/7440
.pf-v6-c-modal-box {
min-inline-size: min-content;

View file

@ -175,7 +175,7 @@ export function ip4_prefix_from_text(prefix_mask) {
// Shorten IPv6 address according to RFC 5952
// https://datatracker.ietf.org/doc/html/rfc5952#section-4
//
// NetworkManager already handles dropping of leadin zeros within a single 16 bit field
// NetworkManager already handles dropping of leading zeros within a single 16 bit field
// but does not replace the longest consecutive zeros fields with "::".
function ip6_shorten(ip6_addr) {
function find_longest_zero(match) {

View file

@ -110,7 +110,7 @@ export const SmartCard = ({ card, smart_info, drive_type }) => {
? `, ${100 - smart_info.SmartSelftestPercentRemaining}%`
: "");
const assesment = (
const assessment = (
<Flex spaceItems={{ default: 'spaceItemsXs' }}>
{ !smartOK &&
<Icon status="danger">
@ -140,7 +140,7 @@ export const SmartCard = ({ card, smart_info, drive_type }) => {
<CardBody>
<DescriptionList isHorizontal horizontalTermWidthModifier={{ default: '20ch' }}>
<StorageDescription title={_("Assessment")}>
{assesment}
{assessment}
</StorageDescription>
<StorageDescription title={_("Power on hours")}
value={cockpit.format(_("$0 hours"), powerOnHours)}

View file

@ -78,7 +78,7 @@ function get_expire(name) {
// 99999, and /etc/login.def also still uses 99999 as the
// default for new accounts.
//
// Passord expiration is being removed completely from
// Password expiration is being removed completely from
// shadow-utils, and we probably should continue to recognize
// 99999 as "never" until we stop supporting password expiry
// entirely.