Skip to content

Commit

Permalink
Merge branch 'main' of github.com:hacs/frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Nov 28, 2021
2 parents 40d23e0 + 970dc1c commit 1ac92cb
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 171 deletions.
2 changes: 1 addition & 1 deletion src/components/dialogs/hacs-about-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const showDialogAbout = async (element: any, hacs: Hacs) =>
--|--
**${hacs.localize("dialog_about.frontend_version")}:** | ${version}
**${hacs.localize("common.repositories")}:** | ${hacs.repositories.length}
**${hacs.localize("dialog_about.installed_repositories")}:** | ${
**${hacs.localize("dialog_about.downloaded_repositories")}:** | ${
hacs.repositories.filter((repo) => repo.installed).length
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/dialogs/hacs-add-repository-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class HacsAddRepositoryDialog extends HacsDialogBase {
${SORT_BY.map(
(value) =>
html`<mwc-list-item .value=${value}>
${this.hacs.localize(`store.${value}`)}
${this.hacs.localize(`dialog_add_repo.sort_by_values.${value}`) || value}
</mwc-list-item>`
)}
</mwc-select>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import "../hacs-link";
import "./hacs-dialog";
import { HacsDialogBase } from "./hacs-dialog-base";

@customElement("hacs-install-dialog")
export class HacsInstallDialog extends HacsDialogBase {
@customElement("hacs-download-dialog")
export class HacsDonwloadDialog extends HacsDialogBase {
@property() public repository?: string;

@state() private _toggle = true;
Expand Down Expand Up @@ -136,8 +136,8 @@ export class HacsInstallDialog extends HacsDialogBase {
.schema=${donwloadRepositorySchema}
.computeLabel=${(schema: HaFormSchema) =>
schema.name === "beta"
? this.hacs.localize("dialog_install.show_beta")
: this.hacs.localize("dialog_install.select_version")}
? this.hacs.localize("dialog_download.show_beta")
: this.hacs.localize("dialog_download.select_version")}
@value-changed=${this._valueChanged}
>
</ha-form>
Expand All @@ -152,7 +152,7 @@ export class HacsInstallDialog extends HacsDialogBase {
</ha-alert>`
: ""}
<div class="note">
${this.hacs.localize(`repository.note_installed`)}
${this.hacs.localize(`repository.note_downloaded`)}
<code>'${installPath}'</code>
${this._repository.category === "plugin" && this.hacs.status.lovelace_mode !== "storage"
? html`
Expand All @@ -165,7 +165,7 @@ export class HacsInstallDialog extends HacsDialogBase {
`
: ""}
${this._repository.category === "integration"
? html`<p>${this.hacs.localize("dialog_install.restart")}</p>`
? html`<p>${this.hacs.localize("dialog_download.restart")}</p>`
: ""}
</div>
${this._error?.message
Expand Down
2 changes: 1 addition & 1 deletion src/components/dialogs/hacs-event-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const DIALOG = {
"add-repository": () => import("./hacs-add-repository-dialog"),
"custom-repositories": () => import("./hacs-custom-repositories-dialog"),
generic: () => import("./hacs-generic-dialog"),
install: () => import("./hacs-install-dialog"),
download: () => import("./hacs-download-dialog"),
navigate: () => import("./hacs-navigate-dialog"),
removed: () => import("./hacs-removed-dialog"),
update: () => import("./hacs-update-dialog"),
Expand Down
2 changes: 1 addition & 1 deletion src/components/dialogs/hacs-progress-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class HacsProgressDialog extends HacsDialogBase {
${
this._inProgress
? html`<ha-circular-progress active size="small"></ha-circular-progress>`
: this.confirmText || this.hacs.localize("confirm.yes")
: this.confirmText || this.hacs.localize("common.yes")
}</mwc-button
>
</mwc-button>
Expand Down
4 changes: 2 additions & 2 deletions src/components/dialogs/hacs-repository-info-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export class HacsRepositoryDialog extends HacsDialogBase {
${!this._repository.installed && this._repository.updated_info
? html`
<mwc-button slot="primaryaction" @click=${this._installRepository}>
${this.hacs.localize("dialog_info.install")}
${this.hacs.localize("dialog_info.download")}
</mwc-button>
<hacs-link
slot="secondaryaction"
Expand Down Expand Up @@ -180,7 +180,7 @@ export class HacsRepositoryDialog extends HacsDialogBase {
this.dispatchEvent(
new CustomEvent("hacs-dialog-secondary", {
detail: {
type: "install",
type: "download",
repository: this._repository!.id,
},
bubbles: true,
Expand Down
4 changes: 2 additions & 2 deletions src/components/dialogs/hacs-update-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class HacsUpdateDialog extends HacsDialogBase {
<div class="version-element">
<span class="version-number">${repository.installed_version}</span>
<small class="version-text">${this.hacs.localize(
"dialog_update.installed_version"
"dialog_update.downloaded_version"
)}</small>
</div>
Expand Down Expand Up @@ -130,7 +130,7 @@ export class HacsUpdateDialog extends HacsDialogBase {
}
${
repository.category === "integration"
? html`<p>${this.hacs.localize("dialog_install.restart")}</p>`
? html`<p>${this.hacs.localize("dialog_download.restart")}</p>`
: ""
}
${
Expand Down
2 changes: 1 addition & 1 deletion src/components/hacs-repository-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export class HacsRepositoryCard extends LitElement {
this.dispatchEvent(
new CustomEvent("hacs-dialog", {
detail: {
type: "install",
type: "download",
repository: this.repository.id,
},
bubbles: true,
Expand Down
176 changes: 22 additions & 154 deletions src/localize/languages/en.json
Original file line number Diff line number Diff line change
@@ -1,116 +1,28 @@
{
"common": {
"about": "About",
"add": "add",
"appdaemon_apps": "AppDaemon Apps",
"appdaemon_plural": "AppDaemon Apps",
"appdaemon": "AppDaemon",
"background_task": "Background task running, this page will reload when it's done.",
"cancel": "Cancel",
"close": "Close",
"check_log_file": "Check your log file for more details.",
"continue": "Continue",
"disabled": "Disabled",
"documentation": "Documentation",
"element": "element",
"hacs_is_disabled": "HACS is disabled",
"ignore": "Ignore",
"install": "Install",
"installed": "installed",
"download": "Download",
"downloaded": "downloaded",
"ignore": "Ignore",
"integration_plural": "Integrations",
"integration": "Integration",
"integrations": "Integrations",
"lovelace_element": "Lovelace element",
"lovelace_elements": "Lovelace elements",
"lovelace": "Lovelace",
"manage": "manage",
"navigate": "navigate",
"netdaemon_apps": "NetDaemon Apps",
"netdaemon_plural": "NetDaemon Apps",
"netdaemon": "NetDaemon",
"plugin_plural": "Lovelace elements",
"plugin": "Lovelace",
"plugins": "Lovelace elements",
"python_script_plural": "Python Scripts",
"python_script": "Python Script",
"python_scripts": "Python Scripts",
"reload": "Reload",
"remove": "Remove",
"repositories": "Repositories",
"repository": "Repository",
"settings": "settings",
"theme_plural": "Themes",
"theme": "Theme",
"themes": "Themes",
"uninstall": "Uninstall",
"update": "Update",
"version": "Version"
},
"confirm": {
"add_to_lovelace": "Are you sure you want to add this to your Lovelace resources?",
"bg_task": "Action is disabled while background tasks is running.",
"cancel": "Cancel",
"continue": "Are you sure you want to continue?",
"delete_installed": "'{item}' is downloaded, you need to remove it before you can delete it.",
"delete": "Are you sure you want to delete '{item}'?",
"exist": "{item} already exists",
"generic": "Are you sure?",
"home_assistant_is_restarting": "Hold on, Home Assistant is now restarting.",
"home_assistant_version_not_correct": "You are running Home Assistant version '{haversion}', but this repository requires minimum version '{minversion}' to be installed.",
"no_upgrades": "No upgrades pending",
"no": "No",
"ok": "OK",
"overwrite": "Doing this will overwrite it.",
"reload_data": "This reloads the data of all repositories HACS knows about, this will take some time to finish.",
"restart_home_assistant": "Are you sure you want to restart Home Assistant?",
"uninstall": "Are you sure you want to remove '{item}'?",
"upgrade_all": "This will upgrade all of these repositories, make sure that you have read the release notes for all of them before proceeding.",
"yes": "Yes"
},
"repository": {
"add_to_lovelace": "Add to Lovelace",
"authors": "Authors",
"available": "Available",
"back_to": "Back to",
"changelog": "Change log",
"downloads": "Downloads",
"flag_this": "Flag this",
"frontend_version": "Frontend version",
"github_stars": "GitHub stars",
"goto_integrations": "Go to integrations",
"hide_beta": "Hide beta",
"hide": "Hide",
"install": "Install",
"installed": "Installed",
"lovelace_copy_example": "Copy the example to your clipboard",
"lovelace_instruction": "When you add this to your lovelace configuration use this",
"lovelace_no_js_type": "Could not determine the type of this element, check the repository.",
"newest": "newest",
"note_appdaemon": "you still need to add it to your 'apps.yaml' file",
"note_installed": "When downloaded, this will be located in",
"note_integration": "you still need to add it to your 'configuration.yaml' file",
"note_plugin": "you still need to add it to your lovelace configuration ('ui-lovelace.yaml' or the raw UI config editor)",
"note_plugin_post_107": "you still need to add it to your lovelace configuration ('configuration.yaml' or the resource editor '/config/lovelace/resources')",
"open_issue": "Open issue",
"open_plugin": "Open element",
"reinstall": "Reinstall",
"repository": "Repository",
"restart_home_assistant": "Restart Home Assistant",
"show_beta": "Show beta",
"uninstall": "Uninstall",
"update_information": "Update information",
"upgrade": "Update"
},
"repository_banner": {
"config_flow": "This integration supports config_flow, that means that you now can go to the integration section of your UI to configure it.",
"no_restart_required": "No restart required",
"not_loaded": "Not loaded",
"plugin_not_loaded": "This element is not added to your Lovelace resources.",
"restart_pending": "Restart pending",
"config_flow_title": "UI Configuration supported",
"restart": "You need to restart Home Assistant."
"confirm": {
"home_assistant_version_not_correct": "You are running Home Assistant version '{haversion}', but this repository requires minimum version '{minversion}' to be installed."
},
"sections": {
"integrations": {
Expand All @@ -133,75 +45,32 @@
"title": "About",
"description": "Show information about HACS"
},
"pending_repository_upgrade": "You are running version {installed}, version {available} is available"
},
"settings": {
"add_custom_repository": "ADD CUSTOM REPOSITORY",
"adding_new_repo_category": "With category '{category}'.",
"adding_new_repo": "Adding new repository '{repo}'",
"bg_task_custom": "Custom repositories are hidden while background tasks is running.",
"category": "Category",
"compact_mode": "Compact mode",
"custom_repositories": "CUSTOM REPOSITORIES",
"delete": "Delete",
"display": "Display",
"grid": "Grid",
"hacs_repo": "HACS repo",
"hidden_repositories": "hidden repositories",
"missing_category": "You need to select a category",
"open_repository": "Open repository",
"reload_data": "Reload data",
"repository_configuration": "Repository configuration",
"save": "Save",
"table_view": "Table view",
"table": "Table",
"unhide": "unhide",
"upgrade_all": "Upgrade all"
"pending_repository_upgrade": "You are running version {downloaded}, version {available} is available"
},
"store": {
"add": "Explore & download repositories",
"ascending": "ascending",
"clear_new": "Clear all new repositories",
"descending": "descending",
"last_updated": "Last updated",
"name": "Name",
"explore": "Explore & download repositories",
"new_repositories_note": "There are some new repositories showing here",
"no_repositories": "No repositories",
"no_repositories_desc1": "It seems like you don't have any repositories downloaded in this section yet.",
"no_repositories_desc2": "Click on the + in the bottom corner to add your first!",
"no_repositories_found_desc1": "No downloaded repositories matching \"{searchInput}\" found in this section.",
"no_repositories_found_desc2": "Try searching for something else!",
"new_repositories": "New Repositories",
"pending_upgrades": "Pending upgrades",
"placeholder_search": "Please enter a search term...",
"sort": "sort",
"stars": "Stars",
"status": "Status"
},
"time": {
"one_day_ago": "one day ago",
"one_hour_ago": "one hour ago",
"one_minute_ago": "one minute ago",
"one_month_ago": "one month ago",
"one_second_ago": "one second ago",
"one_year_ago": "one year ago",
"x_days_ago": "{x} days ago",
"x_hours_ago": "{x} hours ago",
"x_minutes_ago": "{x} minutes ago",
"x_months_ago": "{x} months ago",
"x_seconds_ago": "{x} seconds ago",
"x_years_ago": "{x} years ago"
"no_repositories_found_desc2": "Try searching for something else!"
},
"dialog_about": {
"integration_version": "Integration version",
"frontend_version": "Frontend version",
"installed_repositories": "Downloaded repositories",
"downloaded_repositories": "Downloaded repositories",
"useful_links": "Useful links"
},
"dialog_add_repo": {
"title": "Add repository",
"no_match": "No repositories found matching your filter",
"sort_by": "Sort by"
"sort_by": "Sort by",
"sort_by_values": {
"stars": "Stars",
"last_updated": "Last updated",
"name": "Name"
}
},
"dialog_removed": {
"name": "Repository name",
Expand All @@ -216,7 +85,7 @@
"no_repository": "Missing repository",
"no_category": "Missing category"
},
"dialog_install": {
"dialog_download": {
"type": "Type",
"url": "URL",
"select_version": "Select version",
Expand All @@ -231,29 +100,28 @@
"author": "Author",
"no_info": "The developer has not provided any more information for this repository",
"open_repo": "Open repository",
"install": "Download this repository with HACS"
"download": "Download this repository with HACS"
},
"dialog_update": {
"title": "Update pending",
"installed_version": "Downloaded version",
"downloaded_version": "Downloaded version",
"available_version": "Available version",
"changelog": "Changelog",
"releasenotes": "Release notes for {release}",
"message": "A new version of the {name} is available",
"no_info": "The author has not provided any information for this release"
},
"repository_card": {
"pending_update": "Pending update",
"pending_restart": "Pending restart",
"not_loaded": "Not loaded",
"new_repository": "New repository",
"hide": "Hide",
"dismiss": "dismiss",
"open_source": "Open source",
"information": "Information",
"new_repository": "New repository",
"not_loaded": "Not loaded",
"open_issue": "Open issue",
"open_source": "Open source",
"pending_restart": "Pending restart",
"pending_update": "Pending update",
"redownload": "Redownload",
"report": "Request for removal",
"information": "Information",
"update_information": "Update information"
},
"search": {
Expand Down
2 changes: 1 addition & 1 deletion src/panels/hacs-entry-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export class HacsEntryPanel extends LitElement {
html`
<ha-alert .title=${repository.name} .rtl=${computeRTL(this.hass)}>
${this.hacs.localize("sections.pending_repository_upgrade", {
installed: repository.installed_version,
downloaded: repository.installed_version,
available: repository.available_version,
})}
<mwc-button
Expand Down
2 changes: 1 addition & 1 deletion src/panels/hacs-store-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export class HacsStorePanel extends LitElement {
</div>
<ha-fab
slot="fab"
.label=${this.hacs.localize("store.add")}
.label=${this.hacs.localize("store.explore")}
.extended=${!this.narrow}
@click=${this._addRepository}
>
Expand Down

0 comments on commit 1ac92cb

Please sign in to comment.