Skip to content

Translatable service names and descriptions#95977

Closed
jpbede wants to merge 3 commits into
home-assistant:devfrom
jpbede:translatable-services
Closed

Translatable service names and descriptions#95977
jpbede wants to merge 3 commits into
home-assistant:devfrom
jpbede:translatable-services

Conversation

@jpbede
Copy link
Copy Markdown
Member

@jpbede jpbede commented Jul 6, 2023

Proposed change

This PR introduces translations for the service name and description. In a later PR, I'll add translations for the field names and descriptions if this is something that is desired.

This does not introduce breaking changes or anything. If there is no translation, it will fall back to the one defined in services.yaml.

TODO: currently missing tests

CleanShot 2023-07-06 at 10 16 42
CleanShot 2023-07-06 at 10 27 07

Type of change

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

Additional information

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

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

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

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@frenck
Copy link
Copy Markdown
Member

frenck commented Jul 6, 2023

Wow, I'm actually working on this too for the upcoming release.

But the approach is different.

I've just got out of meeting with Bram & Paul (frontend, 5 minutes ago), and discussed a few things on this. The approach we are want to take is handle this from the frontend (just like we do with all other translations) and not from the backend.

We do not need to keep this in the backend at all.

../Frenck

@jpbede
Copy link
Copy Markdown
Member Author

jpbede commented Jul 6, 2023

Alright, then I'm going to close this :)

@jpbede jpbede closed this Jul 6, 2023
@jpbede jpbede deleted the translatable-services branch July 6, 2023 08:41
@frenck
Copy link
Copy Markdown
Member

frenck commented Jul 6, 2023

@jpbede Reference: #95984

@github-actions github-actions Bot locked and limited conversation to collaborators Jul 7, 2023
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.

2 participants