Skip to content

Commit

Permalink
Replace mentions of Twitter with X
Browse files Browse the repository at this point in the history
Use X icon instead of Twitter bird.
  • Loading branch information
tf committed Jun 7, 2024
1 parent f9eb0fd commit 6c3a1e9
Show file tree
Hide file tree
Showing 15 changed files with 51 additions and 57 deletions.
2 changes: 1 addition & 1 deletion app/helpers/pageflow/social_share_links_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module SocialShareLinksHelper
google: 'https://plus.google.com/share?url=%{url}',
linked_in: 'https://www.linkedin.com/shareArticle?mini=true&url=%{url}',
telegram: 'tg://msg?text=%{url}',
twitter: 'https://twitter.com/intent/tweet?url=%{url}',
twitter: 'https://x.com/intent/post?url=%{url}',
whats_app: 'WhatsApp://send?text=%{url}'
}.freeze

Expand Down
16 changes: 3 additions & 13 deletions app/views/pageflow/entries/share_menu/_twitter_link.html.erb
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
<%= social_share_link(:twitter, entry) do %>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 612 612" style="enable-background:new 0 0 612 612;" xml:space="preserve">
<g>
<g>
<path d="M612,116.258c-22.525,9.981-46.694,16.75-72.088,19.772c25.929-15.527,45.777-40.155,55.184-69.411
c-24.322,14.379-51.169,24.82-79.775,30.48c-22.907-24.437-55.49-39.658-91.63-39.658c-69.334,0-125.551,56.217-125.551,125.513
c0,9.828,1.109,19.427,3.251,28.606C197.065,206.32,104.556,156.337,42.641,80.386c-10.823,18.51-16.98,40.078-16.98,63.101
c0,43.559,22.181,81.993,55.835,104.479c-20.575-0.688-39.926-6.348-56.867-15.756v1.568c0,60.806,43.291,111.554,100.693,123.104
c-10.517,2.83-21.607,4.398-33.08,4.398c-8.107,0-15.947-0.803-23.634-2.333c15.985,49.907,62.336,86.199,117.253,87.194
c-42.947,33.654-97.099,53.655-155.916,53.655c-10.134,0-20.116-0.612-29.944-1.721c55.567,35.681,121.536,56.485,192.438,56.485
c230.948,0,357.188-191.291,357.188-357.188l-0.421-16.253C573.872,163.526,595.211,141.422,612,116.258z"/>
</g>
</g>
viewBox="0 0 512 512">
<path d="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"/>
</svg>

<span class="hint"><%= t('pageflow.public.share_on_twitter') %></span>
<p>Twitter</p>
<p>X</p>
<% end %>
1 change: 0 additions & 1 deletion config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,6 @@ de:
facebook: Facebook
linked_in: LinkedIn
telegram: Telegram (nur Mobilgeräte)
twitter: Twitter
whats_app: WhatsApp (nur Mobilgeräte)
type_names:
paged: Seitenbasiert / klassisch
Expand Down
1 change: 0 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,6 @@ en:
facebook: Facebook
linked_in: LinkedIn
telegram: Telegram (only mobile)
twitter: Twitter
whats_app: WhatsApp (only mobile)
type_names:
paged: Page-based / Classic
Expand Down
6 changes: 6 additions & 0 deletions config/locales/new/twitter_to_x.de.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
de:
activerecord:
values:
pageflow/entry:
share_providers:
twitter: X
6 changes: 6 additions & 0 deletions config/locales/new/twitter_to_x.en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
en:
activerecord:
values:
pageflow/entry:
share_providers:
twitter: X
6 changes: 0 additions & 6 deletions entry_types/scrolled/config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -545,12 +545,6 @@ de:
label: Konversation ausblenden
hideMedia:
label: Medien ausblenden
url:
label: Tweet-URL
description: Bettet Inhalte von Twitter ein
name: Tweet
tabs:
general: Twitter-Embed
videoEmbed:
attributes:
aspectRatio:
Expand Down
6 changes: 0 additions & 6 deletions entry_types/scrolled/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -536,12 +536,6 @@ en:
label: Hide Conversation
hideMedia:
label: Hide Media
url:
label: Tweet URL
description: Embed content from Twitter
name: Tweet
tabs:
general: Twitter Embed
videoEmbed:
attributes:
aspectRatio:
Expand Down
12 changes: 12 additions & 0 deletions entry_types/scrolled/config/locales/new/twitter_to_x.de.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
de:
pageflow_scrolled:
editor:
content_elements:
twitterEmbed:
attributes:
url:
label: Post-URL
description: Bettet Inhalte von X ein
name: X Post
tabs:
general: X Embed
12 changes: 12 additions & 0 deletions entry_types/scrolled/config/locales/new/twitter_to_x.en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
de:
pageflow_scrolled:
editor:
content_elements:
twitterEmbed:
attributes:
url:
label: Post URL
description: Embed content from X
name: X Post
tabs:
general: X Embed
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ editor.contentElementTypes.register('twitterEmbed', {
supportedHosts: [
'http://twitter.com',
'https://twitter.com',
'http://x.com',
'https://x.com'
],
displayPropertyName: 'displayTweetId',
required: true,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion entry_types/scrolled/package/src/entryState/sharing.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function useShareProviders({isPhonePlatform}) {
},
twitter: {
iconName: 'twitter',
name: 'Twitter',
name: 'X',
url: urlTemplates.twitter
},
whats_app: {
Expand Down
16 changes: 3 additions & 13 deletions entry_types/scrolled/package/src/frontend/icons/social/twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pageflow.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Gem::Specification.new do |s|
s.add_dependency 'http_accept_language', '~> 2.0'

# Shared translations
s.add_dependency 'pageflow-public-i18n', '~> 1.25'
s.add_dependency 'pageflow-public-i18n', '~> 1.26'

# Password encryption
s.add_dependency 'bcrypt', '~> 3.1.7'
Expand Down

0 comments on commit 6c3a1e9

Please sign in to comment.