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

Remove translations from Core #87543

Merged
merged 9 commits into from
Feb 6, 2023
Merged

Remove translations from Core #87543

merged 9 commits into from
Feb 6, 2023

Conversation

frenck
Copy link
Member

@frenck frenck commented Feb 6, 2023

Proposed change

This PR removes the translation files from Home Assistant Core.

It is being replaced by our translation compiler for development. This will provide English translations, which is sufficient for most tasks.

Main goals:

  • No longer have to sync translations each night, instead, we are fetching them at build time. This has been in production in nightly builds since Download/Update translations on build #87289.
  • No need for developers to take them into account anymore when creating PRs
  • Removes confusion on where to edit translations (users keep submitting PRs to this repository)
  • Allows us to enable additional branch protections (as the nightly translations sync job prevented us from doing so).
  • Each patch and beta version, will now also have the latest translations.

If one needs all translations, they can be downloaded using the python -m script.translations download command locally.

Changes in this PR:

  • All vscode tasks and launchers, and setup scripts have been adjusted to compile languages, to ensure in normal workflow, they are "just" there.
  • The test workflow now compiles translations before run.
  • .gitignore has been adjusted to exclude all translation folders.
  • Workflow for downloading translations has been removed.
  • A couple of tests needed adjustment (because they were testing "old" style state translations, which aren't used in our codebase anymore).

This PR is huge (due to deletions), and consists of multiple PRs for reviewing purposes. If you look at it commit by commit, it is actually pretty OK. The one large commit is the removal, I've run the following command, and committed the result for that commit:

rm -f -r ./homeassistant/components/*/translations

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
  • 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:

@home-assistant home-assistant bot added cla-signed small-pr PRs with less than 30 lines. labels Feb 6, 2023
@frenck frenck marked this pull request as ready for review February 6, 2023 13:42
Copy link
Member

@balloob balloob left a comment

Choose a reason for hiding this comment

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

🔥 🔥 🔥 🔥

@frenck frenck merged commit 939eef3 into dev Feb 6, 2023
@frenck frenck deleted the frenck-2023-0274 branch February 6, 2023 14:06
cereal2nd pushed a commit to cereal2nd/home-assistant that referenced this pull request Feb 6, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Feb 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed small-pr PRs with less than 30 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants