We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi @ThomDietrich
I am not a developer just and learning and coding as hobby. So maybe there is an easier way to do it and also I have no idea about pull requests :)
In order to make Uppercase each words of Moon Phases, can you please add following change to line 2832 and 2833
moon_phase_localized = moon_phase_localized.split(' ').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
key: "renderMoonElement", value: function renderMoonElement(i18n, phase, phaseRotation) { if (phase === undefined) { return A; } var moon_phase_localized = i18n.localize("component.moon.entity.sensor.phase.state.".concat(phase.state)); if (!moon_phase_localized) { moon_phase_localized = x(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteral(["<span title=\"Install Moon integration to get localized Moon phase name\">", " (!)</span>"])), phase.state); } **// Split the localized moon phase name into words, capitalize the first letter of each word, and join them back together moon_phase_localized = moon_phase_localized.split(' ').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');** return x(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteral(["\n <div class=\"horizon-card-text-container\">\n <div class=\"horizon-card-field-moon-phase\" style=\"transform: rotate(", "deg)\">\n <ha-icon icon=\"mdi:", "\"></ha-icon>\n </div>\n <div class=\"horizon-card-field-value horizon-card-field-value-moon-phase\">", "</div>\n </div>\n "])), phaseRotation, phase.icon, moon_phase_localized); }
The text was updated successfully, but these errors were encountered:
What's the goal of uppercasing each word?
For the record, translations from the moon phases come from Home Assistant itself. English names are in https://github.com/home-assistant/core/blob/dev/homeassistant/components/moon/strings.json, and other languages are managed via Lokalise (https://developers.home-assistant.io/docs/translations)
Sorry, something went wrong.
No branches or pull requests
Hi @ThomDietrich
I am not a developer just and learning and coding as hobby. So maybe there is an easier way to do it and also I have no idea about pull requests :)
In order to make Uppercase each words of Moon Phases, can you please add following change to line 2832 and 2833
moon_phase_localized = moon_phase_localized.split(' ').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
The text was updated successfully, but these errors were encountered: