Skip to content

Commit

Permalink
Rename "Twitter" to "X (formerly Twitter)" (#20694)
Browse files Browse the repository at this point in the history
* Rename "Twitter" to "X (formerly Twitter)"

* Add translations

* Show x logo on light mode

---------

Co-authored-by: Simon Lamon <[email protected]>
  • Loading branch information
spacegaier and silamon authored Jun 26, 2024
1 parent 8a0924b commit 1821119
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 9 deletions.
Binary file removed public/static/images/logo_twitter.png
Binary file not shown.
3 changes: 3 additions & 0 deletions public/static/images/logo_x.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 9 additions & 3 deletions src/onboarding/dialogs/community-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ class DialogCommunity extends LitElement {
<a
target="_blank"
rel="noreferrer noopener"
href="https://twitter.com/home_assistant"
href="https://x.com/home_assistant"
>
<ha-list-item hasMeta graphic="icon">
<img src="/static/images/logo_twitter.png" slot="graphic" />
${this.localize("ui.panel.page-onboarding.welcome.twitter")}
<img class="x" src="/static/images/logo_x.svg" slot="graphic" />
${this.localize("ui.panel.page-onboarding.welcome.x")}
<ha-svg-icon slot="meta" .path=${mdiOpenInNew}></ha-svg-icon>
</ha-list-item>
</a>
Expand All @@ -96,6 +96,12 @@ class DialogCommunity extends LitElement {
a {
text-decoration: none;
}
@media (prefers-color-scheme: light) {
img.x {
filter: invert(1) hue-rotate(180deg);
}
}
`;
}

Expand Down
10 changes: 5 additions & 5 deletions src/panels/config/dashboard/ha-config-dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,32 +61,32 @@ const randomTip = (hass: HomeAssistant, narrow: boolean) => {
href="https://community.home-assistant.io"
target="_blank"
rel="noreferrer"
>Forums</a
>${hass.localize("ui.panel.config.tips.join_forums")}</a
>`,
twitter: html`<a
href=${documentationUrl(hass, `/twitter`)}
target="_blank"
rel="noreferrer"
>Twitter</a
>${hass.localize("ui.panel.config.tips.join_x")}</a
>`,
discord: html`<a
href=${documentationUrl(hass, `/join-chat`)}
target="_blank"
rel="noreferrer"
>Chat</a
>${hass.localize("ui.panel.config.tips.join_chat")}</a
>`,
blog: html`<a
href=${documentationUrl(hass, `/blog`)}
target="_blank"
rel="noreferrer"
>Blog</a
>${hass.localize("ui.panel.config.tips.join_blog")}</a
>`,
newsletter: html`<span class="keep-together"
><a
href="https://newsletter.openhomefoundation.org/"
target="_blank"
rel="noreferrer"
>Newsletter</a
>${hass.localize("ui.panel.config.tips.join_newsletter")}</a
>
</span>`,
}),
Expand Down
7 changes: 6 additions & 1 deletion src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -5070,6 +5070,11 @@
"tips": {
"tip": "Tip!",
"join": "Join the community on our {forums}, {twitter}, {discord}, {blog} or {newsletter}",
"join_x": "X (formerly Twitter)",
"join_forums": "Forums",
"join_chat": "Chat",
"join_blog": "Blog",
"join_newsletter": "Newsletter",
"media_storage": "You can add network storage to your Home Assistant instance in the {storage} panel."
},
"analytics": {
Expand Down Expand Up @@ -6873,7 +6878,7 @@
"forums": "Home Assistant forums",
"open_home_newsletter": "Building the Open Home newsletter",
"discord": "Discord chat",
"twitter": "Twitter",
"x": "[%key:ui::panel::config::tips::join_x%]",
"playstore": "Get it on Google Play",
"appstore": "Download on the App Store"
},
Expand Down

0 comments on commit 1821119

Please sign in to comment.