Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection of localization issues #22615

Merged
merged 11 commits into from
Nov 4, 2024
5 changes: 4 additions & 1 deletion hassio/src/addon-view/info/hassio-addon-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,10 @@ class HassioAddonInfo extends LitElement {
<div class="description light-color">
${this.addon.version
? html`
Current version: ${this.addon.version}
${this.supervisor.localize(
"addon.dashboard.current_version",
{ version: this.addon.version }
)}
<div class="changelog" @click=${this._openChangelog}>
(<span class="changelog-link"
>${this.supervisor.localize(
Expand Down
8 changes: 6 additions & 2 deletions src/panels/config/automation/ha-automation-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,12 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) {
private async _duplicate() {
const result = this._readOnly
? await showConfirmationDialog(this, {
title: "Migrate automation?",
text: "You can migrate this automation, so it can be edited from the UI. After it is migrated and you have saved it, you will have to manually delete your old automation from your configuration. Do you want to migrate this automation?",
title: this.hass.localize(
"ui.panel.config.automation.picker.migrate_automation"
),
text: this.hass.localize(
"ui.panel.config.automation.picker.migrate_automation_description"
),
})
: await this.confirmUnsavedChanged();
if (result) {
Expand Down
6 changes: 5 additions & 1 deletion src/panels/config/integrations/dialog-add-integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,14 +584,18 @@ class AddIntegrationDialog extends LitElement {
});
if (configEntries.length > 0) {
this.closeDialog();
const localize = await this.hass.loadBackendTranslation(
"title",
integration.name
);
showAlertDialog(this, {
title: this.hass.localize(
"ui.panel.config.integrations.config_flow.single_config_entry_title"
),
text: this.hass.localize(
"ui.panel.config.integrations.config_flow.single_config_entry",
{
integration_name: integration.name,
integration_name: domainToName(localize, integration.name),
}
),
});
Expand Down
6 changes: 5 additions & 1 deletion src/panels/config/integrations/ha-config-integration-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1387,14 +1387,18 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
this._extraConfigEntries || this.configEntries
);
if (entries.length > 0) {
const localize = await this.hass.loadBackendTranslation(
"title",
this._manifest.name
);
await showAlertDialog(this, {
title: this.hass.localize(
"ui.panel.config.integrations.config_flow.single_config_entry_title"
),
text: this.hass.localize(
"ui.panel.config.integrations.config_flow.single_config_entry",
{
integration_name: this._manifest.name,
integration_name: domainToName(localize, this._manifest.name),
}
),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -744,14 +744,18 @@ class HaConfigIntegrationsDashboard extends SubscribeMixin(LitElement) {
if (integration.single_config_entry) {
const configEntries = await getConfigEntries(this.hass, { domain });
if (configEntries.length > 0) {
const localize = await this.hass.loadBackendTranslation(
"title",
integration.name
);
showAlertDialog(this, {
title: this.hass.localize(
"ui.panel.config.integrations.config_flow.single_config_entry_title"
),
text: this.hass.localize(
"ui.panel.config.integrations.config_flow.single_config_entry",
{
integration_name: integration.name,
integration_name: domainToName(localize, integration.name!),
}
),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class MatterAddDeviceGoogleHome extends LitElement {
home_assistant: html`<b>Home Assistant</b>`,
}
)}
<br />
<span
class="link"
type="button"
Expand All @@ -57,13 +56,13 @@ class MatterAddDeviceGoogleHome extends LitElement {
)}
</span>
</li>
<li>
${this.hass.localize(
`ui.dialogs.matter-add-device.google_home.redirect`
)}
</li>
</ol>
<br />
<p>
${this.hass.localize(
`ui.dialogs.matter-add-device.google_home.redirect`
)}
</p>
</div>
`;
}
Expand Down
8 changes: 6 additions & 2 deletions src/panels/config/script/ha-script-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,12 @@ export class HaScriptEditor extends KeyboardShortcutMixin(LitElement) {
private async _duplicate() {
const result = this._readOnly
? await showConfirmationDialog(this, {
title: "Migrate script?",
text: "You can migrate this script, so it can be edited from the UI. After it is migrated and you have saved it, you will have to manually delete your old script from your configuration. Do you want to migrate this script?",
title: this.hass.localize(
"ui.panel.config.script.picker.migrate_script"
),
text: this.hass.localize(
"ui.panel.config.script.picker.migrate_script_description"
),
})
: await this.confirmUnsavedChanged();
if (result) {
Expand Down
32 changes: 18 additions & 14 deletions src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1745,8 +1745,8 @@
"answer_generic": "Other controllers"
},
"google_home": {
"header": "Link Matter app",
"step_1": "Find your device in Google Home. Tap the gear icon to open the device settings.",
"header": "Share from Google Home",
"step_1": "Find your device in the Google Home app. Tap the gear icon to open the device settings.",
"step_2": "Tap {linked_matter_apps_services}.",
"step_3": "Tap {link_apps_services} and choose {home_assistant} from the list.",
"linked_matter_apps_services": "Linked Matter apps and services",
Expand Down Expand Up @@ -1776,8 +1776,8 @@
"code_instructions": "Paste the code you just received from the other controller."
},
"generic": {
"header": "Copy setup code",
"code_instructions": "Search for the sharing mode in the app of your controller, and activate it. You will get a sharing code, enter that below.",
"header": "Enter setup code",
"code_instructions": "Search for the sharing mode in the app of your controller, and activate it. You will get a setup code, enter that below.",
"setup_code": "Setup code"
}
}
Expand Down Expand Up @@ -2792,7 +2792,9 @@
},
"empty_header": "Start automating",
"empty_text_1": "Automations make Home Assistant automatically respond to things happening in and around your home.",
"empty_text_2": "Automations connect triggers to actions in a ''when trigger then action'' fashion with optional conditions. For example: ''When the sun sets and if {user} is home, then turn on the lights''."
"empty_text_2": "Automations connect triggers to actions in a ''when trigger then action'' fashion with optional conditions. For example: ''When the sun sets and if {user} is home, then turn on the lights''.",
"migrate_automation": "Migrate automation?",
"migrate_automation_description": "You can migrate this automation, so it can be edited from the UI. After it is migrated and you have saved it, you will have to manually delete your old automation from your configuration. Do you want to migrate this automation?"
},
"dialog_new": {
"header": "Create automation",
Expand Down Expand Up @@ -3215,7 +3217,7 @@
"description": {
"picker": "If an entity (or attribute) is in a specific state.",
"no_entity": "Confirm state",
"full": "If{hasAttribute, select, \n true { {attribute} of}\n other {}\n} {numberOfEntities, plural,\n zero {an entity is}\n one {{entities} is}\n other {{entities} are}\n} {numberOfStates, plural,\n zero {a state}\n other {{states}}\n}{hasDuration, select, \n true { for {duration}} \n other {}\n }"
"full": "If{hasAttribute, select, \n true { {attribute} of}\n other {}\n} {numberOfEntities, plural,\n =0 {an entity is}\n one {{entities} is}\n other {{entities} are}\n} {numberOfStates, plural,\n =0 {a state}\n other {{states}}\n}{hasDuration, select, \n true { for {duration}} \n other {}\n }"
}
},
"sun": {
Expand Down Expand Up @@ -3676,7 +3678,9 @@
"duplicate": "[%key:ui::common::duplicate%]",
"empty_header": "Create your first script",
"empty_text": "A script is a sequence of actions that can be run from a dashboard, an automation, or be triggered by voice. For example, a ''Wake-up routine''' script that gradually turns on the light in the bedroom and opens the blinds after a delay.",
"search": "Search {number} scripts"
"search": "Search {number} scripts",
"migrate_script": "Migrate script?",
"migrate_script_description": "You can migrate this script, so it can be edited from the UI. After it is migrated and you have saved it, you will have to manually delete your old script from your configuration. Do you want to migrate this script?"
},
"dialog_new": {
"header": "Create script",
Expand Down Expand Up @@ -4110,7 +4114,7 @@
"hidden": "Hidden"
},
"confirm_rename_entity_ids": "Do you also want to rename the entity IDs of your entities?",
"confirm_rename_entity_ids_warning": "This will not change any configuration (like automations, scripts, scenes, dashboards) that is currently using these entities! You will have to update them yourself to use the new entity IDs!",
"confirm_rename_entity_ids_warning": "This will not change any configuration (like automations, scripts, scenes, dashboards) that is currently using these entities! You will have to manually edit them yourself to use the new entity IDs!",
"confirm_rename_entity_will_rename": "{count} {count, plural,\n one {entity ID}\n other {entity IDs}\n} will be renamed",
"confirm_rename_new": "New",
"confirm_rename_old": "Old",
Expand Down Expand Up @@ -5871,7 +5875,7 @@
},
"entities": {
"name": "Entities",
"show_header_toggle": "Show header toggle?",
"show_header_toggle": "Show header toggle",
"toggle": "Toggle entities.",
"description": "The Entities card is the most common type of card. It groups items together into lists.",
"special_row": "special row",
Expand Down Expand Up @@ -5918,9 +5922,9 @@
},
"gauge": {
"name": "Gauge",
"needle_gauge": "Display as needle gauge?",
"needle_gauge": "Display as needle gauge",
"severity": {
"define": "Define severity?",
"define": "Define severity",
"green": "Green",
"red": "Red",
"yellow": "Yellow"
Expand Down Expand Up @@ -6054,7 +6058,7 @@
"state": "State",
"secondary_info_attribute": "Secondary info attribute",
"search": "Search",
"state_color": "Color icons based on state?",
"state_color": "Show state color",
"suggested_cards": "Suggested cards",
"other_cards": "Other cards",
"custom_cards": "Custom cards",
Expand Down Expand Up @@ -6091,7 +6095,6 @@
"name": "Map",
"geo_location_sources": "Geolocation sources",
"no_geo_location_sources": "No geolocation sources available",
"dark_mode": "Dark mode?",
"appearance": "Appearance",
"theme_mode": "Theme Mode",
"theme_modes": {
Expand Down Expand Up @@ -7359,6 +7362,7 @@
},
"dashboard": {
"changelog": "Changelog",
"current_version": "Current version: {version}",
"cpu_usage": "Add-on CPU usage",
"ram_usage": "Add-on RAM usage",
"hostname": "Hostname",
Expand Down Expand Up @@ -7459,7 +7463,7 @@
},
"watchdog": {
"title": "Watchdog",
"description": "This will start the add-on if it crashes"
"description": "This will restart the add-on if it crashes"
},
"auto_update": {
"title": "Auto update",
Expand Down
Loading