From 182111912c125336bc32dca161abf2468a3ee781 Mon Sep 17 00:00:00 2001 From: Philip Allgaier Date: Wed, 26 Jun 2024 11:13:52 +0200 Subject: [PATCH] Rename "Twitter" to "X (formerly Twitter)" (#20694) * Rename "Twitter" to "X (formerly Twitter)" * Add translations * Show x logo on light mode --------- Co-authored-by: Simon Lamon <32477463+silamon@users.noreply.github.com> --- public/static/images/logo_twitter.png | Bin 1201 -> 0 bytes public/static/images/logo_x.svg | 3 +++ src/onboarding/dialogs/community-dialog.ts | 12 +++++++++--- .../config/dashboard/ha-config-dashboard.ts | 10 +++++----- src/translations/en.json | 7 ++++++- 5 files changed, 23 insertions(+), 9 deletions(-) delete mode 100644 public/static/images/logo_twitter.png create mode 100644 public/static/images/logo_x.svg diff --git a/public/static/images/logo_twitter.png b/public/static/images/logo_twitter.png deleted file mode 100644 index 7b470c3bc33160bbc425f6472700619bdda96746..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1201 zcmXw&2~bm46oxN?H0&r6F^UF;0)tS%7Rw?cONyvOBpDWKF+jCYK`9bzQ4o=J+*&bg zDaC|U!jhCEGKhdgzz`H93IYm2M8hItBrnN>@cPg?bMAL%{`22|=A4*~R1qAU#)*#n?q9dv+901O4HtdaqNThJ=es)bj{M8(gAw&ee}K08-! zpPn$k*h&_^7(O{yqm-aTiHZncIwcInl6wg&a zs+IQPB~~9y?^1==D*|dDz()FBEw>E8=oGG%kW8^M^qPDt1&r z6Lac3fim-+GNoCW$X8I<3g2pIdpUHRqljWFys99l3J6?YEL@~A&@JJUf{CPM0E^nh z6IunK@{TIArgvP{_0&HSTWJQ!0%Q(@wJ?P&42Y%YS>Bw}OY2)o^+@++d=-DC2U1&14FgKuzoMgP!oOB?8% z530=Eq6oL^Min%-^4OVqD5tunl30K0H0<4_O$0t1YpI-7$>_`wGz^FP%V*^Kds$o0NXU zmq&)TFK~~#JBGSTrVccHfU9s>nKt502?RkCKJ})ZSzTA_w0>qdd}&Kq!x_n(zJp1p zkwwL6A0h+W-e0Z%jZOh^f#*)f*rY0Fhx_PX6>lCql${b0qyZmZ?CX~{dm2CdA+~{_ z=iQAV@0}iI*5*%cGde%?UWI8+AXg|{TQ$T9#EIwG7g=}GCK&8JrL;Q@XXrzBzy&*t zvy_*wCX8o8@>)oVA!A-KS(MF5>w48Y_n+eJ!)sGa3&Eg-`C?2@_ngjszVQy$K3G6- zkI?adG=M#2nK5)c@T_Zs-;uwPJh=FD!X%%#!CP>;SYVmsnS2-lQq{9x1Iy&9t` zhnd{S$4V;ytzrE0G~Bi6YG1m(*Kq!Hr}y73^bE1oQ7bDtvTG;nWKzFJF=x_(?aFPH?EnJXT8Xc6N&16~dyGB{wvWUu`O& zxVmm_B}2*2>SbFyh6x*6EV1|Z9PUcFG>V`9>8{>QLfGrlT>__e5tTP=OY8BcEnO3a zuhXMQ2RPJjCyn;k2eJJ=8FI&xhb{%D%~;18m%|-L%q~l|z~9Y9@iZ+n#JLT!a*-fd zMm;9Cnn<^LWF0QVTD5A;Tm86(G!WInBi$ItR%((TpAZGl#PcG0PT0t#FGn1OC-Pd3 zvU?jIAC!5fJl)yGl3hjiCs(%he*FGh6FqSwDVkGMTryS|mUrGpy;gcK)$n@FarBn} N5I`XM)%#G={{!ySZnppc diff --git a/public/static/images/logo_x.svg b/public/static/images/logo_x.svg new file mode 100644 index 000000000000..d3f4154fb2fa --- /dev/null +++ b/public/static/images/logo_x.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/onboarding/dialogs/community-dialog.ts b/src/onboarding/dialogs/community-dialog.ts index 475077edd16e..b3070e108dcb 100644 --- a/src/onboarding/dialogs/community-dialog.ts +++ b/src/onboarding/dialogs/community-dialog.ts @@ -72,11 +72,11 @@ class DialogCommunity extends LitElement { - - ${this.localize("ui.panel.page-onboarding.welcome.twitter")} + + ${this.localize("ui.panel.page-onboarding.welcome.x")} @@ -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); + } + } `; } diff --git a/src/panels/config/dashboard/ha-config-dashboard.ts b/src/panels/config/dashboard/ha-config-dashboard.ts index da417e6cec99..859ef4fdc901 100644 --- a/src/panels/config/dashboard/ha-config-dashboard.ts +++ b/src/panels/config/dashboard/ha-config-dashboard.ts @@ -61,32 +61,32 @@ const randomTip = (hass: HomeAssistant, narrow: boolean) => { href="https://community.home-assistant.io" target="_blank" rel="noreferrer" - >Forums${hass.localize("ui.panel.config.tips.join_forums")}`, twitter: html`Twitter${hass.localize("ui.panel.config.tips.join_x")}`, discord: html`Chat${hass.localize("ui.panel.config.tips.join_chat")}`, blog: html`Blog${hass.localize("ui.panel.config.tips.join_blog")}`, newsletter: html`Newsletter${hass.localize("ui.panel.config.tips.join_newsletter")} `, }), diff --git a/src/translations/en.json b/src/translations/en.json index 0d4ca0303695..2cf298b59873 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -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": { @@ -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" },