Skip to content

Graceful fallback if translations for device automations are missing#4824

Merged
bramkragten merged 5 commits into
home-assistant:devfrom
emontnemery:device_automation_translation_fallback
Feb 10, 2020
Merged

Graceful fallback if translations for device automations are missing#4824
bramkragten merged 5 commits into
home-assistant:devfrom
emontnemery:device_automation_translation_fallback

Conversation

@emontnemery
Copy link
Copy Markdown
Collaborator

Proposed change

Fall back in case device automation translations are missing.
If translation for subtype is missing, use subtype as is.
If translation for type is missing generate string "subtype" type.

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

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:

Comment thread src/data/device_automation.ts Outdated
Comment thread src/data/device_automation.ts Outdated
Comment thread src/data/device_automation.ts Outdated
emontnemery and others added 4 commits February 10, 2020 17:01
Co-Authored-By: Bram Kragten <mail@bramkragten.nl>
Co-Authored-By: Bram Kragten <mail@bramkragten.nl>
Co-Authored-By: Bram Kragten <mail@bramkragten.nl>
@bramkragten bramkragten merged commit e7e8dff into home-assistant:dev Feb 10, 2020
@emontnemery emontnemery deleted the device_automation_translation_fallback branch February 10, 2020 19:18
@bramkragten bramkragten mentioned this pull request Feb 12, 2020
@lock lock Bot locked and limited conversation to collaborators Feb 12, 2020
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.

3 participants