Skip to content

Commit

Permalink
Sync core to 7f50504 (#751)
Browse files Browse the repository at this point in the history
* Sync core to 7f50504

* use hacs localizeFunc
  • Loading branch information
ludeeus committed Jul 5, 2024
1 parent cbe4ad9 commit c4b88ae
Show file tree
Hide file tree
Showing 8 changed files with 158 additions and 115 deletions.
2 changes: 1 addition & 1 deletion homeassistant-frontend
Submodule homeassistant-frontend updated 69 files
+1 −0 .devcontainer/devcontainer.json
+3 −0 build-scripts/env.cjs
+4 −4 build-scripts/gulp/translations.js
+5 −1 build-scripts/gulp/webpack.js
+12 −5 build-scripts/webpack.cjs
+0 −12 cast/src/html/faq.html.template
+0 −6 cast/src/html/media.html.template
+0 −6 cast/src/html/receiver.html.template
+0 −1 cast/src/launcher/entrypoint.ts
+ demo/public/assets/sections/images/media_player_family_room.jpg
+66 −8 demo/src/configs/sections/entities.ts
+23 −36 demo/src/configs/sections/lovelace.ts
+1 −1 demo/src/entrypoint.ts
+0 −11 demo/src/html/index.html.template
+50 −0 demo/src/stubs/entities.ts
+13 −4 demo/src/stubs/lovelace.ts
+1 −0 demo/src/util/is_frontpage.ts
+0 −1 hassio/src/entrypoint.ts
+7 −7 package.json
+1 −1 pyproject.toml
+36 −3 src/components/data-table/dialog-data-table-settings.ts
+9 −2 src/components/data-table/ha-data-table.ts
+34 −21 src/components/ha-grid-size-picker.ts
+3 −1 src/components/ha-menu-item.ts
+25 −0 src/components/ha-menu.ts
+1 −1 src/dialogs/more-info/ha-more-info-dialog.ts
+7 −5 src/dialogs/more-info/ha-more-info-history.ts
+0 −1 src/entrypoints/authorize.ts
+0 −1 src/entrypoints/core.ts
+0 −1 src/entrypoints/custom-panel.ts
+0 −1 src/entrypoints/onboarding.ts
+2 −2 src/fake_data/demo_panels.ts
+71 −5 src/fake_data/entity.ts
+2 −0 src/fake_data/provide_hass.ts
+4 −4 src/layouts/hass-tabs-subpage-data-table.ts
+9 −3 src/panels/config/application_credentials/ha-config-application-credentials.ts
+0 −8 src/panels/config/automation/blueprint-automation-editor.ts
+61 −36 src/panels/config/automation/ha-automation-editor.ts
+41 −32 src/panels/config/automation/ha-automation-picker.ts
+0 −18 src/panels/config/automation/manual-automation-editor.ts
+6 −15 src/panels/config/blueprint/blueprint-generic-editor.ts
+212 −250 src/panels/config/devices/ha-config-device-page.ts
+0 −9 src/panels/config/script/blueprint-script-editor.ts
+61 −39 src/panels/config/script/ha-script-editor.ts
+0 −18 src/panels/config/script/manual-script-editor.ts
+4 −3 src/panels/config/tags/ha-config-tags.ts
+7 −16 src/panels/logbook/ha-logbook.ts
+20 −6 src/panels/lovelace/cards/energy/hui-energy-date-selection-card.ts
+31 −6 src/panels/lovelace/cards/hui-area-card.ts
+9 −2 src/panels/lovelace/cards/hui-button-card.ts
+8 −2 src/panels/lovelace/cards/hui-card.ts
+14 −1 src/panels/lovelace/cards/hui-entity-card.ts
+23 −1 src/panels/lovelace/cards/hui-humidifier-card.ts
+30 −16 src/panels/lovelace/cards/hui-iframe-card.ts
+16 −2 src/panels/lovelace/cards/hui-map-card.ts
+2 −0 src/panels/lovelace/cards/hui-sensor-card.ts
+13 −3 src/panels/lovelace/cards/hui-statistic-card.ts
+23 −1 src/panels/lovelace/cards/hui-thermostat-card.ts
+13 −7 src/panels/lovelace/cards/hui-tile-card.ts
+25 −1 src/panels/lovelace/cards/hui-weather-forecast-card.ts
+16 −10 src/panels/lovelace/editor/card-editor/ha-grid-layout-slider.ts
+21 −15 src/panels/lovelace/editor/card-editor/hui-card-layout-editor.ts
+40 −8 src/panels/lovelace/sections/hui-grid-section.ts
+6 −1 src/panels/lovelace/types.ts
+0 −17 src/resources/safari-14-attachshadow-patch.ts
+22 −13 src/translations/en.json
+9 −8 src/util/audio-recorder.ts
+1 −1 src/util/recorder-worklet.js
+91 −89 yarn.lock
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@babel/preset-typescript": "7.24.7",
"@bundle-stats/plugin-webpack-filter": "4.13.3",
"@koa/cors": "5.0.0",
"@lokalise/node-api": "12.5.0",
"@lokalise/node-api": "12.6.0",
"@octokit/auth-oauth-device": "7.1.1",
"@octokit/plugin-retry": "7.1.1",
"@octokit/rest": "21.0.0",
Expand Down Expand Up @@ -52,8 +52,8 @@
"@types/tar": "6.1.13",
"@types/ua-parser-js": "0.7.39",
"@types/webspeechapi": "0.0.29",
"@typescript-eslint/eslint-plugin": "7.14.1",
"@typescript-eslint/parser": "7.14.1",
"@typescript-eslint/eslint-plugin": "7.15.0",
"@typescript-eslint/parser": "7.15.0",
"@web/dev-server": "0.1.38",
"@web/dev-server-rollup": "0.4.1",
"babel-loader": "9.1.3",
Expand All @@ -67,7 +67,7 @@
"eslint-import-resolver-webpack": "0.13.8",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-lit": "1.14.0",
"eslint-plugin-lit-a11y": "4.1.2",
"eslint-plugin-lit-a11y": "4.1.3",
"eslint-plugin-unused-imports": "4.0.0",
"eslint-plugin-wc": "2.1.0",
"fancy-log": "2.0.0",
Expand Down Expand Up @@ -104,7 +104,7 @@
"terser-webpack-plugin": "5.3.10",
"transform-async-modules-webpack-plugin": "1.1.1",
"ts-lit-plugin": "2.0.2",
"typescript": "5.5.2",
"typescript": "5.5.3",
"webpack": "5.92.1",
"webpack-cli": "5.1.4",
"webpack-dev-server": "5.0.4",
Expand All @@ -122,7 +122,7 @@
"@codemirror/legacy-modes": "6.4.0",
"@codemirror/search": "6.5.6",
"@codemirror/state": "6.4.1",
"@codemirror/view": "6.28.2",
"@codemirror/view": "6.28.3",
"@egjs/hammerjs": "2.0.17",
"@formatjs/intl-datetimeformat": "6.12.5",
"@formatjs/intl-displaynames": "6.6.8",
Expand Down Expand Up @@ -169,7 +169,7 @@
"@material/mwc-top-app-bar": "0.27.0",
"@material/mwc-top-app-bar-fixed": "0.27.0",
"@material/top-app-bar": "=14.0.0-canary.53b3cad2f.0",
"@material/web": "1.5.0",
"@material/web": "1.5.1",
"@mdi/js": "7.4.47",
"@mdi/svg": "7.4.47",
"@polymer/paper-item": "3.0.1",
Expand Down
1 change: 1 addition & 0 deletions script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ set -e
cd "$(dirname "$0")/.."

node ./script/merge_requirements.js
node ./script/inject_translations.js
yarn install
23 changes: 23 additions & 0 deletions script/inject_translations.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import fs from "fs";

let rawcore = fs.readFileSync("./homeassistant-frontend/src/translations/en.json");
let rawhacs = fs.readFileSync("./src/localize/languages/en.json");

const core = JSON.parse(rawcore);
const hacs = JSON.parse(rawhacs);

fs.writeFileSync(
"./src/localize/languages/en.json",
JSON.stringify(
{
...hacs,
ui: {
components: {
["subpage-data-table"]: core.ui.components["subpage-data-table"],
},
},
},
null,
2,
),
);
5 changes: 3 additions & 2 deletions src/dashboards/hacs-dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class HacsDashboard extends LitElement {
.data=${repositories}
.hass=${this.hass}
?iswide=${this.isWide}
.localizeFunc=${this.hass.localize}
.localizeFunc=${this.hacs.localize}
main-page
.narrow=${this.narrow}
.route=${this.route}
Expand Down Expand Up @@ -263,7 +263,7 @@ export class HacsDashboard extends LitElement {
): DataTableColumnContainer<RepositoryBase> => ({
icon: {
title: "",
label: this.hass.localize("ui.panel.config.lovelace.dashboards.picker.headers.icon"),
label: localizeFunc("column.icon"),
type: "icon",
hidden: false,
moveable: false,
Expand Down Expand Up @@ -378,6 +378,7 @@ export class HacsDashboard extends LitElement {
topics: defaultKeyData,
actions: {
title: "",
label: localizeFunc("column.actions"),
moveable: false,
hideable: false,
showNarrow: true,
Expand Down
12 changes: 7 additions & 5 deletions src/entrypoint.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
// Compat needs to be first import
import "../homeassistant-frontend/src/resources/compatibility";
import { setCancelSyntheticClickEvents } from "@polymer/polymer/lib/utils/settings";
import "../homeassistant-frontend/src/resources/roboto";
import "../homeassistant-frontend/src/resources/ha-style";
import "../homeassistant-frontend/src/resources/safari-14-attachshadow-patch";

import "./main";

setCancelSyntheticClickEvents(false);
import("../homeassistant-frontend/src/resources/roboto");
import("../homeassistant-frontend/src/resources/ha-style");

import("@polymer/polymer/lib/utils/settings").then(({ setCancelSyntheticClickEvents }) =>
setCancelSyntheticClickEvents(false),
);

const styleEl = document.createElement("style");
styleEl.innerHTML = `
Expand Down
25 changes: 25 additions & 0 deletions src/localize/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
"no_data": "No repositories matching search and filters"
},
"column": {
"actions": "Quick actions",
"name": "Repository name",
"downloads": "Downloads",
"stars": "Stars",
"icon": "Icon",
"installed_version": "Downloaded version",
"available_version": "Available version",
"status": "Status",
Expand Down Expand Up @@ -130,5 +132,28 @@
"message": "The {name} integration is configured or ignored. You need to delete the configuration for it before removing it from HACS.",
"confirm": "Go to integrations"
}
},
"ui": {
"components": {
"subpage-data-table": {
"filters": "Filters",
"show_results": "show {number} results",
"clear_filter": "Clear filter",
"close_filter": "Close filters",
"exit_selection_mode": "Exit selection mode",
"enter_selection_mode": "Enter selection mode",
"sort_by": "Sort by {sortColumn}",
"group_by": "Group by {groupColumn}",
"dont_group_by": "Don't group",
"collapse_all_groups": "Collapse all",
"expand_all_groups": "Expand all",
"select": "Select",
"selected": "Selected {selected}",
"close_select_mode": "Close selection mode",
"select_all": "Select all",
"select_none": "Select none",
"settings": "Customize table"
}
}
}
}
Loading

0 comments on commit c4b88ae

Please sign in to comment.