From fe7c7ead180825b8840cca2222495626795989ba Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Sat, 24 Jun 2023 13:46:10 +0200 Subject: [PATCH] Use `en` as fallback language (#891) * Use `en` as fallback language Uses English if a non valid language is selected (like when using legacy language selection). * Use `en` as fallback language --- ReleaseNotes.md | 2 +- nspanel_blueprint.yaml | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 419d8b3..ead20f6 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -25,7 +25,7 @@ Since in this update lots of input to the blueprint changed, we highly recommend   ## Breaking changes 1. New requirement: Home Assistant 2023.5.0 or later -2. Exisiting users will have o select again the language for the panel, otherwise the automation will throw an error in the log related to the previous language selection. +2. Exisiting users will have o select again the language for the panel, otherwise English will be used to display strings. 3. Removed entity `sensor.xxxxx_settings_entity` and service `esphome.xxxxx_set_settings_entity`   diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index fafd2d3..f3a1d1e 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -857,6 +857,8 @@ blueprint: *HOME page* *Label which should be displayed (10 characters are supported)* + + Note: This label is not visible on the US landscape model. default: [] selector: text: {} @@ -912,6 +914,8 @@ blueprint: *HOME page* *Label which should be displayed (10 characters are supported)* + + Note: This label is not visible on the US landscape model. default: [] selector: text: {} @@ -3470,7 +3474,6 @@ trigger_variables: variables: ##### GENERAL ##### blueprint_version: '3.5_dev' - language: !input 'language' date_format_temp: !input 'date_format' #Avoid breaking change for existing users with legacy type format date_format: > @@ -3620,6 +3623,9 @@ variables: - "entitypage04" ##### MUI Multilingual User Interface ##### + language_tmp: !input 'language' + language: '{{ language_tmp if language_tmp is string and language_tmp in ["bg", "hr", "cs", "da", "nl", "et", "fi", "fr", "de", "el", "he", "hu", "id", "it", "lv", "lt", "nb", "pl", "pt", "ro", "ru", "sk", "sl", "es", "sv", "tr", "uk"] else "en" }}' + mui: bg: #Bulgarian weekdays: