From 2ec0df25d8390e085ea7d5b390176a8cded6509c Mon Sep 17 00:00:00 2001 From: ludeeus Date: Mon, 27 May 2024 10:06:42 +0000 Subject: [PATCH] Use "Dashboard" for the "plugin" category --- .../hacs-custom-repositories-dialog.ts | 2 +- src/dashboards/hacs-dashboard.ts | 6 +++--- src/localize/languages/en.json | 20 +++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/components/dialogs/hacs-custom-repositories-dialog.ts b/src/components/dialogs/hacs-custom-repositories-dialog.ts index cc9b425a..a997d490 100644 --- a/src/components/dialogs/hacs-custom-repositories-dialog.ts +++ b/src/components/dialogs/hacs-custom-repositories-dialog.ts @@ -116,7 +116,7 @@ export class HacsCustomRepositoriesDialog extends LitElement { mode: "dropdown", options: this._dialogParams.hacs.info.categories.map((category) => ({ value: category, - label: this._dialogParams!.hacs.localize(`common.${category}`), + label: this._dialogParams!.hacs.localize(`type.${category}`), })), }, }, diff --git a/src/dashboards/hacs-dashboard.ts b/src/dashboards/hacs-dashboard.ts index 7cfb3ecf..7853341f 100644 --- a/src/dashboards/hacs-dashboard.ts +++ b/src/dashboards/hacs-dashboard.ts @@ -268,7 +268,7 @@ export class HacsDashboard extends LitElement { ...repository, translated_status: localizeFunc(`repository_status.${repository.status}`) || repository.status, - translated_category: localizeFunc(`common.${repository.category}`), + translated_category: localizeFunc(`type.${repository.category}`), })), ); @@ -330,7 +330,7 @@ export class HacsDashboard extends LitElement { : ""} ${repository.name}
- ${narrow ? localizeFunc(`common.${repository.category}`) : repository.description} + ${narrow ? localizeFunc(`type.${repository.category}`) : repository.description}
`, }, @@ -465,7 +465,7 @@ export class HacsDashboard extends LitElement { options: types.map((type) => ({ label: localizeFunc( // @ts-ignore - `common.${type}`, + `type.${type}`, ), value: `type_${type}`, })), diff --git a/src/localize/languages/en.json b/src/localize/languages/en.json index 26cc00ad..68657f1a 100644 --- a/src/localize/languages/en.json +++ b/src/localize/languages/en.json @@ -1,29 +1,20 @@ { "common": { "add": "add", - "appdaemon": "AppDaemon", "cancel": "Cancel", "close": "Close", "download": "Download", "downloaded": "Downloaded", "ignore": "Ignore", - "integration_plural": "Integrations", - "integration": "Integration", "learn_more": "Learn more", - "lovelace": "Lovelace", "navigate": "Navigate", - "netdaemon": "NetDaemon", "new": "New", - "plugin": "Lovelace", - "python_script": "Python Script", "reload": "Reload", "remove": "Remove", "repositories": "Repositories", "repository": "Repository", "save": "Save", "show": "Show", - "theme": "Theme", - "template": "Template", "update": "Update", "updates": "Updates", "yes": "Yes" @@ -144,6 +135,15 @@ "dismiss": "Dismiss new repositories", "documentation": "Documentation" }, + "type": { + "integration": "Integration", + "plugin": "Dashboard", + "theme": "Theme", + "python_script": "Python Script", + "appdaemon": "AppDaemon", + "netdaemon": "NetDaemon", + "template": "Template" + }, "dialog": { "reload": { "description": "You need to reload your browser for the updated resources to be used.", @@ -159,4 +159,4 @@ "confirm": "Go to integrations" } } -} +} \ No newline at end of file