summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-01-07 15:36:26 +0100
committerGitHub <noreply@github.com>2019-01-07 15:36:26 +0100
commit5654535728f3017615b801a1b9163d61f0cf623e (patch)
tree501c9a6d1b8cff8f2e51b5085eddbd430c24d6f9
parent43c61bca60016cad5d3fae210fd57622b40225a8 (diff)
Change remote interaction dialog to use specific actions (#9743)
* Change remote interaction dialog to use specific actions Instead of just "interact", use different strings based on whether it's a reply, reblog or favourite. Add explanation why the step is necessary in the first place * Remove obsolete strings
-rw-r--r--app/controllers/remote_interaction_controller.rb5
-rw-r--r--app/views/remote_follow/new.html.haml4
-rw-r--r--app/views/remote_interaction/new.html.haml10
-rw-r--r--app/views/stream_entries/_detailed_status.html.haml6
-rw-r--r--app/views/stream_entries/_simple_status.html.haml6
-rw-r--r--config/locales/ar.yml3
-rw-r--r--config/locales/ast.yml3
-rw-r--r--config/locales/ca.yml3
-rw-r--r--config/locales/co.yml3
-rw-r--r--config/locales/cs.yml3
-rw-r--r--config/locales/cy.yml3
-rw-r--r--config/locales/da.yml3
-rw-r--r--config/locales/de.yml3
-rw-r--r--config/locales/el.yml3
-rw-r--r--config/locales/en.yml12
-rw-r--r--config/locales/eo.yml3
-rw-r--r--config/locales/es.yml3
-rw-r--r--config/locales/eu.yml3
-rw-r--r--config/locales/fa.yml3
-rw-r--r--config/locales/fr.yml3
-rw-r--r--config/locales/gl.yml3
-rw-r--r--config/locales/it.yml3
-rw-r--r--config/locales/ja.yml3
-rw-r--r--config/locales/ka.yml3
-rw-r--r--config/locales/ko.yml3
-rw-r--r--config/locales/nl.yml3
-rw-r--r--config/locales/oc.yml3
-rw-r--r--config/locales/pl.yml3
-rw-r--r--config/locales/pt-BR.yml3
-rw-r--r--config/locales/ru.yml3
-rw-r--r--config/locales/sk.yml3
-rw-r--r--config/locales/sl.yml2
-rw-r--r--config/locales/sr.yml3
33 files changed, 31 insertions, 92 deletions
diff --git a/app/controllers/remote_interaction_controller.rb b/app/controllers/remote_interaction_controller.rb
index 6299a1e13d6..cc6993c52b2 100644
--- a/app/controllers/remote_interaction_controller.rb
+++ b/app/controllers/remote_interaction_controller.rb
@@ -5,6 +5,7 @@ class RemoteInteractionController < ApplicationController
layout 'modal'
+ before_action :set_interaction_type
before_action :set_status
before_action :set_body_classes
@@ -45,4 +46,8 @@ class RemoteInteractionController < ApplicationController
@body_classes = 'modal-layout'
@hide_header = true
end
+
+ def set_interaction_type
+ @interaction_type = %w(reply reblog favourite).include?(params[:type]) ? params[:type] : 'reply'
+ end
end
diff --git a/app/views/remote_follow/new.html.haml b/app/views/remote_follow/new.html.haml
index 9b679015f1a..5cf6977ba17 100644
--- a/app/views/remote_follow/new.html.haml
+++ b/app/views/remote_follow/new.html.haml
@@ -16,4 +16,6 @@
.actions
= f.button :button, t('remote_follow.proceed'), type: :submit
- %p.hint.subtle-hint= t('remote_follow.no_account_html', sign_up_path: open_registrations? ? new_user_registration_path : 'https://joinmastodon.org/#getting-started')
+ %p.hint.subtle-hint
+ = t('remote_follow.reason_html', instance: site_hostname)
+ = t('remote_follow.no_account_html', sign_up_path: open_registrations? ? new_user_registration_path : 'https://joinmastodon.org/#getting-started')
diff --git a/app/views/remote_interaction/new.html.haml b/app/views/remote_interaction/new.html.haml
index 7357546b6e6..a0b10681483 100644
--- a/app/views/remote_interaction/new.html.haml
+++ b/app/views/remote_interaction/new.html.haml
@@ -1,6 +1,6 @@
.form-container
.follow-prompt
- %h2= t('remote_interaction.prompt')
+ %h2= t("remote_interaction.#{@interaction_type}.prompt")
.public-layout
.activity-stream.activity-stream--highlighted
@@ -9,9 +9,13 @@
= simple_form_for @remote_follow, as: :remote_follow, url: remote_interaction_path(@status) do |f|
= render 'shared/error_messages', object: @remote_follow
+ = hidden_field_tag :type, @interaction_type
+
= f.input :acct, placeholder: t('remote_follow.acct'), input_html: { autocapitalize: 'none', autocorrect: 'off' }
.actions
- = f.button :button, t('remote_interaction.proceed'), type: :submit
+ = f.button :button, t("remote_interaction.#{@interaction_type}.proceed"), type: :submit
- %p.hint.subtle-hint= t('remote_follow.no_account_html', sign_up_path: open_registrations? ? new_user_registration_path : 'https://joinmastodon.org/#getting-started')
+ %p.hint.subtle-hint
+ = t('remote_follow.reason_html', instance: site_hostname)
+ = t('remote_follow.no_account_html', sign_up_path: open_registrations? ? new_user_registration_path : 'https://joinmastodon.org/#getting-started')
diff --git a/app/views/stream_entries/_detailed_status.html.haml b/app/views/stream_entries/_detailed_status.html.haml
index b3072997057..41d4714b904 100644
--- a/app/views/stream_entries/_detailed_status.html.haml
+++ b/app/views/stream_entries/_detailed_status.html.haml
@@ -43,7 +43,7 @@
- else
= link_to status.application.name, status.application.website, class: 'detailed-status__application', target: '_blank', rel: 'noopener'
·
- = link_to remote_interaction_path(status), class: 'modal-button detailed-status__link' do
+ = link_to remote_interaction_path(status, type: :reply), class: 'modal-button detailed-status__link' do
= fa_icon('reply')
%span.detailed-status__reblogs>= number_to_human status.replies_count, strip_insignificant_zeros: true
= " "
@@ -55,12 +55,12 @@
%span.detailed-status__link<
= fa_icon('lock')
- else
- = link_to remote_interaction_path(status), class: 'modal-button detailed-status__link' do
+ = link_to remote_interaction_path(status, type: :reblog), class: 'modal-button detailed-status__link' do
= fa_icon('retweet')
%span.detailed-status__reblogs>= number_to_human status.reblogs_count, strip_insignificant_zeros: true
= " "
·
- = link_to remote_interaction_path(status), class: 'modal-button detailed-status__link' do
+ = link_to remote_interaction_path(status, type: :favourite), class: 'modal-button detailed-status__link' do
= fa_icon('star')
%span.detailed-status__favorites>= number_to_human status.favourites_count, strip_insignificant_zeros: true
= " "
diff --git a/app/views/stream_entries/_simple_status.html.haml b/app/views/stream_entries/_simple_status.html.haml
index f92fac86b8b..89a6fe04816 100644
--- a/app/views/stream_entries/_simple_status.html.haml
+++ b/app/views/stream_entries/_simple_status.html.haml
@@ -37,15 +37,15 @@
.status__action-bar
.status__action-bar__counter
- = link_to remote_interaction_path(status), class: 'status__action-bar-button icon-button modal-button', style: 'font-size: 18px; width: 23.1429px; height: 23.1429px; line-height: 23.15px;' do
+ = link_to remote_interaction_path(status, type: :reply), class: 'status__action-bar-button icon-button modal-button', style: 'font-size: 18px; width: 23.1429px; height: 23.1429px; line-height: 23.15px;' do
= fa_icon 'reply fw'
.status__action-bar__counter__label= obscured_counter status.replies_count
- = link_to remote_interaction_path(status), class: 'status__action-bar-button icon-button modal-button', style: 'font-size: 18px; width: 23.1429px; height: 23.1429px; line-height: 23.15px;' do
+ = link_to remote_interaction_path(status, type: :reblog), class: 'status__action-bar-button icon-button modal-button', style: 'font-size: 18px; width: 23.1429px; height: 23.1429px; line-height: 23.15px;' do
- if status.public_visibility? || status.unlisted_visibility?
= fa_icon 'retweet fw'
- elsif status.private_visibility?
= fa_icon 'lock fw'
- else
= fa_icon 'envelope fw'
- = link_to remote_interaction_path(status), class: 'status__action-bar-button icon-button modal-button', style: 'font-size: 18px; width: 23.1429px; height: 23.1429px; line-height: 23.15px;' do
+ = link_to remote_interaction_path(status, type: :favourite), class: 'status__action-bar-button icon-button modal-button', style: 'font-size: 18px; width: 23.1429px; height: 23.1429px; line-height: 23.15px;' do
= fa_icon 'star fw'
diff --git a/config/locales/ar.yml b/config/locales/ar.yml
index 49ee567f36a..8766190e377 100644
--- a/config/locales/ar.yml
+++ b/config/locales/ar.yml
@@ -730,9 +730,6 @@ ar:
no_account_html: أليس عندك حساب بعدُ ؟ يُمْكنك <a href='%{sign_up_path}' target='_blank'>التسجيل مِن هنا</a>
proceed: أكمل المتابعة
prompt: 'إنك بصدد متابعة :'
- remote_interaction:
- proceed: إبدأ التفاعل
- prompt: 'تريد التفاعُل مع هذا التبويق:'
remote_unfollow:
error: خطأ
title: العنوان
diff --git a/config/locales/ast.yml b/config/locales/ast.yml
index c18c398eb93..6c7ffc9bdc8 100644
--- a/config/locales/ast.yml
+++ b/config/locales/ast.yml
@@ -268,9 +268,6 @@ ast:
no_account_html: "¿Nun tienes una cuenta? Pues <a href='%{sign_up_path}' target='_blank'>rexistrate equí</a>"
proceed: Siguir
prompt: 'Vas siguir a:'
- remote_interaction:
- proceed: Interactuar
- prompt: 'Quies interactuar con esti toot:'
remote_unfollow:
error: Fallu
sessions:
diff --git a/config/locales/ca.yml b/config/locales/ca.yml
index ed23a0e8bee..9cb9722c1ea 100644
--- a/config/locales/ca.yml
+++ b/config/locales/ca.yml
@@ -702,9 +702,6 @@ ca:
no_account_html: No tens cap compte? Pots <a href='%{sign_up_path}' target='_blank'>registrar-te aquí</a>
proceed: Comença a seguir
prompt: 'Seguiràs a:'
- remote_interaction:
- proceed: Procedeix a interactuar
- prompt: 'Vols interactuar amb aquest toot:'
remote_unfollow:
error: Error
title: Títol
diff --git a/config/locales/co.yml b/config/locales/co.yml
index 47c094f43e5..1529c4fa322 100644
--- a/config/locales/co.yml
+++ b/config/locales/co.yml
@@ -704,9 +704,6 @@ co:
no_account_html: Ùn avete micca un contu? Pudete <a href='%{sign_up_path}' target='_blank'>arregistravi quì</a>
proceed: Cuntinuà per siguità
prompt: 'Avete da siguità:'
- remote_interaction:
- proceed: Cunfirmà l'interazzione
- prompt: 'Vulete interagisce cù u statutu:'
remote_unfollow:
error: Errore
title: Titulu
diff --git a/config/locales/cs.yml b/config/locales/cs.yml
index f7b1fbef0c1..0b666a23b6d 100644
--- a/config/locales/cs.yml
+++ b/config/locales/cs.yml
@@ -714,9 +714,6 @@ cs:
no_account_html: Ještě nemáte účet? Můžete se <a href='%{sign_up_path}' target='_blank'>registrovat zde</a>
proceed: Pokračovat ke sledování
prompt: 'Budete sledovat:'
- remote_interaction:
- proceed: Pokračovat k interakci
- prompt: 'Chcete interagovat s tímto tootem:'
remote_unfollow:
error: Chyba
title: Nadpis
diff --git a/config/locales/cy.yml b/config/locales/cy.yml
index af37278e260..22b70d1fd6e 100644
--- a/config/locales/cy.yml
+++ b/config/locales/cy.yml
@@ -660,9 +660,6 @@ cy:
no_account_html: Heb gyfrif? Mae modd i chi <a href='%{sign_up_path}' target='_blank'>gofrestru yma</a>
proceed: Ymlaen i ddilyn
prompt: 'Yr ydych am ddilyn:'
- remote_interaction:
- proceed: Ymlaen i ryngweithio
- prompt: 'Rydych eisiau rhyngweithio a''r tŵt hwn:'
remote_unfollow:
error: Gwall
title: Teitl
diff --git a/config/locales/da.yml b/config/locales/da.yml
index 074a774f0d6..5a9fb788180 100644
--- a/config/locales/da.yml
+++ b/config/locales/da.yml
@@ -675,9 +675,6 @@ da:
no_account_html: Har du ikke en konto? Du kan <a href='%{sign_up_path}' target='_blank'>oprette dig her</a>
proceed: Fortsæt for at følge
prompt: 'Du er ved at følge:'
- remote_interaction:
- proceed: Fortsæt for at interagere
- prompt: 'Du ønsker at interagere med dette trut:'
remote_unfollow:
error: Fejl
title: Titel
diff --git a/config/locales/de.yml b/config/locales/de.yml
index 5be29289600..c505bd8bb71 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -704,9 +704,6 @@ de:
no_account_html: Noch keinen Account? Du kannst dich <a href='%{sign_up_path}' target='_blank'>hier anmelden</a>
proceed: Weiter
prompt: 'Du wirst dieser Person folgen:'
- remote_interaction:
- proceed: Fortfahren zum Interagieren
- prompt: 'Du wirst mit diesem Beitrag interagieren:'
remote_unfollow:
error: Fehler
title: Titel
diff --git a/config/locales/el.yml b/config/locales/el.yml
index 9f2da4c732f..e453b581f61 100644
--- a/config/locales/el.yml
+++ b/config/locales/el.yml
@@ -703,9 +703,6 @@ el:
no_account_html: Δεν έχεις λογαριασμό; Μπορείς <a href='%{sign_up_path}' target='_blank'>να γραφτείς εδώ</a>
proceed: Συνέχισε για να ακολουθήσεις
prompt: 'Θα ακολουθήσεις:'
- remote_interaction:
- proceed: Συνέχισε για να αλληλεπιδράσεις
- prompt: 'Θέλεις να αλληλεπιδράσεις με αυτό το τουτ:'
remote_unfollow:
error: Σφάλμα
title: Τίτλος
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 1f240f27262..0d01ad46663 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -723,9 +723,17 @@ en:
no_account_html: Don't have an account? You can <a href='%{sign_up_path}' target='_blank'>sign up here</a>
proceed: Proceed to follow
prompt: 'You are going to follow:'
+ reason_html: "<strong>Why is this step necessary?</strong> <code>%{instance}</code> might not be the server where you are registered, so we need to redirect you to your home server first."
remote_interaction:
- proceed: Proceed to interact
- prompt: 'You want to interact with this toot:'
+ favourite:
+ proceed: Proceed to favourite
+ prompt: 'You want to favourite this toot:'
+ reblog:
+ proceed: Proceed to boost
+ prompt: 'You want to boost this toot:'
+ reply:
+ proceed: Proceed to reply
+ prompt: 'You want to reply to this toot:'
remote_unfollow:
error: Error
title: Title
diff --git a/config/locales/eo.yml b/config/locales/eo.yml
index 8e30ed67907..c05b21108e4 100644
--- a/config/locales/eo.yml
+++ b/config/locales/eo.yml
@@ -696,9 +696,6 @@ eo:
no_account_html: Ĉu vi ne havas konton? Vi povas <a href='%{sign_up_path}' target='_blank'>registriĝi tie</a>
proceed: Daŭrigi por eksekvi
prompt: 'Vi eksekvos:'
- remote_interaction:
- proceed: Efektivigi la interagon
- prompt: 'Vi volas interagi kun ĉi tiu mesaĝo:'
remote_unfollow:
error: Eraro
title: Titolo
diff --git a/config/locales/es.yml b/config/locales/es.yml
index 957d852b807..bf4cc29fe32 100644
--- a/config/locales/es.yml
+++ b/config/locales/es.yml
@@ -681,9 +681,6 @@ es:
no_account_html: "¿No tienes una cuenta? Puedes <a href='%{sign_up_path}' target='_blank'>registrarte aqui</a>"
proceed: Proceder a seguir
prompt: 'Vas a seguir a:'
- remote_interaction:
- proceed: Proceder para interactuar
- prompt: 'Quieres interactuar con este toot:'
remote_unfollow:
error: Error
title: Título
diff --git a/config/locales/eu.yml b/config/locales/eu.yml
index 819e22b26d6..78fd4895880 100644
--- a/config/locales/eu.yml
+++ b/config/locales/eu.yml
@@ -698,9 +698,6 @@ eu:
no_account_html: Ez duzu konturik? <a href='%{sign_up_path}' target='_blank'>Izena eman</a> dezakezu
proceed: Ekin jarraitzeari
prompt: 'Hau jarraituko duzu:'
- remote_interaction:
- proceed: Jarraitu interakziora
- prompt: 'Toot honekin interakzioa nahi duzu:'
remote_unfollow:
error: Errorea
title: Izenburua
diff --git a/config/locales/fa.yml b/config/locales/fa.yml
index d8f89a91bb6..5fccefc6d08 100644
--- a/config/locales/fa.yml
+++ b/config/locales/fa.yml
@@ -681,9 +681,6 @@ fa:
no_account_html: هنوز عضو نیستید؟ <a href='%{sign_up_path}' target='_blank'>این‌جا می‌توانید حساب باز کنید</a>
proceed: درخواست پیگیری
prompt: 'شما قرار است این حساب را پیگیری کنید:'
- remote_interaction:
- proceed: ادامهٔ برهم‌کنش
- prompt: 'شما می‌خواهید دربارهٔ این بوق کاری کنید:'
remote_unfollow:
error: خطا
title: عنوان
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index b38e9f8e44f..85728811030 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -704,9 +704,6 @@ fr:
no_account_html: Vous n’avez pas de compte ? Vous pouvez <a href='%{sign_up_path}' target='_blank'>vous inscrire ici</a>
proceed: Confirmer l’abonnement
prompt: 'Vous allez suivre :'
- remote_interaction:
- proceed: Confirmer l’interaction
- prompt: 'Vous désirez interagir avec ce pouet :'
remote_unfollow:
error: Erreur
title: Titre
diff --git a/config/locales/gl.yml b/config/locales/gl.yml
index ac7d55cda3d..5908e773b9d 100644
--- a/config/locales/gl.yml
+++ b/config/locales/gl.yml
@@ -704,9 +704,6 @@ gl:
no_account_html: Non ten unha conta? Pode <a href='%{sign_up_path}' target='_blank'>rexistrarse aquí</a>
proceed: Proceda para seguir
prompt: 'Vostede vai seguir:'
- remote_interaction:
- proceed: Proceda para interactuar
- prompt: 'Vostede quere interactuar con este toot:'
remote_unfollow:
error: Fallo
title: Título
diff --git a/config/locales/it.yml b/config/locales/it.yml
index cc23b8cf7e4..0b96ef46a29 100644
--- a/config/locales/it.yml
+++ b/config/locales/it.yml
@@ -660,9 +660,6 @@ it:
no_account_html: Non hai un account? Puoi <a href='%{sign_up_path}' target='_blank'>iscriverti qui</a>
proceed: Conferma
prompt: 'Stai per seguire:'
- remote_interaction:
- proceed: Continua per interagire
- prompt: 'Vuoi interagire con questo toot:'
remote_unfollow:
error: Errore
title: Titolo
diff --git a/config/locales/ja.yml b/config/locales/ja.yml
index a8773c4d260..22965a5952f 100644
--- a/config/locales/ja.yml
+++ b/config/locales/ja.yml
@@ -703,9 +703,6 @@ ja:
no_account_html: アカウントをお持ちではないですか?<a href='%{sign_up_path}' target='_blank'>こちら</a>からサインアップできます
proceed: フォローする
prompt: 'フォローしようとしています:'
- remote_interaction:
- proceed: 進む
- prompt: 'このトゥートに返信しようとしています:'