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

Add unit translations for github integration #130538

Merged
merged 9 commits into from
Nov 20, 2024
Merged

Conversation

abmantis
Copy link
Contributor

@abmantis abmantis commented Nov 13, 2024

Breaking change

The units of measurement of the following sensors for the github integration were changed to lowercase:

  • Discussions
  • Stars
  • Watchers
  • Forks
  • Issues
  • Pull requests

Proposed change

This adds native_unit_of_measurement translation to github integrations, as a basis implementation for home-assistant/architecture#1056

Needs home-assistant/frontend#22868

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

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 Ruff (ruff format 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.

To help with the load of incoming pull requests:

@emontnemery
Copy link
Contributor

We should extend the scope of this PR to not only add unit tests but also implementation changes

@abmantis abmantis changed the title Add native_unit_of_measurement to translation tests Add unit translations for youtube, fitbit and withings Nov 14, 2024
@abmantis abmantis marked this pull request as ready for review November 14, 2024 11:23
@abmantis abmantis requested review from allenporter and a team as code owners November 14, 2024 11:23
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
@abmantis abmantis requested a review from joostlek November 14, 2024 11:27
@abmantis abmantis changed the title Add unit translations for youtube, fitbit and withings Add unit translations for youtube and withings Nov 14, 2024
@gjohansson-ST
Copy link
Member

Normally when implementing changes from arch discussions those PRs only introduce the changes/features needed in the entity components and not in integrations that might use it.

Are we doing something different here and there is no frontend PR (yet)?

@abmantis
Copy link
Contributor Author

Normally when implementing changes from arch discussions those PRs only introduce the changes/features needed in the entity components and not in integrations that might use it.

There are no other changes on the entity components for this. I've kept only the changes on the youtube integration to make this simpler, though.

Are we doing something different here and there is no frontend PR (yet)?

Yes, there is work needed on the frontend too.

@abmantis abmantis marked this pull request as draft November 14, 2024 16:52
@abmantis abmantis changed the title Add unit translations for youtube and withings Add unit translations for github integration Nov 18, 2024
@abmantis
Copy link
Contributor Author

abmantis commented Nov 18, 2024

Switched to the github integration since I can test it out with the frontend.

@abmantis abmantis requested a review from epenet November 18, 2024 18:53
@abmantis abmantis marked this pull request as ready for review November 19, 2024 11:31
@abmantis abmantis requested a review from ludeeus as a code owner November 19, 2024 11:31
script/hassfest/translations.py Outdated Show resolved Hide resolved
@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.

@home-assistant home-assistant bot marked this pull request as draft November 20, 2024 08:13
@abmantis abmantis requested a review from frenck November 20, 2024 12:22
@abmantis abmantis marked this pull request as ready for review November 20, 2024 12:39
Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

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

Thanks, @abmantis 👍

../Frenck

@frenck frenck merged commit 4776865 into dev Nov 20, 2024
60 checks passed
@frenck frenck deleted the unit_of_meas_translation_tests branch November 20, 2024 17:43
eclair4151 pushed a commit to eclair4151/home-assistant-core that referenced this pull request Nov 20, 2024
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2024
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.

8 participants