Skip to content

Commit

Permalink
Spelling and grammar fixes (#23598)
Browse files Browse the repository at this point in the history
  • Loading branch information
scop authored Jan 6, 2025
1 parent 8be2ca5 commit 3d1817a
Show file tree
Hide file tree
Showing 36 changed files with 62 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
value: |
Make sure you are running the [latest version of Home Assistant][releases] before reporting an issue.
If you have a feature or enhancement request for the frontend, please [start an discussion][fr] instead of creating an issue.
If you have a feature or enhancement request for the frontend, please [start a discussion][fr] instead of creating an issue.
**Please do not report issues for custom cards.**
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ blank_issues_enabled: false
contact_links:
- name: Request a feature for the UI / Dashboards
url: https://github.com/home-assistant/frontend/discussions/category_choices
about: Request an new feature for the Home Assistant frontend.
about: Request a new feature for the Home Assistant frontend.
- name: Report a bug that is NOT related to the UI / Dashboards
url: https://github.com/home-assistant/core/issues
about: This is the issue tracker for our frontend. Please report other issues in the backend ("core") repository.
Expand Down
2 changes: 1 addition & 1 deletion cast/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Home Assistant Cast is made up of two separate applications:

### Setting dev variables

Open `src/cast/dev_const.ts` and change `CAST_DEV_APP_ID` to the ID of the app you just created. And set the `CAST_DEV_HASS_URL` to the url of you development machine.
Open `src/cast/dev_const.ts` and change `CAST_DEV_APP_ID` to the ID of the app you just created. And set the `CAST_DEV_HASS_URL` to the url of your development machine.

### Changing configuration

Expand Down
2 changes: 1 addition & 1 deletion cast/src/launcher/layout/hc-connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export class HcConnect extends LitElement {
this.loading = false;
return;
} finally {
// Clear url if we have a auth callback in url.
// Clear url if we have an auth callback in url.
if (location.search.includes("auth_callback=1")) {
history.replaceState(null, "", location.pathname);
}
Expand Down
2 changes: 1 addition & 1 deletion gallery/src/pages/Text/remove-delete-add-create.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ In most cases, Create can be paired with Delete, and Add can be paired with Remo

## Add

An already-exisiting item.
An already-existing item.

For example:

Expand Down
20 changes: 10 additions & 10 deletions gallery/src/pages/components/ha-alert.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ The alert offers four severity levels that set a distinctive icon and color.
</ha-alert>

<ha-alert alert-type="warning">
This is an warning alert — check it out!
This is a warning alert — check it out!
</ha-alert>

<ha-alert alert-type="info">
This is an info alert — check it out!
</ha-alert>

<ha-alert alert-type="success">
This is an success alert — check it out!
This is a success alert — check it out!
</ha-alert>

**Note:** This component is by <a href="https://mui.com/components/alert/" rel="noopener noreferrer" target="_blank">MUI</a> and is not documented in the <a href="https://material.io" rel="noopener noreferrer" target="_blank">Material Design guidelines</a>.
Expand Down Expand Up @@ -95,15 +95,15 @@ Actions must have a tab index of 0 so that they can be reached by keyboard-only
</ha-alert>

<ha-alert alert-type="warning">
This is an warning alert — check it out!
This is a warning alert — check it out!
</ha-alert>

<ha-alert alert-type="info">
This is an info alert — check it out!
</ha-alert>

<ha-alert alert-type="success">
This is an success alert — check it out!
This is a success alert — check it out!
</ha-alert>

```html
Expand All @@ -122,37 +122,37 @@ Actions must have a tab index of 0 so that they can be reached by keyboard-only
The `title ` option should not be used without a description.

<ha-alert alert-type="success" title="Success">
This is an success alert — check it out!
This is a success alert — check it out!
</ha-alert>

```html
<ha-alert alert-type="success" title="Success">
This is an success alert — check it out!
This is a success alert — check it out!
</ha-alert>
```

**Dismissable**

<ha-alert alert-type="success" dismissable>
This is an success alert — check it out!
This is a success alert — check it out!
</ha-alert>

```html
<ha-alert alert-type="success" dismissable>
This is an success alert — check it out!
This is a success alert — check it out!
</ha-alert>
```

**Slotted action**

<ha-alert alert-type="success">
This is an success alert — check it out!
This is a success alert — check it out!
<mwc-button slot="action" label="Undo"></mwc-button>
</ha-alert>

```html
<ha-alert alert-type="success">
This is an success alert — check it out!
This is a success alert — check it out!
<mwc-button slot="action" label="Undo"></mwc-button>
</ha-alert>
```
Expand Down
2 changes: 1 addition & 1 deletion gallery/src/pages/components/ha-faded.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class DemoHaFaded extends LitElement {
<ha-faded><span>${LONG_TEXT}</span></ha-faded>
<h3>No text</h3>
<ha-faded><span></span></ha-faded>
<h3>Smal text</h3>
<h3>Small text</h3>
<ha-faded><span>${SMALL_TEXT}</span></ha-faded>
<h3>Long text in markdown</h3>
<ha-faded>
Expand Down
2 changes: 1 addition & 1 deletion gallery/src/pages/components/ha-hs-color-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class DemoHaHsColorPicker extends LitElement {
@change=${this._saturationChanged}
>
</ha-slider>
<p>Color Brighness : ${this.brightness}</p>
<p>Color Brightness : ${this.brightness}</p>
<ha-slider
labeled
step="1"
Expand Down
2 changes: 1 addition & 1 deletion script/develop_and_serve
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ set -e

cd "$(dirname "$0")/.."

# parse input paramters
# parse input parameters
if [ -n "$DEVCONTAINER" ]; then
frontendPort=8123
else
Expand Down
6 changes: 3 additions & 3 deletions src/common/decorators/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ type ReactiveElementClassWithTransformers = typeof ReactiveElement & {
};

/**
* Specifies an tranformer callback that is run when the value of the decorated property, or any of the properties in the watching array, changes.
* The result of the tranformer is assigned to the decorated property.
* The tranformer receives the current as arguments.
* Specifies a transformer callback that is run when the value of the decorated property, or any of the properties in the watching array, changes.
* The result of the transformer is assigned to the decorated property.
* The transformer receives the current as argument.
*/
export const transform =
<T, V>(config: {
Expand Down
2 changes: 1 addition & 1 deletion src/common/entity/compute_attribute_display.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const computeAttributeValueDisplay = (
return formattedValue;
}

// Special handling in case this is a string with an known format
// Special handling in case this is a string with a known format
if (typeof attributeValue === "string") {
// Date handling
if (isDate(attributeValue, true)) {
Expand Down
2 changes: 1 addition & 1 deletion src/common/entity/get_states.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const FIXED_DOMAIN_ATTRIBUTE_STATES = {
"channel",
"channels",
"composer",
"contibuting_artist",
"contributing_artist",
"episode",
"game",
"genre",
Expand Down
2 changes: 1 addition & 1 deletion src/common/entity/state_color.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** Return an color representing a state. */
/** Return a color representing a state. */
import type { HassEntity } from "home-assistant-js-websocket";
import { UNAVAILABLE } from "../../data/entity";
import type { GroupEntity } from "../../data/group";
Expand Down
2 changes: 1 addition & 1 deletion src/common/string/filter/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ function _doScore(
// this would be the beginning of a new match (i.e. there would be a gap before this location)
score += isGapLocation ? 2 : 0;
} else {
// this is part of a contiguous match, so give it a slight bonus, but do so only if it would not be a prefered gap location
// this is part of a contiguous match, so give it a slight bonus, but do so only if it would not be a preferred gap location
score += isGapLocation ? 0 : 1;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/chart/sankey-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ export class SankeyChart extends LitElement {
} else {
totalSize = section.nodes.reduce((sum, b) => sum + b.size, 0);
}
// calc margin betwee boxes
// calc margin between boxes
const emptySpace = sectionSize - totalSize;
const spacerSize = emptySpace / (section.nodes.length - 1);

Expand Down
2 changes: 1 addition & 1 deletion src/components/ha-hls-player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ class HaHLSPlayer extends LitElement {
hls.on(Hls.Events.ERROR, (_event, data: any) => {
// Some errors are recovered automatically by the hls player itself, and the others handled
// in this function require special actions to recover. Errors retried in this function
// are done with backoff to not cause unecessary failures.
// are done with backoff to not cause unnecessary failures.
if (!data.fatal) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ha-icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class HaIcon extends LitElement {
return nothing;
}
if (this._legacy) {
return html`<!-- @ts-ignore we don't provice the iron-icon element -->
return html`<!-- @ts-ignore we don't provide the iron-icon element -->
<iron-icon .icon=${this.icon}></iron-icon>`;
}
return html`<ha-svg-icon
Expand Down
4 changes: 2 additions & 2 deletions src/components/ha-md-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import { css } from "lit";
import { customElement, property } from "lit/decorators";

// workaround to be able to overlay an dialog with another dialog
// workaround to be able to overlay a dialog with another dialog
MdDialog.addInitializer(async (instance) => {
await instance.updateComplete;

Expand Down Expand Up @@ -197,7 +197,7 @@ export class HaMdDialog extends MdDialog {
}

// by default the dialog open/close animation will be from/to the top
// but if we have a special mobile dialog which is at the bottom of the screen, an from bottom animation can be used:
// but if we have a special mobile dialog which is at the bottom of the screen, a from bottom animation can be used:
const OPEN_FROM_BOTTOM_ANIMATION: DialogAnimation = {
...DIALOG_DEFAULT_OPEN_ANIMATION,
dialog: [
Expand Down
4 changes: 2 additions & 2 deletions src/components/ha-sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ class HaSidebar extends SubscribeMixin(LitElement) {
this.hass.locale
);

// Show the supervisor as beeing part of configuration
// Show the supervisor as being part of configuration
const selectedPanel = this.route.path?.startsWith("/hassio/")
? "config"
: this.hass.panelUrl;
Expand Down Expand Up @@ -632,7 +632,7 @@ class HaSidebar extends SubscribeMixin(LitElement) {
return html`<a
class=${classMap({
profile: true,
// Mimick behavior that paper-listbox provides
// Mimic behavior that paper-listbox provides
"iron-selected": this.hass.panelUrl === "profile",
})}
href="/profile"
Expand Down
2 changes: 1 addition & 1 deletion src/data/energy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ const getEnergyData = async (
hass.config
) as boolean)
) {
// When comparing a month (or multiple), we want to start at the begining of the month
// When comparing a month (or multiple), we want to start at the beginning of the month
startCompare = calcDate(
start,
addMonths,
Expand Down
2 changes: 1 addition & 1 deletion src/data/logbook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface LogbookStreamMessage {
events: LogbookEntry[];
start_time?: number; // Start time of this historical chunk
end_time?: number; // End time of this historical chunk
partial?: boolean; // Indiciates more historical chunks are coming
partial?: boolean; // Indicates more historical chunks are coming
}

export interface LogbookEntry {
Expand Down
2 changes: 1 addition & 1 deletion src/data/zwave_js.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const enum InclusionStrategy {
*
* Issues a warning if Security S0 is not supported or the secure bootstrapping fails.
*
* **Not recommended** because S0 should be used sparingly and S2 preferred whereever possible.
* **Not recommended** because S0 should be used sparingly and S2 preferred wherever possible.
*/
Security_S0,
/**
Expand Down
4 changes: 2 additions & 2 deletions src/entrypoints/service-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const initRouting = () => {
// CORS must be forced to work for CSS images
fetchOptions: { mode: "cors", credentials: "omit" },
plugins: [
// Add 404 so we quicly respond to domains with missing images
// Add 404 so we quickly respond to domains with missing images
new CacheableResponsePlugin({ statuses: [0, 200, 404] }),
new ExpirationPlugin({
maxAgeSeconds: 60 * 60 * 24 * 30,
Expand Down Expand Up @@ -222,7 +222,7 @@ self.addEventListener("activate", () => {
// that didn't have a service worker loaded.
// Happens the first time they open the app without any
// service worker registered.
// This will serve code splitted bundles from SW.
// This will serve code split bundles from SW.
clients.claim();
});

Expand Down
2 changes: 1 addition & 1 deletion src/fake_data/demo_services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ export const demoServices: HassServices = {
example: "25",
},
target_temp_high: {
description: "New target high tempereature for HVAC.",
description: "New target high temperature for HVAC.",
example: "26",
},
target_temp_low: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class HaBackupConfigSchedule extends LitElement {
if (value !== RetentionPreset.CUSTOM) {
const data = this._getData(this.value);
const retention = RETENTION_PRESETS[value];
// Ensure we have at least 1 in defaut value because user can't select 0
// Ensure we have at least 1 in default value because user can't select 0
if (value !== RetentionPreset.FOREVER) {
retention.value = Math.max(retention.value, 1);
}
Expand Down
2 changes: 1 addition & 1 deletion src/panels/config/backup/dialogs/dialog-restore-backup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class DialogRestoreBackup extends LitElement implements HassDialog {
<p>
${this.hass.connected
? this._restoreState()
: "Restarting Home Asssistant"}
: "Restarting Home Assistant"}
</p>
</div>`;
}
Expand Down
2 changes: 1 addition & 1 deletion src/panels/config/integrations/dialog-add-integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ class AddIntegrationDialog extends LitElement {
if (integration.integrations) {
let domains = integration.domains || [];
if (integration.domain === "apple") {
// we show discoverd homekit devices in their own brand section, dont show them at apple
// we show discovered homekit devices in their own brand section, dont show them in apple
domains = domains.filter((domain) => domain !== "homekit_controller");
}
this._fetchFlowsInProgress(domains);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ class HaConfigIntegrationsDashboard extends SubscribeMixin(LitElement) {
}

if (integration?.supported_by) {
// Integration is a alias, so we can just create a flow
// Integration is an alias, so we can just create a flow
const localize = await this.hass.loadBackendTranslation(
"title",
domain,
Expand Down
4 changes: 2 additions & 2 deletions src/panels/lovelace/common/validate-condition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function checkStateCondition(
: UNAVAILABLE;
let value = condition.state ?? condition.state_not;

// Handle entity_id, UI should be updated for conditionnal card (filters does not have UI for now)
// Handle entity_id, UI should be updated for conditional card (filters does not have UI for now)
if (Array.isArray(value)) {
const entityValues = value
.map((v) => getValueFromEntityId(hass, v))
Expand Down Expand Up @@ -106,7 +106,7 @@ function checkStateNumericCondition(
let above = condition.above;
let below = condition.below;

// Handle entity_id, UI should be updated for conditionnal card (filters does not have UI for now)
// Handle entity_id, UI should be updated for conditional card (filters does not have UI for now)
if (typeof above === "string") {
above = getValueFromEntityId(hass, above) ?? above;
}
Expand Down
2 changes: 1 addition & 1 deletion src/panels/lovelace/create-element/create-element-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ const _lazyCreate = <T extends keyof CreateElementConfigTypes>(
// @ts-ignore
element.setConfig(config);
} catch (err: any) {
// We let it rebuild and the error wil be handled by _createElement
// We let it rebuild and the error will be handled by _createElement
fireEvent(element, "ll-rebuild");
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/panels/lovelace/elements/hui-service-button-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class HuiServiceButtonElement
}

if (!this._service) {
throw Error("Action does not have a action name");
throw Error("Action does not have an action name");
}

this._config = config;
Expand Down
2 changes: 1 addition & 1 deletion src/panels/lovelace/views/hui-masonry-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export class MasonryView extends LitElement implements LovelaceViewElement {
// An other create columns is started, abort this one
return;
}
// Calculate in wich column the card should go based on the size and the cards already in there
// Calculate in which column the card should go based on the size and the cards already in there
this._addCardToColumn(
columnElements[getColumnIndex(columnSizes, cardSize as number)],
index,
Expand Down
Loading

0 comments on commit 3d1817a

Please sign in to comment.