Skip to content

Commit bb60ba2

Browse files
Merge pull request #10 from jesseplusplus/generalize-emails
Update emails
2 parents 6d03072 + bbec81a commit bb60ba2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+716
-715
lines changed

app/mailers/user_mailer.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ def confirmation_instructions(user, token, **)
1414
@resource = user
1515
@token = token
1616
@instance = Rails.configuration.x.local_domain
17+
@logo = InstancePresenter.new.email&.file&.url
1718

1819
return unless @resource.active_for_authentication?
1920

@@ -28,6 +29,7 @@ def reset_password_instructions(user, token, **)
2829
@resource = user
2930
@token = token
3031
@instance = Rails.configuration.x.local_domain
32+
@logo = InstancePresenter.new.email&.file&.url
3133

3234
return unless @resource.active_for_authentication?
3335

@@ -39,6 +41,7 @@ def reset_password_instructions(user, token, **)
3941
def password_change(user, **)
4042
@resource = user
4143
@instance = Rails.configuration.x.local_domain
44+
@logo = InstancePresenter.new.email&.file&.url
4245

4346
return unless @resource.active_for_authentication?
4447

@@ -50,6 +53,7 @@ def password_change(user, **)
5053
def email_changed(user, **)
5154
@resource = user
5255
@instance = Rails.configuration.x.local_domain
56+
@logo = InstancePresenter.new.email&.file&.url
5357

5458
return unless @resource.active_for_authentication?
5559

@@ -61,6 +65,7 @@ def email_changed(user, **)
6165
def two_factor_enabled(user, **)
6266
@resource = user
6367
@instance = Rails.configuration.x.local_domain
68+
@logo = InstancePresenter.new.email&.file&.url
6469

6570
return unless @resource.active_for_authentication?
6671

@@ -72,6 +77,7 @@ def two_factor_enabled(user, **)
7277
def two_factor_disabled(user, **)
7378
@resource = user
7479
@instance = Rails.configuration.x.local_domain
80+
@logo = InstancePresenter.new.email&.file&.url
7581

7682
return unless @resource.active_for_authentication?
7783

@@ -83,6 +89,7 @@ def two_factor_disabled(user, **)
8389
def two_factor_recovery_codes_changed(user, **)
8490
@resource = user
8591
@instance = Rails.configuration.x.local_domain
92+
@logo = InstancePresenter.new.email&.file&.url
8693

8794
return unless @resource.active_for_authentication?
8895

@@ -94,6 +101,7 @@ def two_factor_recovery_codes_changed(user, **)
94101
def webauthn_enabled(user, **)
95102
@resource = user
96103
@instance = Rails.configuration.x.local_domain
104+
@logo = InstancePresenter.new.email&.file&.url
97105

98106
return unless @resource.active_for_authentication?
99107

@@ -105,6 +113,7 @@ def webauthn_enabled(user, **)
105113
def webauthn_disabled(user, **)
106114
@resource = user
107115
@instance = Rails.configuration.x.local_domain
116+
@logo = InstancePresenter.new.email&.file&.url
108117

109118
return unless @resource.active_for_authentication?
110119

@@ -117,6 +126,7 @@ def webauthn_credential_added(user, webauthn_credential)
117126
@resource = user
118127
@instance = Rails.configuration.x.local_domain
119128
@webauthn_credential = webauthn_credential
129+
@logo = InstancePresenter.new.email&.file&.url
120130

121131
return unless @resource.active_for_authentication?
122132

@@ -129,6 +139,7 @@ def webauthn_credential_deleted(user, webauthn_credential)
129139
@resource = user
130140
@instance = Rails.configuration.x.local_domain
131141
@webauthn_credential = webauthn_credential
142+
@logo = InstancePresenter.new.email&.file&.url
132143

133144
return unless @resource.active_for_authentication?
134145

@@ -140,6 +151,7 @@ def webauthn_credential_deleted(user, webauthn_credential)
140151
def welcome(user)
141152
@resource = user
142153
@instance = Rails.configuration.x.local_domain
154+
@logo = InstancePresenter.new.email&.file&.url
143155

144156
return unless @resource.active_for_authentication?
145157

@@ -152,6 +164,7 @@ def backup_ready(user, backup)
152164
@resource = user
153165
@instance = Rails.configuration.x.local_domain
154166
@backup = backup
167+
@logo = InstancePresenter.new.email&.file&.url
155168

156169
return unless @resource.active_for_authentication?
157170

@@ -165,6 +178,7 @@ def warning(user, warning, status_ids = nil)
165178
@warning = warning
166179
@instance = Rails.configuration.x.local_domain
167180
@statuses = Status.where(id: status_ids).includes(:account) if status_ids.is_a?(Array)
181+
@logo = InstancePresenter.new.email&.file&.url
168182

169183
I18n.with_locale(@resource.locale || I18n.default_locale) do
170184
mail to: @resource.email,
@@ -180,6 +194,7 @@ def sign_in_token(user, remote_ip, user_agent, timestamp)
180194
@user_agent = user_agent
181195
@detection = Browser.new(user_agent)
182196
@timestamp = timestamp.to_time.utc
197+
@logo = InstancePresenter.new.email&.file&.url
183198

184199
return unless @resource.active_for_authentication?
185200

app/models/form/admin_settings.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class Form::AdminSettings
2828
thumbnail
2929
hero
3030
mascot
31+
email
3132
trends
3233
trendable_by_default
3334
show_domain_blocks
@@ -55,6 +56,7 @@ class Form::AdminSettings
5556
thumbnail
5657
hero
5758
mascot
59+
email
5860
).freeze
5961

6062
attr_accessor(*KEYS)

app/presenters/instance_presenter.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,8 @@ def hero
5959
def mascot
6060
@mascot ||= Rails.cache.fetch('site_uploads/mascot') { SiteUpload.find_by(var: 'mascot') }
6161
end
62+
63+
def email
64+
@email ||= Rails.cache.fetch('site_uploads/email') { SiteUpload.find_by(var: 'email') }
65+
end
6266
end

app/views/admin/settings/edit.html.haml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
.fields-row
4141
.fields-row__column.fields-row__column-6.fields-group
4242
= f.input :mascot, as: :file, wrapper: :with_block_label, label: t('admin.settings.mascot.title'), hint: site_upload_delete_hint(t('admin.settings.mascot.desc_html'), :mascot)
43+
.fields-row__column.fields-row__column-6.fields-group
44+
= f.input :email, as: :file, wrapper: :with_block_label, label: t('admin.settings.email.title'), hint: site_upload_delete_hint(t('admin.settings.email.desc_html'), :email)
4345

4446
%hr.spacer/
4547

app/views/layouts/mailer.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
%tr
2525
%td.column-cell
2626
= link_to root_url do
27-
= image_tag full_pack_url('media/images/mailer/logo_full.png'), alt: 'Mastodon', height: 34, class: 'logo'
27+
= image_tag (@logo || full_pack_url('media/images/mailer/logo_full.png')), alt: 'Mastodon', height: 34, class: 'logo'
2828

2929
= yield
3030

app/views/user_mailer/welcome.html.haml

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -96,26 +96,6 @@
9696
%td.button-primary
9797
= link_to settings_preferences_url do
9898
%span= t 'user_mailer.welcome.review_preferences_action'
99-
%tr
100-
%td.content-cell.padded-bottom
101-
.email-row
102-
.col-4
103-
%table.column{ cellspacing: 0, cellpadding: 0 }
104-
%tbody
105-
%tr
106-
%td.column-cell.padded
107-
= t 'user_mailer.welcome.final_step'
108-
.col-2
109-
%table.column{ cellspacing: 0, cellpadding: 0 }
110-
%tbody
111-
%tr
112-
%td.column-cell.padded
113-
%table.button.button-small{ align: 'left', cellspacing: 0, cellpadding: 0 }
114-
%tbody
115-
%tr
116-
%td.button-primary
117-
= link_to web_url do
118-
%span= t 'user_mailer.welcome.final_action'
11999

120100
%table.email-table{ cellspacing: 0, cellpadding: 0 }
121101
%tbody
@@ -135,10 +115,8 @@
135115
%h5= t 'user_mailer.welcome.tips'
136116
%ul
137117
%li
138-
%span= t 'user_mailer.welcome.tip_mobile_webapp'
118+
%span= t 'user_mailer.welcome.tip_privacy'
139119
%li
140120
%span= t 'user_mailer.welcome.tip_following'
141121
%li
142-
%span= t 'user_mailer.welcome.tip_local_timeline', instance: @instance
143-
%li
144-
%span= t 'user_mailer.welcome.tip_federated_timeline'
122+
%span= t 'user_mailer.welcome.tip_federation'

app/views/user_mailer/welcome.text.erb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
<%= t 'user_mailer.welcome.tips' %>
2525

26-
* <%= t 'user_mailer.welcome.tip_mobile_webapp' %>
26+
* <%= t 'user_mailer.welcome.tip_privacy' %>
2727
* <%= t 'user_mailer.welcome.tip_following' %>
28-
* <%= t 'user_mailer.welcome.tip_local_timeline', instance: @instance %>
29-
* <%= t 'user_mailer.welcome.tip_federated_timeline' %>
28+
* <%= t 'user_mailer.welcome.tip_federation' %>

config/locales/devise.ast.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@ ast:
1818
explanation: Creesti una cuenta en %{host} con esta direición de corréu. Tas a un calcu d'activala. Si nun fuisti tu, inora esti corréu.
1919
email_changed:
2020
explanation: 'La direición de corréu de la cuenta camudó a:'
21-
subject: 'Mastodón: Camudó la direición de corréu'
21+
subject: 'Camudó la direición de corréu'
2222
title: Direición nueva de corréu
2323
password_change:
2424
explanation: Camudó la contraseña de la cuenta.
25-
subject: 'Mastodon: Camudó la contraseña'
25+
subject: 'Camudó la contraseña'
2626
reset_password_instructions:
2727
explanation: Solicitesti una contraseña nueva pa la cuenta.
2828
extra: Si nun solicitesti esto, inora esti corréu. La contraseña nun va camudar hasta que nun accedas al enllaz d'enriba y crees una nueva.
29-
subject: 'Mastodon: Instrucciones pa reafitar la contraseña'
29+
subject: 'Instrucciones pa reafitar la contraseña'
3030
two_factor_disabled:
31-
subject: 'Mastodon: Desactivóse l''autenticación en dos pasos'
31+
subject: 'Desactivóse l''autenticación en dos pasos'
3232
two_factor_enabled:
33-
subject: 'Mastodon: Activóse l''autenticación en dos pasos'
33+
subject: 'Activóse l''autenticación en dos pasos'
3434
two_factor_recovery_codes_changed:
35-
subject: 'Mastodon: Rexeneráronse los códigos de l''autenticación en dos pasos'
35+
subject: 'Rexeneráronse los códigos de l''autenticación en dos pasos'
3636
unlock_instructions:
37-
subject: 'Mastodon: Instrucciones de desbloquéu'
37+
subject: 'Instrucciones de desbloquéu'
3838
passwords:
3939
send_instructions: Si la direición de corréu esiste na base de datos, nunos minutos vas recibir un enllaz pa recuperar la contraseña a esi corréu. Comprueba la carpeta Puxarra si nun lu recibiesti.
4040
send_paranoid_instructions: Si la direición de corréu esiste na base de datos, nunos minutos vas recibir un enllaz pa recuperar la contraseña a esi corréu. Comprueba la carpeta Puxarra si nun lu recibiesti.

config/locales/devise.bg.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,22 @@ bg:
2323
explanation: Създали сте акаунт на %{host} с този имейл адрес. Само на едно щракване разстояние сте от активирането му. Ако това не сте били вие, моля, игнорирайте този имейл.
2424
explanation_when_pending: Кандидатствахте за покана до %{host} с този имейл адрес. След като потвърдите своя имейл адрес, ние ще разгледаме вашето заявление. Можете да влезете, за да промените данните си или да изтриете акаунта си, но нямате достъп до повечето функции, докато акаунтът ви не бъде одобрен. Ако вашето заявление бъде отхвърлено, вашите данни ще бъдат премахнати, така че няма да се изискват допълнителни действия от вас. Ако това не сте били вие, моля, игнорирайте този имейл.
2525
extra_html: Моля, проверете <a href="%{terms_path}">правилата на сървъра</a> и <a href="%{policy_path}">нашите условия за обслужване</a>.
26-
subject: 'Mastodon: Инструкции за потвърждаване %{instance}'
26+
subject: 'Инструкции за потвърждаване %{instance}'
2727
title: Потвърдете имейл адреса
2828
email_changed:
2929
explanation: 'Имейл адресът на вашия акаунт се променя на:'
3030
extra: Ако не сте сменили имейла си, вероятно някой е получил достъп до вашия акаунт. Моля, сменете паролата си незабавно или се свържете с администратора на сървъра, ако сте блокирани от акаунта си.
31-
subject: 'Mastodon: Имейлът е променен'
31+
subject: 'Имейлът е променен'
3232
title: Нов имейл адрес
3333
password_change:
3434
explanation: Паролата за вашия акаунт е променена.
3535
extra: Ако не сте променили паролата си, вероятно някой е получил достъп до вашия акаунт. Моля, сменете паролата си незабавно или се свържете с администратора на сървъра, ако сте блокирани от акаунта си.
36-
subject: 'Mastodon: Паролата е променена'
36+
subject: 'Паролата е променена'
3737
title: Паролата е променена
3838
reconfirmation_instructions:
3939
explanation: Потвърдете новия адрес, за да промените имейла си.
4040
extra: Ако тази промяна не е инициирана от вас, моля, игнорирайте този имейл. Имейл адресът за акаунта на Mastodon няма да се промени, докато не влезете във връзката по-горе.
41-
subject: 'Mastodon: Потвърдете имейла за %{instance}'
41+
subject: 'Потвърдете имейла за %{instance}'
4242
title: Потвърдете имейл адреса
4343
reset_password_instructions:
4444
action: Промяна на парола
@@ -48,34 +48,34 @@ bg:
4848
title: Нулиране на парола
4949
two_factor_disabled:
5050
explanation: Двуфакторното удостоверяване за вашия акаунт е деактивирано. Влизането вече е възможно, като се използват само имейл адрес и парола.
51-
subject: 'Mastodon: Двуфакторното удостоверяване е деактивирано'
51+
subject: 'Двуфакторното удостоверяване е деактивирано'
5252
title: 2FA деактивирано
5353
two_factor_enabled:
5454
explanation: За вашия акаунт е активирано двуфакторно удостоверяване. За влизане ще е необходим ключ, генериран от сдвоеното приложение TOTP.
55-
subject: 'Mastodon: Двуфакторното удостоверяване е активирано'
55+
subject: 'Двуфакторното удостоверяване е активирано'
5656
title: 2FA активирано
5757
two_factor_recovery_codes_changed:
5858
explanation: Предишните кодове за възстановяване са обезсилени и се генерират нови.
59-
subject: 'Mastodon: Възстановени са двуфакторни кодове за възстановяване'
59+
subject: 'Възстановени са двуфакторни кодове за възстановяване'
6060
title: 2FA кодове за възстановяване са променени
6161
unlock_instructions:
6262
subject: Инструкции за отключване
6363
webauthn_credential:
6464
added:
6565
explanation: Следният ключ за сигурност е добавен към вашия акаунт
66-
subject: 'Mastodon: Нов ключ за сигурност'
66+
subject: 'Нов ключ за сигурност'
6767
title: Добавен е нов ключ за сигурност
6868
deleted:
6969
explanation: Следният ключ за сигурност е изтрит от вашия акаунт
70-
subject: 'Mastodon: Ключът за сигурност е изтрит'
70+
subject: 'Ключът за сигурност е изтрит'
7171
title: Един от вашите ключове за сигурност е изтрит
7272
webauthn_disabled:
7373
explanation: Удостоверяването с ключове за сигурност е деактивирано за вашия акаунт. Влизането вече е възможно, използвайки само ключа, генериран от сдвоеното приложение TOTP.
74-
subject: 'Mastodon: Удостоверяването с ключове за сигурност е деактивирано'
74+
subject: 'Удостоверяването с ключове за сигурност е деактивирано'
7575
title: Ключовете за сигурност са деактивирани
7676
webauthn_enabled:
7777
explanation: Удостоверяването с ключ за сигурност е активирано за вашия акаунт. Вашият ключ за сигурност вече може да се използва за вход.
78-
subject: 'Mastodon: Активирано удостоверяване с ключ за сигурност'
78+
subject: 'Активирано удостоверяване с ключ за сигурност'
7979
title: Ключовете за сигурност са активирани
8080
omniauth_callbacks:
8181
failure: Не успяхме да те упълномощим чрез %{kind}, защото "%{reason}".

0 commit comments

Comments
 (0)