Skip to content

Added integration name to System Options dialog#3996

Merged
bramkragten merged 4 commits into
home-assistant:devfrom
springstan:systemOptionsDialogIntegration
Oct 14, 2019
Merged

Added integration name to System Options dialog#3996
bramkragten merged 4 commits into
home-assistant:devfrom
springstan:systemOptionsDialogIntegration

Conversation

@springstan
Copy link
Copy Markdown
Member

Issues affected: #3948

Changes:

  • added integration name to title of System Options Dialog
  • added integration name into the description of System Options Dialog
  • updated the title in src/translations/en.json
  • split enable_new_entities_description into two key-value pairs

Result:
grafik

@bramkragten
Copy link
Copy Markdown
Member

Thanks! The integration name itself should also be translated, and pass the name of the integration as a variable in the translation string instead of splitting it.

@iantrich
Copy link
Copy Markdown
Member

Translate integration name? How is that going to scale? Do we have backend translations for that or something?

@SeanPM5
Copy link
Copy Markdown
Contributor

SeanPM5 commented Oct 13, 2019

Not sure it's feasible to translate the integration names since most of them are made-up brand names like Wemo, Twilio, etc.

@springstan
Copy link
Copy Markdown
Member Author

@bramkragten a841697 fixes your suggestions.
However, I did not add the functionality of translating the integration name.

@bramkragten
Copy link
Copy Markdown
Member

bramkragten commented Oct 13, 2019

Translations of integration are on the backend, example for Hue: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/hue/.translations/en.json#L29

hass.localize(`component.${domain}.config.title`)

@iantrich
Copy link
Copy Markdown
Member

hass.localize(component.${domain}.config.title)

TIL

@springstan
Copy link
Copy Markdown
Member Author

springstan commented Oct 14, 2019

@bramkragten implemented your suggestion about translating the integration name with 85b0684, thanks for providing the solution to this problem 👍

grafik

Comment on lines +66 to +68
this.hass.localize(
`component.${this._params.entry.domain}.config.title`
)
Copy link
Copy Markdown
Member

@bramkragten bramkragten Oct 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be that there is no translation:

this.hass.localize(`component.${this._params.entry.domain}.config.title`) || ${this._params.entry.domain}

Copy link
Copy Markdown
Member Author

@springstan springstan Oct 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Fixed with 68d4559

@bramkragten bramkragten merged commit 59e4cdc into home-assistant:dev Oct 14, 2019
@bramkragten bramkragten mentioned this pull request Oct 23, 2019
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants