From 6c3a1e9033036b49056d99c8779a89c1792bba25 Mon Sep 17 00:00:00 2001 From: Tim Fischbach Date: Fri, 7 Jun 2024 12:56:50 +0200 Subject: [PATCH] Replace mentions of Twitter with X Use X icon instead of Twitter bird. --- .../pageflow/social_share_links_helper.rb | 2 +- .../entries/share_menu/_twitter_link.html.erb | 16 +++------------- config/locales/de.yml | 1 - config/locales/en.yml | 1 - config/locales/new/twitter_to_x.de.yml | 6 ++++++ config/locales/new/twitter_to_x.en.yml | 6 ++++++ entry_types/scrolled/config/locales/de.yml | 6 ------ entry_types/scrolled/config/locales/en.yml | 6 ------ .../config/locales/new/twitter_to_x.de.yml | 12 ++++++++++++ .../config/locales/new/twitter_to_x.en.yml | 12 ++++++++++++ .../src/contentElements/twitterEmbed/editor.js | 2 ++ .../contentElements/twitterEmbed/pictogram.svg | 18 ++++-------------- .../scrolled/package/src/entryState/sharing.js | 2 +- .../src/frontend/icons/social/twitter.svg | 16 +++------------- pageflow.gemspec | 2 +- 15 files changed, 51 insertions(+), 57 deletions(-) create mode 100644 config/locales/new/twitter_to_x.de.yml create mode 100644 config/locales/new/twitter_to_x.en.yml create mode 100644 entry_types/scrolled/config/locales/new/twitter_to_x.de.yml create mode 100644 entry_types/scrolled/config/locales/new/twitter_to_x.en.yml diff --git a/app/helpers/pageflow/social_share_links_helper.rb b/app/helpers/pageflow/social_share_links_helper.rb index 1d9daf3d83..195a52f4de 100644 --- a/app/helpers/pageflow/social_share_links_helper.rb +++ b/app/helpers/pageflow/social_share_links_helper.rb @@ -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 diff --git a/app/views/pageflow/entries/share_menu/_twitter_link.html.erb b/app/views/pageflow/entries/share_menu/_twitter_link.html.erb index 7d20cb06d2..eed94507d6 100644 --- a/app/views/pageflow/entries/share_menu/_twitter_link.html.erb +++ b/app/views/pageflow/entries/share_menu/_twitter_link.html.erb @@ -1,19 +1,9 @@ <%= social_share_link(:twitter, entry) do %> - - - - - + viewBox="0 0 512 512"> + <%= t('pageflow.public.share_on_twitter') %> -

Twitter

+

X

<% end %> diff --git a/config/locales/de.yml b/config/locales/de.yml index e0271a9aa1..6860a1f5e8 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -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 diff --git a/config/locales/en.yml b/config/locales/en.yml index 6c3373bc04..9a76324f3f 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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 diff --git a/config/locales/new/twitter_to_x.de.yml b/config/locales/new/twitter_to_x.de.yml new file mode 100644 index 0000000000..3ef6b4bdaa --- /dev/null +++ b/config/locales/new/twitter_to_x.de.yml @@ -0,0 +1,6 @@ +de: + activerecord: + values: + pageflow/entry: + share_providers: + twitter: X diff --git a/config/locales/new/twitter_to_x.en.yml b/config/locales/new/twitter_to_x.en.yml new file mode 100644 index 0000000000..8dc9329931 --- /dev/null +++ b/config/locales/new/twitter_to_x.en.yml @@ -0,0 +1,6 @@ +en: + activerecord: + values: + pageflow/entry: + share_providers: + twitter: X diff --git a/entry_types/scrolled/config/locales/de.yml b/entry_types/scrolled/config/locales/de.yml index 27d7716d67..e2988e76f5 100644 --- a/entry_types/scrolled/config/locales/de.yml +++ b/entry_types/scrolled/config/locales/de.yml @@ -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: diff --git a/entry_types/scrolled/config/locales/en.yml b/entry_types/scrolled/config/locales/en.yml index 13c5e0145d..c6a458d2be 100644 --- a/entry_types/scrolled/config/locales/en.yml +++ b/entry_types/scrolled/config/locales/en.yml @@ -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: diff --git a/entry_types/scrolled/config/locales/new/twitter_to_x.de.yml b/entry_types/scrolled/config/locales/new/twitter_to_x.de.yml new file mode 100644 index 0000000000..57b965b1bd --- /dev/null +++ b/entry_types/scrolled/config/locales/new/twitter_to_x.de.yml @@ -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 diff --git a/entry_types/scrolled/config/locales/new/twitter_to_x.en.yml b/entry_types/scrolled/config/locales/new/twitter_to_x.en.yml new file mode 100644 index 0000000000..219ea004f9 --- /dev/null +++ b/entry_types/scrolled/config/locales/new/twitter_to_x.en.yml @@ -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 diff --git a/entry_types/scrolled/package/src/contentElements/twitterEmbed/editor.js b/entry_types/scrolled/package/src/contentElements/twitterEmbed/editor.js index e54df5909f..1a07b7f241 100644 --- a/entry_types/scrolled/package/src/contentElements/twitterEmbed/editor.js +++ b/entry_types/scrolled/package/src/contentElements/twitterEmbed/editor.js @@ -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, diff --git a/entry_types/scrolled/package/src/contentElements/twitterEmbed/pictogram.svg b/entry_types/scrolled/package/src/contentElements/twitterEmbed/pictogram.svg index d87ab9d685..5c31733bdc 100644 --- a/entry_types/scrolled/package/src/contentElements/twitterEmbed/pictogram.svg +++ b/entry_types/scrolled/package/src/contentElements/twitterEmbed/pictogram.svg @@ -1,14 +1,4 @@ - - - - - - - \ No newline at end of file + + + diff --git a/entry_types/scrolled/package/src/entryState/sharing.js b/entry_types/scrolled/package/src/entryState/sharing.js index 6f65e4a197..272905cb4b 100644 --- a/entry_types/scrolled/package/src/entryState/sharing.js +++ b/entry_types/scrolled/package/src/entryState/sharing.js @@ -56,7 +56,7 @@ export function useShareProviders({isPhonePlatform}) { }, twitter: { iconName: 'twitter', - name: 'Twitter', + name: 'X', url: urlTemplates.twitter }, whats_app: { diff --git a/entry_types/scrolled/package/src/frontend/icons/social/twitter.svg b/entry_types/scrolled/package/src/frontend/icons/social/twitter.svg index c1cb54c0a1..3cd4502dc1 100644 --- a/entry_types/scrolled/package/src/frontend/icons/social/twitter.svg +++ b/entry_types/scrolled/package/src/frontend/icons/social/twitter.svg @@ -1,14 +1,4 @@ - - - - - - \ No newline at end of file + viewBox="0 0 512 512" > + + diff --git a/pageflow.gemspec b/pageflow.gemspec index cd81797564..70bc5f5b47 100644 --- a/pageflow.gemspec +++ b/pageflow.gemspec @@ -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'