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

Use domain translation in filter for domain search #20763

Merged
merged 2 commits into from
May 18, 2024

Conversation

jpbede
Copy link
Member

@jpbede jpbede commented May 9, 2024

Proposed change

At the moment, when searching for domains in the filter, it is filtered by the domain name itself, which is not translated. For example, if you search for "Licht" in German, the light domain will not be displayed:

image image

This PR addresses this with the use of the domain translation for the search:

image image

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

Copy link
Member

@piitaya piitaya left a comment

Choose a reason for hiding this comment

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

Hi 👋 Thank you for the improvement. I left few comments to simplify the implementation.

src/components/ha-filter-domains.ts Outdated Show resolved Hide resolved
src/components/ha-filter-domains.ts Outdated Show resolved Hide resolved
@home-assistant home-assistant bot marked this pull request as draft May 13, 2024 12:26
@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@jpbede jpbede marked this pull request as ready for review May 13, 2024 16:53
@home-assistant home-assistant bot requested a review from piitaya May 13, 2024 16:53
@silamon silamon dismissed piitaya’s stale review May 18, 2024 08:15

comments have been addressed

@silamon silamon merged commit 111816f into home-assistant:dev May 18, 2024
13 checks passed
@jpbede jpbede deleted the domain-filter-use-translation branch May 18, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants