From 704053d22172de4924d0fc7baa7ad1a93df697bc Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Fri, 12 Jan 2018 10:44:28 +0900 Subject: [PATCH 01/72] Handle sessions that can't be translated (#6245) * Handle sessions that can't be translated This commit fixes #6165. * Fix typo --- app/views/auth/registrations/_sessions.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/auth/registrations/_sessions.html.haml b/app/views/auth/registrations/_sessions.html.haml index c1e9764b3..8424a8901 100644 --- a/app/views/auth/registrations/_sessions.html.haml +++ b/app/views/auth/registrations/_sessions.html.haml @@ -16,7 +16,7 @@ %span{ title: session.user_agent }< = fa_icon "#{session_device_icon(session)} fw", 'aria-label' => session_device_icon(session) = ' ' - = t 'sessions.description', browser: t("sessions.browsers.#{session.browser}"), platform: t("sessions.platforms.#{session.platform}") + = t 'sessions.description', browser: t("sessions.browsers.#{session.browser}", default: "#{session.browser}"), platform: t("sessions.platforms.#{session.platform}", default: "#{session.platform}") %td %samp= session.ip %td From 08e4c78e78358c2847967e9cc34b4a6497be97e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B4=20Shoemake?= Date: Sun, 14 Jan 2018 19:33:06 -0800 Subject: [PATCH 02/72] Fix column headers accessibility (#6199) * Fix accessibility of column headers As a screen reader user new to Mastodon, I encountered the following issues with the column headers as designed: * Jumping between them was difficult. FOr instance, passing my home timeline to reach notification settings was difficult to impossible, especially considering infinite scrolling. * There doesn't appear to be any means for triggering the control via the keyboard. the `titleClick` handler only responds to mouse clicks. * I didn't even realize there was a Settings toggle until I made this change. Thanks for using ARIA in your designs. It's a huge help. But adding a `button` role doesn't add keyboard handling and other button behavior. Also, because the role was on the heading container, it obscured the controls within the container itself. This fix resolve that. It also exposes the headings as headings rather than buttons, enabling skipping columns by using screen readers' heading navigation commands. Since I myself am blind, if this fix requires additional visual styling, I'd like help applying that so it can be merged. I'd consider it an essential accessibility fix for my and other blind users' existence on the platform. Thanks! * Styling fixes * Fixed overflow issue --- .../mastodon/components/column_header.js | 19 ++++++++----------- .../styles/mastodon/components.scss | 13 +++++++++++++ 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/app/javascript/mastodon/components/column_header.js b/app/javascript/mastodon/components/column_header.js index 80a8fbdb3..c300db89b 100644 --- a/app/javascript/mastodon/components/column_header.js +++ b/app/javascript/mastodon/components/column_header.js @@ -23,7 +23,6 @@ export default class ColumnHeader extends React.PureComponent { icon: PropTypes.string.isRequired, active: PropTypes.bool, multiColumn: PropTypes.bool, - focusable: PropTypes.bool, showBackButton: PropTypes.bool, children: PropTypes.node, pinned: PropTypes.bool, @@ -32,10 +31,6 @@ export default class ColumnHeader extends React.PureComponent { onClick: PropTypes.func, }; - static defaultProps = { - focusable: true, - } - state = { collapsed: true, animating: false, @@ -68,7 +63,7 @@ export default class ColumnHeader extends React.PureComponent { } render () { - const { title, icon, active, children, pinned, onPin, multiColumn, focusable, showBackButton, intl: { formatMessage } } = this.props; + const { title, icon, active, children, pinned, onPin, multiColumn, showBackButton, intl: { formatMessage } } = this.props; const { collapsed, animating } = this.state; const wrapperClassName = classNames('column-header__wrapper', { @@ -135,11 +130,13 @@ export default class ColumnHeader extends React.PureComponent { return (
-

- - - {title} - +

+
{backButton} diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index dec489e9a..e8adceb66 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -2350,6 +2350,19 @@ position: relative; z-index: 2; outline: 0; + overflow: hidden; + + & > button { + display: flex; + flex: auto; + margin: 0; + border: none; + padding: 0; + color: inherit; + background: transparent; + font: inherit; + text-align: left; + } &.active { box-shadow: 0 1px 0 rgba($ui-highlight-color, 0.3); From ed867eca9dbd7d798bc7179dbc13c4f1edc238ad Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 15 Jan 2018 04:34:28 +0100 Subject: [PATCH 03/72] Move e-mail digest task to sidekiq, reduce workload, improve hint (#6252) --- app/models/user.rb | 4 ++++ app/workers/digest_mailer_worker.rb | 6 +----- app/workers/scheduler/email_scheduler.rb | 24 ++++++++++++++++++++++++ config/locales/simple_form.en.yml | 2 +- config/sidekiq.yml | 3 +++ lib/tasks/mastodon.rake | 7 +++---- 6 files changed, 36 insertions(+), 10 deletions(-) create mode 100644 app/workers/scheduler/email_scheduler.rb diff --git a/app/models/user.rb b/app/models/user.rb index 9459db7fe..892a07bba 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -170,6 +170,10 @@ class User < ApplicationRecord settings.default_privacy || (account.locked? ? 'private' : 'public') end + def allows_digest_emails? + settings.notification_emails['digest'] + end + def token_for_app(a) return nil if a.nil? || a.owner != self Doorkeeper::AccessToken diff --git a/app/workers/digest_mailer_worker.rb b/app/workers/digest_mailer_worker.rb index 028db89a9..21f1c357a 100644 --- a/app/workers/digest_mailer_worker.rb +++ b/app/workers/digest_mailer_worker.rb @@ -9,7 +9,7 @@ class DigestMailerWorker def perform(user_id) @user = User.find(user_id) - deliver_digest if user_receives_digest? + deliver_digest if @user.allows_digest_emails? end private @@ -18,8 +18,4 @@ class DigestMailerWorker NotificationMailer.digest(user.account).deliver_now! user.touch(:last_emailed_at) end - - def user_receives_digest? - user.settings.notification_emails['digest'] - end end diff --git a/app/workers/scheduler/email_scheduler.rb b/app/workers/scheduler/email_scheduler.rb new file mode 100644 index 000000000..24d0c0ebe --- /dev/null +++ b/app/workers/scheduler/email_scheduler.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +require 'sidekiq-scheduler' + +class Scheduler::EmailScheduler + include Sidekiq::Worker + + def perform + eligible_users.find_each do |user| + next unless user.allows_digest_emails? + DigestMailerWorker.perform_async(user.id) + end + end + + private + + def eligible_users + User.confirmed + .joins(:account) + .where(accounts: { silenced: false, suspended: false }) + .where(disabled: false) + .where('current_sign_in_at < ?', 20.days.ago) + .where('last_emailed_at IS NULL OR last_emailed_at < ?', 20.days.ago) + end +end diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index ff1a40ccd..143daaa29 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -4,7 +4,7 @@ en: hints: defaults: avatar: PNG, GIF or JPG. At most 2MB. Will be downscaled to 120x120px - digest: Sent after a long period of inactivity with a summary of mentions you've received in your absence + digest: Only sent after a long period of inactivity and only if you have received any personal messages in your absence display_name: one: 1 character left other: %{count} characters left diff --git a/config/sidekiq.yml b/config/sidekiq.yml index 4c35dcd43..bfe29b8f8 100644 --- a/config/sidekiq.yml +++ b/config/sidekiq.yml @@ -27,3 +27,6 @@ ip_cleanup_scheduler: cron: '<%= Random.rand(0..59) %> <%= Random.rand(3..5) %> * * *' class: Scheduler::IpCleanupScheduler + email_scheduler: + cron: '0 10 * * 2' + class: Scheduler::EmailScheduler diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index 33969d470..38dbed982 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -171,11 +171,10 @@ namespace :mastodon do end namespace :emails do - desc 'Send out digest e-mails' + desc 'Send out digest e-mails (deprecated)' task digest: :environment do - User.confirmed.joins(:account).where(accounts: { silenced: false, suspended: false }).where('current_sign_in_at < ?', 20.days.ago).find_each do |user| - DigestMailerWorker.perform_async(user.id) - end + # No-op + # This task is now executed via sidekiq-scheduler end end From dcc614f869b9484fc3aa601405d7e1988e166403 Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Mon, 15 Jan 2018 14:50:29 +0900 Subject: [PATCH 04/72] Add some browsers (#6246) Related: #6165 --- config/locales/en.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/locales/en.yml b/config/locales/en.yml index e4425b424..23dce73e9 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -552,12 +552,14 @@ en: blackberry: Blackberry chrome: Chrome edge: Microsoft Edge + electron: Electron firefox: Firefox generic: Unknown browser ie: Internet Explorer micro_messenger: MicroMessenger nokia: Nokia S40 Ovi Browser opera: Opera + otter: Otter phantom_js: PhantomJS qq: QQ Browser safari: Safari From 2091ae92be5d04cd4dadb2200c507ce8d8d2623e Mon Sep 17 00:00:00 2001 From: neetshin Date: Mon, 15 Jan 2018 05:51:00 +0000 Subject: [PATCH 05/72] Make columns-area unscrollable when modal opened (#6241) * Add aria-autocomplete='list' in Textaria ref: https://www.w3.org/TR/wai-aria-1.1/#aria-autocomplete * Make detect empty string brefore assign upload description * Change code elements in keyboard-shortcuts component to kbd * Add validation for onMuteNotifications * Make columns-area unscrollable when modal opend * Make columns-area unscrollable when modal opened --- .../mastodon/features/ui/components/columns_area.js | 5 +++-- .../features/ui/containers/columns_area_container.js | 1 + app/javascript/styles/mastodon/components.scss | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/features/ui/components/columns_area.js b/app/javascript/mastodon/features/ui/components/columns_area.js index f00b74dfd..a01e5a390 100644 --- a/app/javascript/mastodon/features/ui/components/columns_area.js +++ b/app/javascript/mastodon/features/ui/components/columns_area.js @@ -37,6 +37,7 @@ export default class ColumnsArea extends ImmutablePureComponent { static propTypes = { intl: PropTypes.object.isRequired, columns: ImmutablePropTypes.list.isRequired, + isModalOpen: PropTypes.bool.isRequired, singleColumn: PropTypes.bool, children: PropTypes.node, }; @@ -144,7 +145,7 @@ export default class ColumnsArea extends ImmutablePureComponent { } render () { - const { columns, children, singleColumn } = this.props; + const { columns, children, singleColumn, isModalOpen } = this.props; const { shouldAnimate } = this.state; const columnIndex = getIndex(this.context.router.history.location.pathname); @@ -159,7 +160,7 @@ export default class ColumnsArea extends ImmutablePureComponent { } return ( -
+
{columns.map(column => { const params = column.get('params', null) === null ? null : column.get('params').toJS(); diff --git a/app/javascript/mastodon/features/ui/containers/columns_area_container.js b/app/javascript/mastodon/features/ui/containers/columns_area_container.js index 95f95618b..f3e82a8ac 100644 --- a/app/javascript/mastodon/features/ui/containers/columns_area_container.js +++ b/app/javascript/mastodon/features/ui/containers/columns_area_container.js @@ -3,6 +3,7 @@ import ColumnsArea from '../components/columns_area'; const mapStateToProps = state => ({ columns: state.getIn(['settings', 'columns']), + isModalOpen: !!state.get('modal').modalType, }); export default connect(mapStateToProps, null, null, { withRef: true })(ColumnsArea); diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index e8adceb66..dbb277af9 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -1613,6 +1613,10 @@ justify-content: flex-start; overflow-x: auto; position: relative; + + &.unscrollable { + overflow-x: hidden; + } } @media screen and (min-width: 360px) { From 537d2939b10df9121e5a9f13a9d66c568ff681bf Mon Sep 17 00:00:00 2001 From: Patrick Figel Date: Mon, 15 Jan 2018 06:51:23 +0100 Subject: [PATCH 06/72] Suppress CSRF token warnings (#6240) CSRF token checking was enabled for API controllers in #6223, producing "Can't verify CSRF token authenticity" log spam. This disables logging of failed CSRF checks. This also changes the protection strategy for PushSubscriptionsController to use exceptions, making it consistent with other controllers that use sessions. --- app/controllers/api/web/push_subscriptions_controller.rb | 1 + config/initializers/suppress_csrf_warnings.rb | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 config/initializers/suppress_csrf_warnings.rb diff --git a/app/controllers/api/web/push_subscriptions_controller.rb b/app/controllers/api/web/push_subscriptions_controller.rb index 52e250d02..68ccbd5e2 100644 --- a/app/controllers/api/web/push_subscriptions_controller.rb +++ b/app/controllers/api/web/push_subscriptions_controller.rb @@ -4,6 +4,7 @@ class Api::Web::PushSubscriptionsController < Api::BaseController respond_to :json before_action :require_user! + protect_from_forgery with: :exception def create params.require(:subscription).require(:endpoint) diff --git a/config/initializers/suppress_csrf_warnings.rb b/config/initializers/suppress_csrf_warnings.rb new file mode 100644 index 000000000..410ab585b --- /dev/null +++ b/config/initializers/suppress_csrf_warnings.rb @@ -0,0 +1,3 @@ +# frozen_string_literal: true + +ActionController::Base.log_warning_on_csrf_failure = false From 74c1c9ec01addc7474d74712f76fb6d6d5eecdf7 Mon Sep 17 00:00:00 2001 From: puckipedia Date: Mon, 15 Jan 2018 06:51:46 +0100 Subject: [PATCH 07/72] Allow attributedTo in a status to be an embedded object (#6238) --- app/services/activitypub/fetch_remote_status_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/activitypub/fetch_remote_status_service.rb b/app/services/activitypub/fetch_remote_status_service.rb index 7649bceca..503c175d8 100644 --- a/app/services/activitypub/fetch_remote_status_service.rb +++ b/app/services/activitypub/fetch_remote_status_service.rb @@ -30,7 +30,7 @@ class ActivityPub::FetchRemoteStatusService < BaseService end def actor_id - first_of_value(@json['attributedTo']) + value_or_id(first_of_value(@json['attributedTo'])) end def trustworthy_attribution?(uri, attributed_to) From 3987bd18a4bfaee49ea9a3439fc51610aeca6c2c Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 15 Jan 2018 18:42:15 +0100 Subject: [PATCH 08/72] Fix #6128 - Display unfollow button even if account moved (#6258) --- app/javascript/mastodon/components/account.js | 2 +- app/javascript/mastodon/features/account/components/header.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/components/account.js b/app/javascript/mastodon/components/account.js index 81459731c..a3642e61d 100644 --- a/app/javascript/mastodon/components/account.js +++ b/app/javascript/mastodon/components/account.js @@ -93,7 +93,7 @@ export default class Account extends ImmutablePureComponent { {hidingNotificationsButton} ); - } else if (!account.get('moved')) { + } else if (!account.get('moved') || following) { buttons = ; } } diff --git a/app/javascript/mastodon/features/account/components/header.js b/app/javascript/mastodon/features/account/components/header.js index b2399ae9b..0225e7308 100644 --- a/app/javascript/mastodon/features/account/components/header.js +++ b/app/javascript/mastodon/features/account/components/header.js @@ -103,7 +103,7 @@ export default class Header extends ImmutablePureComponent { } } - if (account.get('moved')) { + if (account.get('moved') && !account.getIn(['relationship', 'following'])) { actionBtn = ''; } From 7861c5f108a8f8cb0450f3b1ef865b1177c706fc Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 15 Jan 2018 18:55:10 +0100 Subject: [PATCH 09/72] Surround mid-text display names with bdi tags (#6257) * Fix #1095 - Surround mid-text display names with bdi tags * Update jest snapshot --- .../__snapshots__/display_name-test.js.snap | 16 +++++++++------- .../mastodon/components/display_name.js | 2 +- app/javascript/mastodon/components/status.js | 2 +- .../account_timeline/components/moved_note.js | 2 +- .../notifications/components/notification.js | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/app/javascript/mastodon/components/__tests__/__snapshots__/display_name-test.js.snap b/app/javascript/mastodon/components/__tests__/__snapshots__/display_name-test.js.snap index 533359ffe..29fdc2412 100644 --- a/app/javascript/mastodon/components/__tests__/__snapshots__/display_name-test.js.snap +++ b/app/javascript/mastodon/components/__tests__/__snapshots__/display_name-test.js.snap @@ -4,14 +4,16 @@ exports[` renders display name + account name 1`] = ` - Foo

", + + Foo

", + } } - } - /> + /> +
- @{this.props.account.get('acct')} + @{this.props.account.get('acct')} ); } diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index d23ff87fa..2600d68ad 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -162,7 +162,7 @@ export default class Status extends ImmutablePureComponent { prepend = (
- }} /> + }} />
); diff --git a/app/javascript/mastodon/features/account_timeline/components/moved_note.js b/app/javascript/mastodon/features/account_timeline/components/moved_note.js index 1c0e081cc..280389bba 100644 --- a/app/javascript/mastodon/features/account_timeline/components/moved_note.js +++ b/app/javascript/mastodon/features/account_timeline/components/moved_note.js @@ -34,7 +34,7 @@ export default class MovedNote extends ImmutablePureComponent {
- }} /> + }} />
diff --git a/app/javascript/mastodon/features/notifications/components/notification.js b/app/javascript/mastodon/features/notifications/components/notification.js index 9d170cad5..6db62b330 100644 --- a/app/javascript/mastodon/features/notifications/components/notification.js +++ b/app/javascript/mastodon/features/notifications/components/notification.js @@ -133,7 +133,7 @@ export default class Notification extends ImmutablePureComponent { const { notification } = this.props; const account = notification.get('account'); const displayNameHtml = { __html: account.get('display_name_html') }; - const link = ; + const link = ; switch(notification.get('type')) { case 'follow': From 5276c0a0900a0886b59a8ead2346540aa381ea46 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 16 Jan 2018 03:29:11 +0100 Subject: [PATCH 10/72] HTML e-mails for UserMailer (#6256) - premailer gem to turn CSS into inline styles automatically - rework UserMailer templates - reword UserMailer templates --- Gemfile | 1 + Gemfile.lock | 10 + app/helpers/mailer_helper.rb | 4 + app/javascript/images/icon_email.svg | 4 + app/javascript/images/icon_lock_open.svg | 4 + app/javascript/images/logo_transparent.svg | 1 + app/javascript/packs/mailer.js | 1 + app/javascript/styles/mailer.scss | 392 ++++++++++++++++++ app/mailers/admin_mailer.rb | 4 +- app/mailers/application_mailer.rb | 2 + app/mailers/notification_mailer.rb | 4 +- app/views/layouts/mailer.html.haml | 55 +++ app/views/layouts/plain_mailer.html.haml | 1 + .../confirmation_instructions.ar.html.erb | 12 - .../confirmation_instructions.ca.html.erb | 12 - .../confirmation_instructions.en.html.erb | 15 - .../confirmation_instructions.es.html.erb | 12 - .../confirmation_instructions.fa.html.erb | 12 - .../confirmation_instructions.fi.html.erb | 5 - .../confirmation_instructions.fr.html.erb | 14 - .../confirmation_instructions.he.html.erb | 14 - .../confirmation_instructions.html.haml | 76 ++++ .../confirmation_instructions.id.html.erb | 12 - .../confirmation_instructions.it.html.erb | 12 - .../confirmation_instructions.ja.html.erb | 11 - .../confirmation_instructions.ko.html.erb | 13 - .../confirmation_instructions.nl.html.erb | 12 - .../confirmation_instructions.no.html.erb | 12 - .../confirmation_instructions.oc.html.erb | 14 - .../confirmation_instructions.pl.html.erb | 12 - .../confirmation_instructions.pt-BR.html.erb | 12 - .../confirmation_instructions.ru.html.erb | 12 - ...confirmation_instructions.sr-Latn.html.erb | 15 - .../confirmation_instructions.sr.html.erb | 15 - .../confirmation_instructions.sv.html.erb | 15 - .../confirmation_instructions.tr.html.erb | 15 - .../confirmation_instructions.zh-cn.html.erb | 13 - .../user_mailer/email_changed.en.html.erb | 15 - app/views/user_mailer/email_changed.html.haml | 58 +++ .../user_mailer/email_changed.ja.html.erb | 13 - .../user_mailer/email_changed.oc.html.erb | 15 - .../user_mailer/email_changed.pl.html.erb | 15 - .../user_mailer/email_changed.zh-cn.html.erb | 13 - .../user_mailer/password_change.ar.html.erb | 3 - .../user_mailer/password_change.ca.html.erb | 3 - .../user_mailer/password_change.en.html.erb | 3 - .../user_mailer/password_change.es.html.erb | 3 - .../user_mailer/password_change.fa.html.erb | 3 - .../user_mailer/password_change.fi.html.erb | 3 - .../user_mailer/password_change.fr.html.erb | 3 - .../user_mailer/password_change.he.html.erb | 4 - .../user_mailer/password_change.html.haml | 40 ++ .../user_mailer/password_change.id.html.erb | 3 - .../user_mailer/password_change.it.html.erb | 3 - .../user_mailer/password_change.ja.html.erb | 3 - .../user_mailer/password_change.nl.html.erb | 3 - .../user_mailer/password_change.no.html.erb | 3 - .../user_mailer/password_change.oc.html.erb | 3 - .../user_mailer/password_change.pl.html.erb | 3 - .../password_change.pt-BR.html.erb | 3 - .../user_mailer/password_change.ru.html.erb | 3 - .../password_change.sr-Latn.html.erb | 3 - .../user_mailer/password_change.sr.html.erb | 3 - .../user_mailer/password_change.sv.html.erb | 3 - .../user_mailer/password_change.th.html.erb | 3 - .../user_mailer/password_change.tr.html.erb | 8 - .../password_change.zh-cn.html.erb | 3 - .../reconfirmation_instructions.en.html.erb | 15 - .../reconfirmation_instructions.html.haml | 60 +++ .../reconfirmation_instructions.ja.html.erb | 13 - .../reconfirmation_instructions.oc.html.erb | 15 - .../reconfirmation_instructions.pl.html.erb | 15 - ...reconfirmation_instructions.zh-cn.html.erb | 13 - .../reset_password_instructions.ar.html.erb | 8 - .../reset_password_instructions.ca.html.erb | 8 - .../reset_password_instructions.en.html.erb | 8 - .../reset_password_instructions.es.html.erb | 8 - .../reset_password_instructions.fa.html.erb | 8 - .../reset_password_instructions.fi.html.erb | 8 - .../reset_password_instructions.fr.html.erb | 8 - .../reset_password_instructions.he.html.erb | 10 - .../reset_password_instructions.html.haml | 60 +++ .../reset_password_instructions.id.html.erb | 8 - .../reset_password_instructions.it.html.erb | 8 - .../reset_password_instructions.ja.html.erb | 8 - .../reset_password_instructions.nl.html.erb | 9 - .../reset_password_instructions.no.html.erb | 9 - .../reset_password_instructions.oc.html.erb | 8 - .../reset_password_instructions.pl.html.erb | 9 - ...reset_password_instructions.pt-BR.html.erb | 8 - .../reset_password_instructions.ru.html.erb | 8 - ...set_password_instructions.sr-Latn.html.erb | 8 - .../reset_password_instructions.sr.html.erb | 8 - .../reset_password_instructions.sv.html.erb | 8 - .../reset_password_instructions.th.html.erb | 8 - .../reset_password_instructions.tr.html.erb | 14 - ...reset_password_instructions.zh-cn.html.erb | 8 - config/initializers/assets.rb | 2 +- config/initializers/premailer_rails.rb | 6 + config/locales/devise.en.yml | 17 + config/locales/en.yml | 1 + lib/mastodon/premailer_webpack_strategy.rb | 15 + .../previews/notification_mailer_preview.rb | 1 + spec/mailers/previews/user_mailer_preview.rb | 32 ++ 104 files changed, 848 insertions(+), 706 deletions(-) create mode 100644 app/helpers/mailer_helper.rb create mode 100644 app/javascript/images/icon_email.svg create mode 100644 app/javascript/images/icon_lock_open.svg create mode 100644 app/javascript/images/logo_transparent.svg create mode 100644 app/javascript/packs/mailer.js create mode 100644 app/javascript/styles/mailer.scss create mode 100644 app/views/layouts/mailer.html.haml create mode 100644 app/views/layouts/plain_mailer.html.haml delete mode 100644 app/views/user_mailer/confirmation_instructions.ar.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.ca.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.en.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.es.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.fa.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.fi.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.fr.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.he.html.erb create mode 100644 app/views/user_mailer/confirmation_instructions.html.haml delete mode 100644 app/views/user_mailer/confirmation_instructions.id.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.it.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.ja.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.ko.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.nl.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.no.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.oc.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.pl.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.pt-BR.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.ru.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.sr-Latn.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.sr.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.sv.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.tr.html.erb delete mode 100644 app/views/user_mailer/confirmation_instructions.zh-cn.html.erb delete mode 100644 app/views/user_mailer/email_changed.en.html.erb create mode 100644 app/views/user_mailer/email_changed.html.haml delete mode 100644 app/views/user_mailer/email_changed.ja.html.erb delete mode 100644 app/views/user_mailer/email_changed.oc.html.erb delete mode 100644 app/views/user_mailer/email_changed.pl.html.erb delete mode 100644 app/views/user_mailer/email_changed.zh-cn.html.erb delete mode 100644 app/views/user_mailer/password_change.ar.html.erb delete mode 100644 app/views/user_mailer/password_change.ca.html.erb delete mode 100644 app/views/user_mailer/password_change.en.html.erb delete mode 100644 app/views/user_mailer/password_change.es.html.erb delete mode 100644 app/views/user_mailer/password_change.fa.html.erb delete mode 100644 app/views/user_mailer/password_change.fi.html.erb delete mode 100644 app/views/user_mailer/password_change.fr.html.erb delete mode 100644 app/views/user_mailer/password_change.he.html.erb create mode 100644 app/views/user_mailer/password_change.html.haml delete mode 100644 app/views/user_mailer/password_change.id.html.erb delete mode 100644 app/views/user_mailer/password_change.it.html.erb delete mode 100644 app/views/user_mailer/password_change.ja.html.erb delete mode 100644 app/views/user_mailer/password_change.nl.html.erb delete mode 100644 app/views/user_mailer/password_change.no.html.erb delete mode 100644 app/views/user_mailer/password_change.oc.html.erb delete mode 100644 app/views/user_mailer/password_change.pl.html.erb delete mode 100644 app/views/user_mailer/password_change.pt-BR.html.erb delete mode 100644 app/views/user_mailer/password_change.ru.html.erb delete mode 100644 app/views/user_mailer/password_change.sr-Latn.html.erb delete mode 100644 app/views/user_mailer/password_change.sr.html.erb delete mode 100644 app/views/user_mailer/password_change.sv.html.erb delete mode 100644 app/views/user_mailer/password_change.th.html.erb delete mode 100644 app/views/user_mailer/password_change.tr.html.erb delete mode 100644 app/views/user_mailer/password_change.zh-cn.html.erb delete mode 100644 app/views/user_mailer/reconfirmation_instructions.en.html.erb create mode 100644 app/views/user_mailer/reconfirmation_instructions.html.haml delete mode 100644 app/views/user_mailer/reconfirmation_instructions.ja.html.erb delete mode 100644 app/views/user_mailer/reconfirmation_instructions.oc.html.erb delete mode 100644 app/views/user_mailer/reconfirmation_instructions.pl.html.erb delete mode 100644 app/views/user_mailer/reconfirmation_instructions.zh-cn.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.ar.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.ca.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.en.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.es.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.fa.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.fi.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.fr.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.he.html.erb create mode 100644 app/views/user_mailer/reset_password_instructions.html.haml delete mode 100644 app/views/user_mailer/reset_password_instructions.id.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.it.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.ja.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.nl.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.no.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.oc.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.pl.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.pt-BR.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.ru.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.sr-Latn.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.sr.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.sv.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.th.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.tr.html.erb delete mode 100644 app/views/user_mailer/reset_password_instructions.zh-cn.html.erb create mode 100644 config/initializers/premailer_rails.rb create mode 100644 lib/mastodon/premailer_webpack_strategy.rb create mode 100644 spec/mailers/previews/user_mailer_preview.rb diff --git a/Gemfile b/Gemfile index a5bf2daff..84578fc36 100644 --- a/Gemfile +++ b/Gemfile @@ -49,6 +49,7 @@ gem 'oj', '~> 3.3' gem 'ostatus2', '~> 2.0' gem 'ox', '~> 2.8' gem 'pundit', '~> 1.1' +gem 'premailer-rails' gem 'rack-attack', '~> 5.0' gem 'rack-cors', '~> 0.4', require: 'rack/cors' gem 'rack-timeout', '~> 0.4' diff --git a/Gemfile.lock b/Gemfile.lock index f3887b2b8..12c6d0e47 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -122,6 +122,8 @@ GEM crack (0.4.3) safe_yaml (~> 1.0.0) crass (1.0.3) + css_parser (1.6.0) + addressable debug_inspector (0.0.3) devise (4.3.0) bcrypt (~> 3.0) @@ -324,6 +326,13 @@ GEM activerecord pkg-config (1.2.8) powerpack (0.1.1) + premailer (1.11.1) + addressable + css_parser (>= 1.6.0) + htmlentities (>= 4.0.0) + premailer-rails (1.10.1) + actionmailer (>= 3, < 6) + premailer (~> 1.7, >= 1.7.9) pry (0.11.3) coderay (~> 1.1.0) method_source (~> 0.9.0) @@ -600,6 +609,7 @@ DEPENDENCIES pg (~> 0.20) pghero (~> 1.7) pkg-config (~> 1.2) + premailer-rails pry-rails (~> 0.3) puma (~> 3.10) pundit (~> 1.1) diff --git a/app/helpers/mailer_helper.rb b/app/helpers/mailer_helper.rb new file mode 100644 index 000000000..b7e3a8da3 --- /dev/null +++ b/app/helpers/mailer_helper.rb @@ -0,0 +1,4 @@ +# frozen_string_literal: true + +module MailerHelper +end diff --git a/app/javascript/images/icon_email.svg b/app/javascript/images/icon_email.svg new file mode 100644 index 000000000..6d0ad9d9b --- /dev/null +++ b/app/javascript/images/icon_email.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/javascript/images/icon_lock_open.svg b/app/javascript/images/icon_lock_open.svg new file mode 100644 index 000000000..3288b46d6 --- /dev/null +++ b/app/javascript/images/icon_lock_open.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/javascript/images/logo_transparent.svg b/app/javascript/images/logo_transparent.svg new file mode 100644 index 000000000..abd6d1f67 --- /dev/null +++ b/app/javascript/images/logo_transparent.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/javascript/packs/mailer.js b/app/javascript/packs/mailer.js new file mode 100644 index 000000000..732fc1698 --- /dev/null +++ b/app/javascript/packs/mailer.js @@ -0,0 +1 @@ +require('../styles/mailer.scss'); diff --git a/app/javascript/styles/mailer.scss b/app/javascript/styles/mailer.scss new file mode 100644 index 000000000..2fd3f2661 --- /dev/null +++ b/app/javascript/styles/mailer.scss @@ -0,0 +1,392 @@ +@import 'mastodon/variables'; +@import 'fonts/roboto'; + +table, +td, +div { + box-sizing: border-box; +} + +html, +body { + width: 100% !important; + min-width: 100%; + margin: 0; + padding: 0; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} + +.email_body { + td, + div, + a, + span { + line-height: inherit; + } +} + +a { + &, + &:visited, + span { + text-decoration: none; + color: $ui-highlight-color; + } + + #outlook & { + padding: 0; + } +} + +img { + outline: none; + border: 0; + text-decoration: none; + -ms-interpolation-mode: bicubic; + clear: both; + line-height: 100%; +} + +table { + border-spacing: 0; + mso-table-lspace: 0; + mso-table-rspace: 0; +} + +td { + vertical-align: top; +} + +.email-table, +.content-section, +.column, +.column-cell { + width: 100%; + min-width: 100%; +} + +.email-body { + font-size: 0 !important; + line-height: 100%; + text-align: center; + padding-left: 16px; + padding-right: 16px; +} + +.email-start { + padding-top: 32px; +} + +.email-end { + padding-bottom: 32px; +} + +.email-body, +html, +body { + background-color: lighten($ui-base-color, 4%); +} + +.email-container, +.email-row, +.col-0, +.col-1, +.col-2, +.col-3, +.col-4, +.col-5, +.col-6, { + font-size: 0; + display: inline-block; + width: 100%; + min-width: 100%; + min-width: 0 !important; + vertical-align: top; +} + +.content-cell { + width: 100%; + min-width: 100%; + min-width: 0 !important; +} + +.column-cell { + padding-top: 16px; + padding-bottom: 16px; + vertical-align: top; + + &.button-cell { + padding-top: 0; + } +} + +.email-container { + max-width: 632px; + margin: 0 auto; + text-align: center; +} + +.email-row { + display: block; + max-width: 600px !important; + margin: 0 auto; + text-align: center; + clear: both; +} + +.col-0 { + max-width: 50px; +} + +.col-1 { + max-width: 100px; +} + +.col-2 { + max-width: 200px; +} + +.col-3 { + max-width: 300px; +} + +.col-4 { + max-width: 400px; +} + +.col-5 { + max-width: 500px; +} + +.col-6 { + max-width: 600px; +} + +.column-cell, +.column-cell td, +p { + font-family: Helvetica, Arial, sans-serif; + + @media only screen { + font-family: 'mastodon-font-sans-serif', sans-serif !important; + } +} + +.email-body .column-cell, +.column-cell, +p { + font-size: 15px; + line-height: 23px; + color: $ui-primary-color; + mso-line-height-rule: exactly; + text-rendering: optimizelegibility; +} + +p { + display: block; + margin-top: 0; + margin-bottom: 16px; + + &.small { + font-size: 13px; + } + + &.lead { + font-size: 19px; + line-height: 27px; + } +} + +h1, +h2, +h3, +h4, +h5, +h6 { + color: $ui-secondary-color; + margin-left: 0; + margin-right: 0; + margin-top: 20px; + margin-bottom: 8px; + padding: 0; + font-weight: 500; +} + +h1 { + font-size: 26px; + line-height: 36px; +} + +h2 { + font-size: 23px; + line-height: 30px; +} + +h3 { + font-size: 19px; + line-height: 25px; +} + +.input { + td { + background: darken($ui-base-color, 8%); + border-radius: 4px; + padding: 16px; + line-height: 20px; + mso-line-height-rule: exactly; + border-radius: 4px; + text-align: center; + font-weight: 500; + font-size: 17px; + } +} + +.content-cell, +.blank-cell { + width: 100%; + font-size: 0; + text-align: center; + vertical-align: top; + padding-left: 16px; + padding-right: 16px; +} + +.content-cell { + background-color: darken($ui-base-color, 4%); +} + +.hero { + background-color: $ui-base-color; + padding-top: 20px; +} + +.header { + border-radius: 5px 5px 0 0; + background-color: darken($ui-base-color, 8%); + + .column-cell { + text-align: center; + padding-top: 20px; + padding-bottom: 8px; + } +} + +.content-start { + padding-top: 32px; +} + +.content-end { + border-radius: 0 0 5px 5px; + padding-top: 16px; +} + +.footer { + .column-cell, + p { + color: lighten($ui-base-color, 26%); + } + + p { + margin-bottom: 0; + font-size: 13px; + + &.small { + margin-bottom: 0; + } + } + + a { + color: lighten($ui-base-color, 26%); + text-decoration: underline; + } + + img { + opacity: 0.3; + } +} + +.logo { + position: relative; + left: -4px; +} + +.button { + display: table; + margin-left: auto; + margin-right: auto; + + td { + line-height: 20px; + mso-line-height-rule: exactly; + border-radius: 4px; + text-align: center; + font-weight: 500; + font-size: 17px; + padding: 0 !important; + + a, + a span { + color: $primary-text-color; + display: block !important; + text-align: center !important; + vertical-align: top !important; + line-height: inherit !important; + } + + a { + padding: 10px 22px !important; + line-height: 26px !important; + font-weight: 500 !important; + } + } +} + +.button-default { + background-color: darken($ui-base-color, 8%); +} + +.button-primary { + background-color: $ui-highlight-color; +} + +.text-center { + text-align: center; +} + +.text-right { + text-align: right; +} + +.padded { + padding-left: 16px; + padding-right: 16px; +} + +.hero-icon { + width: 64px; + + td { + text-align: center; + vertical-align: middle; + line-height: 100%; + mso-line-height-rule: exactly; + padding: 16px; + border-radius: 80px; + background: $success-green; + } + + img { + max-width: 32px; + width: 32px; + height: 32px; + display: block; + line-height: 100%; + } +} + +@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) { + body { + min-height: 1024px !important; + } +} diff --git a/app/mailers/admin_mailer.rb b/app/mailers/admin_mailer.rb index fd9223533..a30468eb8 100644 --- a/app/mailers/admin_mailer.rb +++ b/app/mailers/admin_mailer.rb @@ -1,7 +1,9 @@ # frozen_string_literal: true class AdminMailer < ApplicationMailer - helper StreamEntriesHelper + layout 'plain_mailer' + + helper :stream_entries def new_report(recipient, report) @report = report diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index 95b770ff1..683b60c86 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -2,7 +2,9 @@ class ApplicationMailer < ActionMailer::Base layout 'mailer' + helper :instance + helper :mailer protected diff --git a/app/mailers/notification_mailer.rb b/app/mailers/notification_mailer.rb index fd2b0649a..07992102d 100644 --- a/app/mailers/notification_mailer.rb +++ b/app/mailers/notification_mailer.rb @@ -1,7 +1,9 @@ # frozen_string_literal: true class NotificationMailer < ApplicationMailer - helper StreamEntriesHelper + layout 'plain_mailer' + + helper :stream_entries def mention(recipient, notification) @me = recipient diff --git a/app/views/layouts/mailer.html.haml b/app/views/layouts/mailer.html.haml new file mode 100644 index 000000000..8a7ce4369 --- /dev/null +++ b/app/views/layouts/mailer.html.haml @@ -0,0 +1,55 @@ +!!! +%html{ lang: I18n.locale } + %head + %meta{ 'http-equiv' => 'Content-Type', 'content' => 'text/html; charset=utf-8' }/ + %meta{ name: 'viewport', content: 'width=device-width, initial-scale=1.0, shrink-to-fit=no' } + + %title/ + + = stylesheet_pack_tag 'mailer' + %body + %table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body.email-start + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.header + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell + = link_to root_url do + = image_tag asset_pack_path('logo_full.svg'), height: 34, class: 'logo' + + = yield + + %table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body.email-end + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.content-end + != "  " + %tr + %td.blank-cell.footer + .email-row + .col-4 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %td.column-cell + %p= t 'about.hosted_on', domain: site_hostname + %p= link_to t('application_mailer.notification_preferences'), settings_notifications_url + .col-2 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %td.column-cell.text-right + = link_to root_url do + = image_tag asset_pack_path('logo_transparent.svg'), height: 24 diff --git a/app/views/layouts/plain_mailer.html.haml b/app/views/layouts/plain_mailer.html.haml new file mode 100644 index 000000000..0a90f092c --- /dev/null +++ b/app/views/layouts/plain_mailer.html.haml @@ -0,0 +1 @@ += yield diff --git a/app/views/user_mailer/confirmation_instructions.ar.html.erb b/app/views/user_mailer/confirmation_instructions.ar.html.erb deleted file mode 100644 index 2b892b209..000000000 --- a/app/views/user_mailer/confirmation_instructions.ar.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -

مرحبا <%= @resource.email %> !

- -

لقد قمت بإنشاء حساب على <%= @instance %>.

- -

لتأكيد التسجيل يرجى النقر على الرابط التالي :
-<%= link_to 'تأكيد إنشاء الحساب', confirmation_url(@resource, confirmation_token: @token) %> - -

يرجى الإطلاع على <%= link_to 'شروط الإستخدام', terms_url %>.

- -

مع أجمل التحيات،

- -

فريق <%= @instance %>

diff --git a/app/views/user_mailer/confirmation_instructions.ca.html.erb b/app/views/user_mailer/confirmation_instructions.ca.html.erb deleted file mode 100644 index 3591e2433..000000000 --- a/app/views/user_mailer/confirmation_instructions.ca.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -

Benvingut <%= @resource.email %> !

- -

Has creat un compte a <%= @instance %>.

- -

Per confirmar la subscripció si us plau fes clic en el següent vincle :
-<%= link_to 'Confirmar el meu compte', confirmation_url(@resource, confirmation_token: @token) %> - -

Si us plau, també fes un cop d'ull als nostres <%= link_to 'termes i condicions', terms_url %>.

- -

Sincerament,

- -

L'equip <%= @instance %>

diff --git a/app/views/user_mailer/confirmation_instructions.en.html.erb b/app/views/user_mailer/confirmation_instructions.en.html.erb deleted file mode 100644 index cd0d70377..000000000 --- a/app/views/user_mailer/confirmation_instructions.en.html.erb +++ /dev/null @@ -1,15 +0,0 @@ -

Welcome <%= @resource.email %> !

- -

You just created an account on <%= @instance %>.

- -

To confirm your inscription, please click on the following link :
-<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>

- -

If the above link did not work, copy and paste this URL into your address bar:
-<%= confirmation_url(@resource, confirmation_token: @token) %> - -

Please also check out our <%= link_to 'terms and conditions', terms_url %>.

- -

Sincerely,

- -

The <%= @instance %> team

diff --git a/app/views/user_mailer/confirmation_instructions.es.html.erb b/app/views/user_mailer/confirmation_instructions.es.html.erb deleted file mode 100644 index 1d46a12c0..000000000 --- a/app/views/user_mailer/confirmation_instructions.es.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -

¡Bienvenido, <%= @resource.email %>!

- -

Acabas de crear una cuenta en <%= @instance %>.

- -

Para confirmar tu registro, por favor ingresa al siguiente enlace:
-<%= link_to 'Confirmar mi cuenta', confirmation_url(@resource, confirmation_token: @token) %> - -

También revisa nuestros <%= link_to 'términos y condiciones', terms_url %>.

- -

Sinceramente,

- -

El equipo de <%= @instance %>

\ No newline at end of file diff --git a/app/views/user_mailer/confirmation_instructions.fa.html.erb b/app/views/user_mailer/confirmation_instructions.fa.html.erb deleted file mode 100644 index 3e77e043b..000000000 --- a/app/views/user_mailer/confirmation_instructions.fa.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -

خوش آمدید <%= @resource.email %> !

- -

شما الان در <%= @instance %> حساب باز کردید.

- -

برای تأیید عضویت، لطفاً روی پیوند زیر کلیک کنید:
-<%= link_to 'تأیید حساب', confirmation_url(@resource, confirmation_token: @token) %> - -

لطفاً همچنین <%= link_to 'شرایط و مقررات استفادهٔ', terms_url %> ما را هم بخوانید.

- -

با احترام,

- -

گردانندگان سرور <%= @instance %>

\ No newline at end of file diff --git a/app/views/user_mailer/confirmation_instructions.fi.html.erb b/app/views/user_mailer/confirmation_instructions.fi.html.erb deleted file mode 100644 index 8b72722da..000000000 --- a/app/views/user_mailer/confirmation_instructions.fi.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -

Tervetuloa <%= @resource.email %>!

- -

Voit vahvistaa Mastodon tilisi klikkaamalla alla olevaa linkkiä:

- -

<%= link_to 'Varmista tilini', confirmation_url(@resource, confirmation_token: @token) %>

diff --git a/app/views/user_mailer/confirmation_instructions.fr.html.erb b/app/views/user_mailer/confirmation_instructions.fr.html.erb deleted file mode 100644 index fe3f0a010..000000000 --- a/app/views/user_mailer/confirmation_instructions.fr.html.erb +++ /dev/null @@ -1,14 +0,0 @@ -

Bonjour <%= @resource.email %> !

- -

Vous venez de vous créer un compte sur <%= @instance %> et nous vous en remercions :)

- -

Pour confirmer votre inscription, merci de cliquer sur le lien suivant :
-<%= link_to 'Confirmer mon compte', confirmation_url(@resource, confirmation_token: @token) %>

- -

Après votre première connexion, vous pourrez accéder à la documentation de l’outil.

- -

Pensez également à jeter un œil à nos <%= link_to 'conditions d\'utilisation', terms_url %>.

- -

Amicalement,

- -

L’équipe <%= @instance %>

diff --git a/app/views/user_mailer/confirmation_instructions.he.html.erb b/app/views/user_mailer/confirmation_instructions.he.html.erb deleted file mode 100644 index 7933faa23..000000000 --- a/app/views/user_mailer/confirmation_instructions.he.html.erb +++ /dev/null @@ -1,14 +0,0 @@ -
-

שלום <%= @resource.email %> !

- -

הרגע יצרת חשבון בקהילה <%= @instance %>.

- -

כדי לוודא את הרשמתך, יש ללחוץ על הקישורית הבאה :
-<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %> - -

יש לעבור גם על תנאי השימוש <%= link_to 'terms and conditions', terms_url %>.

- -

בתודה מראש,

- -

צוות ניהול <%= @instance %>

-
\ No newline at end of file diff --git a/app/views/user_mailer/confirmation_instructions.html.haml b/app/views/user_mailer/confirmation_instructions.html.haml new file mode 100644 index 000000000..7a148ec72 --- /dev/null +++ b/app/views/user_mailer/confirmation_instructions.html.haml @@ -0,0 +1,76 @@ +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.hero + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center.padded + %table.hero-icon{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td + = image_tag asset_pack_path('icon_email.svg') + + %h1= t 'devise.mailer.confirmation_instructions.title' + +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.content-start + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center + %p= t 'devise.mailer.confirmation_instructions.explanation', host: site_hostname + +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.button-cell + %table.button{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.button-primary + = link_to confirmation_url(@resource, confirmation_token: @token) do + %span= t 'devise.mailer.confirmation_instructions.action' + +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center + %p= t 'devise.mailer.confirmation_instructions.extra_html', terms_path: about_more_url, policy_path: terms_url diff --git a/app/views/user_mailer/confirmation_instructions.id.html.erb b/app/views/user_mailer/confirmation_instructions.id.html.erb deleted file mode 100644 index 998267d76..000000000 --- a/app/views/user_mailer/confirmation_instructions.id.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -

Selamat datang <%= @resource.email %> !

- -

Anda barus saja membuat akun di <%= @instance %>.

- -

Untuk mengkonfirmasi, silakan klik link berikut ini :
-<%= link_to 'Konfirmasikan akun saya', confirmation_url(@resource, confirmation_token: @token) %> - -

Silakan cek juga <%= link_to 'ketentuan layanan', terms_url %> kami.

- -

Hormat kami,

- -

Tim <%= @instance %>

diff --git a/app/views/user_mailer/confirmation_instructions.it.html.erb b/app/views/user_mailer/confirmation_instructions.it.html.erb deleted file mode 100644 index 2fa745476..000000000 --- a/app/views/user_mailer/confirmation_instructions.it.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -

Benvenuto <%= @resource.email %> !

- -

Hai appena creato un account su <%= @instance %>.

- -

Per confermare la tua iscrizione, fai clic sul seguente link:
-<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %> - -

Per piacere leggi anche i nostri <%= link_to 'terms and conditions', terms_url %>.

- -

Sinceramente,

- -

The <%= @instance %> team

diff --git a/app/views/user_mailer/confirmation_instructions.ja.html.erb b/app/views/user_mailer/confirmation_instructions.ja.html.erb deleted file mode 100644 index 1232f94b4..000000000 --- a/app/views/user_mailer/confirmation_instructions.ja.html.erb +++ /dev/null @@ -1,11 +0,0 @@ -

ようこそ<%= @resource.email %>さん

- -

<%= @instance %>にアカウントが作成されました。

- -

以下のリンクをクリックしてMastodonアカウントのメールアドレスを確認してください。

- -

<%= link_to 'メールアドレスの確認', confirmation_url(@resource, confirmation_token: @token) %>

- -

また、インスタンスの<%= link_to '利用規約', terms_url %>についてもご確認ください。

- -

<%= @instance %> チーム

diff --git a/app/views/user_mailer/confirmation_instructions.ko.html.erb b/app/views/user_mailer/confirmation_instructions.ko.html.erb deleted file mode 100644 index a749cd97b..000000000 --- a/app/views/user_mailer/confirmation_instructions.ko.html.erb +++ /dev/null @@ -1,13 +0,0 @@ -

안녕하세요 <%= @resource.email %> 님!

- -

<%= @instance %>에 새로 계정을 만들었습니다.

- -

아래 링크를 눌러 회원가입을 완료 하세요:
-<%= link_to '계정 활성화', confirmation_url(@resource, confirmation_token: @token) %>

- -

만약 위의 링크가 작동하지 않는다면 아래 URL을 복사하여 주소창에 붙여넣으세요

-<%= confirmation_url(@resource, confirmation_token: @token) %> - -

<%= link_to '약관', terms_url %>도 확인 바랍니다.

- -

<%= @instance %> 드림

diff --git a/app/views/user_mailer/confirmation_instructions.nl.html.erb b/app/views/user_mailer/confirmation_instructions.nl.html.erb deleted file mode 100644 index d65d08b6a..000000000 --- a/app/views/user_mailer/confirmation_instructions.nl.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -

Welkom <%= @resource.email %> !

- -

Je hebt zojuist een account aangemaakt op <%= @instance %>.

- -

Klik op de volgende link om jouw registratie te bevestigen :
-<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>

- -

Lees ook onze gebruikersvoorwaarden op <%= link_to 'terms and conditions', terms_url %>.

- -

Vriendelijke groet,

- -

De beheerder(s) van <%= @instance %>

diff --git a/app/views/user_mailer/confirmation_instructions.no.html.erb b/app/views/user_mailer/confirmation_instructions.no.html.erb deleted file mode 100644 index 366d9a4d3..000000000 --- a/app/views/user_mailer/confirmation_instructions.no.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -

Velkommen <%= @resource.email %> !

- -

Du har akkurat opprettet en konto på <%= @instance %>.

- -

For å bekrefte innskriving i manntallet vennligst trykk på følgende lenke :
-<%= link_to 'Bekreft min bruker', confirmation_url(@resource, confirmation_token: @token) %> - -

Vennligst også les våre <%= link_to 'brukervilkår', terms_url %>.

- -

Med vennlig hilsen,

- -

Gjengen bak <%= @instance %>

diff --git a/app/views/user_mailer/confirmation_instructions.oc.html.erb b/app/views/user_mailer/confirmation_instructions.oc.html.erb deleted file mode 100644 index 5657e40d4..000000000 --- a/app/views/user_mailer/confirmation_instructions.oc.html.erb +++ /dev/null @@ -1,14 +0,0 @@ -

Bonjorn <%= @resource.email %> !

- -

Venètz de vos crear un compte sus <%= @instance %> e vos mercegem :)

- -

Per confirmar vòstra inscripcion, mercés de clicar sul ligam seguent : 
-<%= link_to 'Confirmar mon compte', confirmation_url(@resource, confirmation_token: @token) %>

- -

Aprèp vòstra primièra connexion, poiretz accedir a la documentacion de l’aisina.

- -

Pensatz tanben de gaitar nòstres <%= link_to 'tèrmes e condicions d\'utilizacion', terms_url %>.

- -

Amistosament,

- -

La còla <%= @instance %>

diff --git a/app/views/user_mailer/confirmation_instructions.pl.html.erb b/app/views/user_mailer/confirmation_instructions.pl.html.erb deleted file mode 100644 index 2285b5c6e..000000000 --- a/app/views/user_mailer/confirmation_instructions.pl.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -

Witaj, <%= @resource.email %>!

- -

Właśnie utworzyłeś konto na instancji <%= @instance %>.

- -

Aby aktywować konto, odwiedź poniższy link:
-<%= link_to 'Potwierdź rejestrację', confirmation_url(@resource, confirmation_token: @token) %> - -

Pamiętaj przeczytać nasz <%= link_to 'regulamin i zasady użytkowania', terms_url %>.

- -

Z pozdrowieniami,

- -

Zespół <%= @instance %>

diff --git a/app/views/user_mailer/confirmation_instructions.pt-BR.html.erb b/app/views/user_mailer/confirmation_instructions.pt-BR.html.erb deleted file mode 100644 index 0be16d994..000000000 --- a/app/views/user_mailer/confirmation_instructions.pt-BR.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -

Boas vindas, <%= @resource.email %>!

- -

Você acabou de criar uma conta na instância <%= @instance %>.

- -

Para confirmar o seu cadastro, por favor clique no link a seguir:
-<%= link_to 'Confirmar cadastro', confirmation_url(@resource, confirmation_token: @token) %> - -

Por favor, leia também os nossos <%= link_to 'termos de serviços', terms_url %>.

- -

Atenciosamente,

- -

A equipe da instância <%= @instance %>

diff --git a/app/views/user_mailer/confirmation_instructions.ru.html.erb b/app/views/user_mailer/confirmation_instructions.ru.html.erb deleted file mode 100644 index 2a755460e..000000000 --- a/app/views/user_mailer/confirmation_instructions.ru.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -

Добро пожаловать, <%= @resource.email %> !

- -

Вы только что завели аккаунт на <%= @instance %>.

- -

Чтобы подтвердить создание аккаунта, пожалуйста, перейдите по этой ссылке:
-<%= confirmation_url(@resource, confirmation_token: @token) %>

- -

Также просим Вас прочитать об условиях использования аккаунта здесь: <%= terms_url %>

- -

Искренне Ваши,

- -

Команда <%= @instance %>

diff --git a/app/views/user_mailer/confirmation_instructions.sr-Latn.html.erb b/app/views/user_mailer/confirmation_instructions.sr-Latn.html.erb deleted file mode 100644 index a16008250..000000000 --- a/app/views/user_mailer/confirmation_instructions.sr-Latn.html.erb +++ /dev/null @@ -1,15 +0,0 @@ -

Dobrodošao <%= @resource.email %> !

- -

Upravo ste napravili nalog na instanci <%= @instance %>.

- -

Da potvrdite Vašu registraciju, molimo Vas kliknite na sledeći link:
-<%= link_to 'Potvrdi moj nalog', confirmation_url(@resource, confirmation_token: @token) %>

- -

Ako link iznad ne radi, kopirajte i nalepite ovu adresu u adresnu traku:
-<%= confirmation_url(@resource, confirmation_token: @token) %> - -

Takođe pogledajte i <%= link_to 'pravila i uslove korišćenja', terms_url %>.

- -

S poštovanjem,

- -

<%= @instance %> tim

diff --git a/app/views/user_mailer/confirmation_instructions.sr.html.erb b/app/views/user_mailer/confirmation_instructions.sr.html.erb deleted file mode 100644 index 09203cc9a..000000000 --- a/app/views/user_mailer/confirmation_instructions.sr.html.erb +++ /dev/null @@ -1,15 +0,0 @@ -

Добродошао <%= @resource.email %> !

- -

Управо сте направили налог на инстанци <%= @instance %>.

- -

Да потврдите Вашу регистрацију, молимо Вас кликните на следећи линк:
-<%= link_to 'Потврди мој налог', confirmation_url(@resource, confirmation_token: @token) %>

- -

Ако линк изнад не ради, копирајте и налепите ову адресу у адресну траку:
-<%= confirmation_url(@resource, confirmation_token: @token) %> - -

Такође погледајте и <%= link_to 'правила и услове коришћења', terms_url %>.

- -

С поштовањем,

- -

<%= @instance %> тим

diff --git a/app/views/user_mailer/confirmation_instructions.sv.html.erb b/app/views/user_mailer/confirmation_instructions.sv.html.erb deleted file mode 100644 index e0ad611a7..000000000 --- a/app/views/user_mailer/confirmation_instructions.sv.html.erb +++ /dev/null @@ -1,15 +0,0 @@ -

Välkommen <%= @resource.email %> !

- -

Du har precis startat upp ett konto på <%= @instance %>.

- -

För att bekräfta din inskrift, vänligen klicka på följande länk :
-<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>

- -

Om länken ovan inte fungerar, kopiera och klistra in den här webbadressen i adressfältet:
-<%= confirmation_url(@resource, confirmation_token: @token) %> - -

Vänligen kolla även våra <%= link_to 'terms and conditions', terms_url %>.

- -

Vänliga hälsningar,

- -

Teamet på <%= @instance %>

diff --git a/app/views/user_mailer/confirmation_instructions.tr.html.erb b/app/views/user_mailer/confirmation_instructions.tr.html.erb deleted file mode 100644 index 7879f0d29..000000000 --- a/app/views/user_mailer/confirmation_instructions.tr.html.erb +++ /dev/null @@ -1,15 +0,0 @@ - -

Aramıza hoşgeldin <%= @resource.email %>

- -

Bu sunucumuzda yeni bir hesap oluşturduğunu görüyoruz: <%= @instance %>.

- -

Siz olduğunuzu teyit edebilmemiz için lütfen aşağıdaki linke tıklaman yeterli:
- -<%= link_to 'Hesabımı doğrula', confirmation_url(@resource, confirmation_token: @token) %> - -

Ayrıca <%= link_to 'kullanım şartları ve koşullarımızı', terms_url %> inceleyebilirsin.

- -

En içten dileklerimizle,

- -

<%= @instance %> ekibi

- diff --git a/app/views/user_mailer/confirmation_instructions.zh-cn.html.erb b/app/views/user_mailer/confirmation_instructions.zh-cn.html.erb deleted file mode 100644 index 8a676498a..000000000 --- a/app/views/user_mailer/confirmation_instructions.zh-cn.html.erb +++ /dev/null @@ -1,13 +0,0 @@ -

<%= @resource.email %>,你好呀!

- -

你刚刚在 <%= @instance %> 创建了一个帐户呢。

- -

点击下面的链接来完成注册啦:
-<%= link_to '确认帐户', confirmation_url(@resource, confirmation_token: @token) %> - -

上面的链接按不动?把下面的链接复制到地址栏再试试:
-<%= confirmation_url(@resource, confirmation_token: @token) %> - -

记得读一读我们的<%= link_to '使用条款', terms_url %>哦。

- -

来自 <%= @instance %> 管理团队

diff --git a/app/views/user_mailer/email_changed.en.html.erb b/app/views/user_mailer/email_changed.en.html.erb deleted file mode 100644 index c10680086..000000000 --- a/app/views/user_mailer/email_changed.en.html.erb +++ /dev/null @@ -1,15 +0,0 @@ -

Hello <%= @resource.email %>!

- -<% if @resource&.unconfirmed_email? %> -

We're contacting you to notify you that the email you use on <%= @instance %> is being changed to <%= @resource.unconfirmed_email %>.

-<% else %> -

We're contacting you to notify you that the email you use on <%= @instance %> has been changed to <%= @resource.email %>.

-<% end %> - -

- If you did not change your email, it is likely that someone has gained access to your account. Please change your password immediately or contact the instance admin if you're locked out of your account. -

- -

Sincerely,

- -

The <%= @instance %> team

diff --git a/app/views/user_mailer/email_changed.html.haml b/app/views/user_mailer/email_changed.html.haml new file mode 100644 index 000000000..e526f3a2c --- /dev/null +++ b/app/views/user_mailer/email_changed.html.haml @@ -0,0 +1,58 @@ +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.hero + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center.padded + %table.hero-icon{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td + = image_tag asset_pack_path('icon_email.svg') + + %h1= t 'devise.mailer.email_changed.title' + %p.lead= t 'devise.mailer.email_changed.explanation' + +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.content-start + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.input-cell + %table.input{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td= @resource.unconfirmed_email + +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center.padded + %p= t 'devise.mailer.email_changed.extra' diff --git a/app/views/user_mailer/email_changed.ja.html.erb b/app/views/user_mailer/email_changed.ja.html.erb deleted file mode 100644 index c66f409c6..000000000 --- a/app/views/user_mailer/email_changed.ja.html.erb +++ /dev/null @@ -1,13 +0,0 @@ -

こんにちは<%= @resource.email %>さん

- -<% if @resource&.unconfirmed_email? %> -

<%= @instance %>で使っているメールアドレスが<%= @resource.unconfirmed_email %>に変更されようとしています。

-<% else %> -

<%= @instance %>で使っているメールアドレスが<%= @resource.email %>に変更されました。

-<% end %> - -

- メールアドレスを変更した覚えがない場合、誰かがあなたのアカウントにアクセスしたおそれがあります。すぐにパスワードを変更するか、アカウントにアクセスできない場合はインスタンスの管理者に連絡してください。 -

- -

<%= @instance %>チームより

diff --git a/app/views/user_mailer/email_changed.oc.html.erb b/app/views/user_mailer/email_changed.oc.html.erb deleted file mode 100644 index 0f4c891dc..000000000 --- a/app/views/user_mailer/email_changed.oc.html.erb +++ /dev/null @@ -1,15 +0,0 @@ -

Bonjorn <%= @resource.email %> !

- -<% if @resource&.unconfirmed_email? %> -

Vos contactem per vos senhalar que l’adreça qu’utilizatz per <%= @instance %> es cambiada per aquesta d’aquí <%= @resource.unconfirmed_email %>.

-<% else %> -

Vos contactem per vos senhalar que l’adreça qu’utilizatz per <%= @instance %> es cambiada per aquesta d’aquí <%= @resource.email %>.

-<% end %> - -

- S’avètz pas demandat aqueste cambiament d’adreça, poiriá arribar que qualqu’un mai aguèsse agut accès a vòstre compte. Mercés de cambiar sulpic vòstre senhal o de contactar vòstre administrator d’instància se l’accès a vòstre compte vos es barrat. -

- -

Amistosament,

- -

La còla <%= @instance %>

diff --git a/app/views/user_mailer/email_changed.pl.html.erb b/app/views/user_mailer/email_changed.pl.html.erb deleted file mode 100644 index 9ed122b0f..000000000 --- a/app/views/user_mailer/email_changed.pl.html.erb +++ /dev/null @@ -1,15 +0,0 @@ -

Witaj, <%= @resource.email %>!

- -<% if @resource&.unconfirmed_email? %> -

Informujemy, że e-mail używany przez Ciebie na <%= @instance %> został zmieniony na <%= @resource.unconfirmed_email %>.

-<% else %> -

Informujemy, że e-mail używany przez Ciebie na <%= @instance %> został zmieniony na <%= @resource.email %>.

-<% end %> - -

- Jeżeli to nie Ty, prawdopodobnie ktoś uzyskał dostęp do Twojego konta. Zalecana jest natychmiastowa zmiana hasła lub skontaktowanie się z administratorem, jeżeli nie masz dostępu do swojego konta. -

- -

Z pozdrowieniami,

- -

Zespół <%= @instance %>

diff --git a/app/views/user_mailer/email_changed.zh-cn.html.erb b/app/views/user_mailer/email_changed.zh-cn.html.erb deleted file mode 100644 index 74b1b6150..000000000 --- a/app/views/user_mailer/email_changed.zh-cn.html.erb +++ /dev/null @@ -1,13 +0,0 @@ -

<%= @resource.email %>,你好呀!

- -<% if @resource&.unconfirmed_email? %> -

我们发送这封邮件是为了提醒你,你在 <%= @instance %> 上使用的电子邮件地址即将变更为 <%= @resource.unconfirmed_email %>。

-<% else %> -

我们发送这封邮件是为了提醒你,你在 <%= @instance %> 上使用的电子邮件地址已经变更为 <%= @resource.unconfirmed_email %>。

-<% end %> - -

- 如果你并没有请求更改你的电子邮件地址,则他人很有可能已经入侵你的帐户。请立即更改你的密码;如果你已经无法访问你的帐户,请联系实例的管理员请求协助。 -

- -

来自 <%= @instance %> 管理团队

diff --git a/app/views/user_mailer/password_change.ar.html.erb b/app/views/user_mailer/password_change.ar.html.erb deleted file mode 100644 index 8e7bd2f08..000000000 --- a/app/views/user_mailer/password_change.ar.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

صباح الخير <%= @resource.email %> !

- -

نود أن نخبرك أنه قد تم تعديل كلمة مرور ماستدون الخاصة بك بنجاح.

diff --git a/app/views/user_mailer/password_change.ca.html.erb b/app/views/user_mailer/password_change.ca.html.erb deleted file mode 100644 index e10c21e1c..000000000 --- a/app/views/user_mailer/password_change.ca.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

Hola <%= @resource.email %>!

- -

Aquest correu es per a notificar-te que la teva contrasenya a mastodont.cat ha canviat.

diff --git a/app/views/user_mailer/password_change.en.html.erb b/app/views/user_mailer/password_change.en.html.erb deleted file mode 100644 index 414e05a29..000000000 --- a/app/views/user_mailer/password_change.en.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

Hello <%= @resource.email %>!

- -

We're contacting you to notify you that your password on <%= @instance %> has been changed.

diff --git a/app/views/user_mailer/password_change.es.html.erb b/app/views/user_mailer/password_change.es.html.erb deleted file mode 100644 index 0a9eb4c4c..000000000 --- a/app/views/user_mailer/password_change.es.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

¡Hola, <%= @resource.email %>!

- -

Te contactamos para notificarte que tu contraseña en <%= @instance %> ha sido modificada.

\ No newline at end of file diff --git a/app/views/user_mailer/password_change.fa.html.erb b/app/views/user_mailer/password_change.fa.html.erb deleted file mode 100644 index 8167ae160..000000000 --- a/app/views/user_mailer/password_change.fa.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

سلام <%= @resource.email %>!

- -

این پیغام برای این است که به شما بگوییم رمز شما در ماستدون تغییر کرده است.

diff --git a/app/views/user_mailer/password_change.fi.html.erb b/app/views/user_mailer/password_change.fi.html.erb deleted file mode 100644 index c56b96593..000000000 --- a/app/views/user_mailer/password_change.fi.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

Hei <%= @resource.email %>!

- -

Lähetämme tämän viestin ilmoittaaksemme että salasanasi on vaihdettu.

diff --git a/app/views/user_mailer/password_change.fr.html.erb b/app/views/user_mailer/password_change.fr.html.erb deleted file mode 100644 index cb8a261fe..000000000 --- a/app/views/user_mailer/password_change.fr.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

Bonjour <%= @resource.email %> !

- -

Nous vous contactons pour vous informer que votre mot de passe sur Mastodon a bien été modifié.

diff --git a/app/views/user_mailer/password_change.he.html.erb b/app/views/user_mailer/password_change.he.html.erb deleted file mode 100644 index a356edf58..000000000 --- a/app/views/user_mailer/password_change.he.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -
-

שלום <%= @resource.email %>!

- -

רצינו להודיע לך שסיסמתך במסטודון אצלנו הוחלפה.

diff --git a/app/views/user_mailer/password_change.html.haml b/app/views/user_mailer/password_change.html.haml new file mode 100644 index 000000000..a0afd5930 --- /dev/null +++ b/app/views/user_mailer/password_change.html.haml @@ -0,0 +1,40 @@ +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.hero + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center.padded + %table.hero-icon{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td + = image_tag asset_pack_path('icon_lock_open.svg') + + %h1= t 'devise.mailer.password_change.title' + %p.lead= t 'devise.mailer.password_change.explanation' + +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.content-start + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center.padded + %p= t 'devise.mailer.password_change.extra' diff --git a/app/views/user_mailer/password_change.id.html.erb b/app/views/user_mailer/password_change.id.html.erb deleted file mode 100644 index 469c98c5d..000000000 --- a/app/views/user_mailer/password_change.id.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

Hai <%= @resource.email %>!

- -

Kami menghubungi anda untuk memberitahu bahwa kata sandi anda di Mastodon telah diubah.

diff --git a/app/views/user_mailer/password_change.it.html.erb b/app/views/user_mailer/password_change.it.html.erb deleted file mode 100644 index b4ca99769..000000000 --- a/app/views/user_mailer/password_change.it.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

Ciao <%= @resource.email %>!

- -

Ti stiamo contattando per avvisarti che la tua password su Mastodon è stata cambiata.

diff --git a/app/views/user_mailer/password_change.ja.html.erb b/app/views/user_mailer/password_change.ja.html.erb deleted file mode 100644 index 3aa83f187..000000000 --- a/app/views/user_mailer/password_change.ja.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

こんにちは<%= @resource.email %>さん

- -

Mastodonアカウントのパスワードが変更されました。

diff --git a/app/views/user_mailer/password_change.nl.html.erb b/app/views/user_mailer/password_change.nl.html.erb deleted file mode 100644 index 3ffc547cd..000000000 --- a/app/views/user_mailer/password_change.nl.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

Hallo <%= @resource.email %>!

- -

Hierbij laten we jou weten dat jouw wachtwoord op Mastodon is veranderd.

diff --git a/app/views/user_mailer/password_change.no.html.erb b/app/views/user_mailer/password_change.no.html.erb deleted file mode 100644 index cd0a28f82..000000000 --- a/app/views/user_mailer/password_change.no.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

Hei <%= @resource.email %>!

- -

Ditt Mastodon-passord har blitt endret.

diff --git a/app/views/user_mailer/password_change.oc.html.erb b/app/views/user_mailer/password_change.oc.html.erb deleted file mode 100644 index 094c221a8..000000000 --- a/app/views/user_mailer/password_change.oc.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

Bonjorn <%= @resource.email %> !

- -

Vos contactem per vos avisar qu’avèm ben cambiat vòstre senhal Mastodon.

diff --git a/app/views/user_mailer/password_change.pl.html.erb b/app/views/user_mailer/password_change.pl.html.erb deleted file mode 100644 index a7cb15a05..000000000 --- a/app/views/user_mailer/password_change.pl.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

Witaj, <%= @resource.email %>!

- -

Informujemy, że ostatnio zmieniono Twoje hasło na <%= @instance %>.

diff --git a/app/views/user_mailer/password_change.pt-BR.html.erb b/app/views/user_mailer/password_change.pt-BR.html.erb deleted file mode 100644 index a1aaa265e..000000000 --- a/app/views/user_mailer/password_change.pt-BR.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

Olá, <%= @resource.email %>!

- -

Estamos te contatando para te notificar que a sua senha na instância <%= @instance %> foi modificada.

diff --git a/app/views/user_mailer/password_change.ru.html.erb b/app/views/user_mailer/password_change.ru.html.erb deleted file mode 100644 index 1c98e364e..000000000 --- a/app/views/user_mailer/password_change.ru.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

Здравствуйте, <%= @resource.email %>!

- -

Мы пишем, чтобы оповестить Вас о смене пароля на Вашем аккаунте Mastodon.

diff --git a/app/views/user_mailer/password_change.sr-Latn.html.erb b/app/views/user_mailer/password_change.sr-Latn.html.erb deleted file mode 100644 index ab4e23bdf..000000000 --- a/app/views/user_mailer/password_change.sr-Latn.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

Zdravo <%= @resource.email %>!

- -

Želimo samo da Vas obavestimo da je Vaša lozinka na Mastodont instanci <%= @instance %> promenjena.

diff --git a/app/views/user_mailer/password_change.sr.html.erb b/app/views/user_mailer/password_change.sr.html.erb deleted file mode 100644 index 4bb61b74f..000000000 --- a/app/views/user_mailer/password_change.sr.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

Здраво <%= @resource.email %>!

- -

Желимо само да Вас обавестимо да је Ваша лозинка на Мастодонт инстанци <%= @instance %> промењена.

diff --git a/app/views/user_mailer/password_change.sv.html.erb b/app/views/user_mailer/password_change.sv.html.erb deleted file mode 100644 index f6168c638..000000000 --- a/app/views/user_mailer/password_change.sv.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

Hej <%= @resource.email %>!

- -

Vi kontaktar dig för att meddela dig att ditt lösenord på <%= @instance %> har blivit ändrat.

diff --git a/app/views/user_mailer/password_change.th.html.erb b/app/views/user_mailer/password_change.th.html.erb deleted file mode 100644 index 948b1508a..000000000 --- a/app/views/user_mailer/password_change.th.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

สวัสดี <%= @resource.email %>!

- -

เราติดต่อเข้ามาเพื่อจะแจ้งให้คุณทราบว่าพาสเวิร์ด Mastodon เปลี่ยนแล้ว

diff --git a/app/views/user_mailer/password_change.tr.html.erb b/app/views/user_mailer/password_change.tr.html.erb deleted file mode 100644 index 40f55c484..000000000 --- a/app/views/user_mailer/password_change.tr.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

Merhaba <%= @resource.email %>!

- -

<%= @instance %>'deki parolanızın değiştirildiğini hatırlatmak isteriz.

- -

En içten dileklerimizle,

- -

<%= @instance %> ekibi

- diff --git a/app/views/user_mailer/password_change.zh-cn.html.erb b/app/views/user_mailer/password_change.zh-cn.html.erb deleted file mode 100644 index 64e8b6b2f..000000000 --- a/app/views/user_mailer/password_change.zh-cn.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

<%= @resource.email %>,你好呀!

- -

提醒一下,你在 <%= @instance %> 上的密码被更改了哦。

diff --git a/app/views/user_mailer/reconfirmation_instructions.en.html.erb b/app/views/user_mailer/reconfirmation_instructions.en.html.erb deleted file mode 100644 index 31866a3c8..000000000 --- a/app/views/user_mailer/reconfirmation_instructions.en.html.erb +++ /dev/null @@ -1,15 +0,0 @@ -

Hello <%= @resource.unconfirmed_email %>!

- -

You requested a change to the email address you use on <%= @instance %>.

- -

To confirm your new email, please click on the following link:
-<%= link_to 'Confirm my email address', confirmation_url(@resource, confirmation_token: @token) %>

- -

If the above link did not work, copy and paste this URL into your address bar:
-<%= confirmation_url(@resource, confirmation_token: @token) %> - -

Please also check out our <%= link_to 'terms and conditions', terms_url %>.

- -

Sincerely,

- -

The <%= @instance %> team

diff --git a/app/views/user_mailer/reconfirmation_instructions.html.haml b/app/views/user_mailer/reconfirmation_instructions.html.haml new file mode 100644 index 000000000..52855e223 --- /dev/null +++ b/app/views/user_mailer/reconfirmation_instructions.html.haml @@ -0,0 +1,60 @@ +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.hero + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center.padded + %table.hero-icon{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td + = image_tag asset_pack_path('icon_email.svg') + + %h1= t 'devise.mailer.reconfirmation_instructions.title' + %p.lead= t 'devise.mailer.reconfirmation_instructions.explanation' + +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.content-start + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.button-cell + %table.button{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.button-primary + = link_to confirmation_url(@resource, confirmation_token: @token) do + %span= t 'devise.mailer.confirmation_instructions.action' + +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center.padded + %p= t 'devise.mailer.reconfirmation_instructions.extra' diff --git a/app/views/user_mailer/reconfirmation_instructions.ja.html.erb b/app/views/user_mailer/reconfirmation_instructions.ja.html.erb deleted file mode 100644 index caa53032a..000000000 --- a/app/views/user_mailer/reconfirmation_instructions.ja.html.erb +++ /dev/null @@ -1,13 +0,0 @@ -

こんにちは<%= @resource.unconfirmed_email %>さん

- -

<%= @instance %>で使っているメールアドレスの変更をあなたがリクエストしました。

- -

新しいメールアドレスを確認するには次のリンクをクリックしてください:
-<%= link_to 'わたしのメールアドレスを確認する', confirmation_url(@resource, confirmation_token: @token) %>

- -

上記のリンクがうまくいかなかった場合はこのURLをコピーしてアドレスバーに貼り付けてください:
-<%= confirmation_url(@resource, confirmation_token: @token) %> - -

また<%= link_to '利用規約', terms_url %>もご確認ください。

- -

<%= @instance %>チームより

diff --git a/app/views/user_mailer/reconfirmation_instructions.oc.html.erb b/app/views/user_mailer/reconfirmation_instructions.oc.html.erb deleted file mode 100644 index d5404e49c..000000000 --- a/app/views/user_mailer/reconfirmation_instructions.oc.html.erb +++ /dev/null @@ -1,15 +0,0 @@ -

Bonjorn <%= @resource.unconfirmed_email %> !

- -

Avètz demandat a cambiar vòstra adreça de corrièl qu’utilizatz per <%= @instance %>.

- -

Per confirmar vòstra novèla adreça, mercés de clicar lo ligam seguent :
-<%= link_to 'Confirmar mon adreça', confirmation_url(@resource, confirmation_token: @token) %>

- -

Se lo ligam al dessús fonciona pas, copiatz e pegatz aquesta URL a la barra d’adreça :
-<%= confirmation_url(@resource, confirmation_token: @token) %> - -

Mercés de gaitar tanben nòstres <%= link_to 'terms and conditions', terms_url %>.

- -

Amistosament,

- -

La còla <%= @instance %>

diff --git a/app/views/user_mailer/reconfirmation_instructions.pl.html.erb b/app/views/user_mailer/reconfirmation_instructions.pl.html.erb deleted file mode 100644 index 57cdc42e1..000000000 --- a/app/views/user_mailer/reconfirmation_instructions.pl.html.erb +++ /dev/null @@ -1,15 +0,0 @@ -

Witaj, <%= @resource.unconfirmed_email %>!

- -

Dokonano próby zmiany adresu e-mail, którego używasz na <%= @instance %>.

- -

Aby potwierdzić posiadanie tego adresu e-mail, kliknij na poniższy odnośnik:
-<%= link_to 'Potwierdź mój adres e-mail', confirmation_url(@resource, confirmation_token: @token) %>

- -

Jeżeli ten odnośnik nie działa, wklej następujący adres w pasek adresu Twojej przeglądarki:
-<%= confirmation_url(@resource, confirmation_token: @token) %> - -

Pamiętaj o przeczytaniu naszych <%= link_to 'zasad użytkowania', terms_url %>.

- -

Z pozdrowieniami,

- -

Zespół <%= @instance %>

diff --git a/app/views/user_mailer/reconfirmation_instructions.zh-cn.html.erb b/app/views/user_mailer/reconfirmation_instructions.zh-cn.html.erb deleted file mode 100644 index 7b79a490e..000000000 --- a/app/views/user_mailer/reconfirmation_instructions.zh-cn.html.erb +++ /dev/null @@ -1,13 +0,0 @@ -

<%= @resource.email %>,你好呀!

- -

你正在更改你在 <%= @instance %> 使用的电子邮件地址。

- -

点击下面的链接以确认操作:
-<%= link_to '确认我的电子邮件地址', confirmation_url(@resource, confirmation_token: @token) %>

- -

上面的链接按不动?把下面的链接复制到地址栏再试试:
-<%= confirmation_url(@resource, confirmation_token: @token) %> - -

记得读一读我们的<%= link_to '使用条款', terms_url %>哦。

- -

来自 <%= @instance %> 管理团队

diff --git a/app/views/user_mailer/reset_password_instructions.ar.html.erb b/app/views/user_mailer/reset_password_instructions.ar.html.erb deleted file mode 100644 index d9d5520ec..000000000 --- a/app/views/user_mailer/reset_password_instructions.ar.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

صباح الخير <%= @resource.email %> !

- -

لقد طلب أحدهم رابط تعديل كلمة مرور ماستدون الخاصة بك. يمكنك المتابعة و مواصلة التعديل على الرابط التالي.

- -

<%= link_to 'تعديل الكلمة السرية', edit_password_url(@resource, reset_password_token: @token) %>

- -

يمكنك تجاهل هذه الرسالة إن لم تكن من طلب ذلك.

-

لن يتم تعديل كلمة المرور الخاصة بك و ستبقى نفسها إلا إذا قمت بالضغط على الرابط أعلاه.

diff --git a/app/views/user_mailer/reset_password_instructions.ca.html.erb b/app/views/user_mailer/reset_password_instructions.ca.html.erb deleted file mode 100644 index 6f76c441d..000000000 --- a/app/views/user_mailer/reset_password_instructions.ca.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

Hola <%= @resource.email %>!

- -

Algú ha sol·licitat un enllaç per canviar la contrasenya a mastodont.cat. Això es pot fer a través del següent enllaç.

- -

<%= link_to 'Canviar la contrasenya', edit_password_url(@resource, reset_password_token: @token) %>

- -

Si no has sol·licitat aquest canvi, si us plau, ignora aquest correu.

-

La teva contrasenya no canviarà fins que accedeix a l'enllaç de dalt per crear-ne una de nova.

diff --git a/app/views/user_mailer/reset_password_instructions.en.html.erb b/app/views/user_mailer/reset_password_instructions.en.html.erb deleted file mode 100644 index cfb129e22..000000000 --- a/app/views/user_mailer/reset_password_instructions.en.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

Hello <%= @resource.email %>!

- -

Someone has requested a link to change your password on <%= @instance %>. You can do this through the link below.

- -

<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>

- -

If you didn't request this, please ignore this email.

-

Your password won't change until you access the link above and create a new one.

diff --git a/app/views/user_mailer/reset_password_instructions.es.html.erb b/app/views/user_mailer/reset_password_instructions.es.html.erb deleted file mode 100644 index 4eeb6601d..000000000 --- a/app/views/user_mailer/reset_password_instructions.es.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

¡Hola, <%= @resource.email %>!

- -

Alguien pidió un enlace para cambiar tu contraseña en <%= @instance %>. Puedes hacer esto con el siguiente enlace.

- -

<%= link_to 'Cambiar mi contraseña', edit_password_url(@resource, reset_password_token: @token) %>

- -

Si no fuiste tú, por favor ignora este mensaje.

-

Tu contraseña no cambiará hasta que ingreses al enlace y crees una nueva.

diff --git a/app/views/user_mailer/reset_password_instructions.fa.html.erb b/app/views/user_mailer/reset_password_instructions.fa.html.erb deleted file mode 100644 index 835e81311..000000000 --- a/app/views/user_mailer/reset_password_instructions.fa.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

سلام <%= @resource.email %>!

- -

یک نفر درخواست کرده تا رمز شما در ماستدون عوض شود. برای این کار پیوند زیر را به‌کار ببرید.

- -

<%= link_to 'تغییر رمز', edit_password_url(@resource, reset_password_token: @token) %>

- -

اگر شما چنین درخواستی نداده‌اید، لطفاً این ایمیل را نادیده بگیرید.

-

تا وقتی که شما پیوند بالا را نبینید و رمز تازه‌ای نسازید، رمز شما عوض نخواهد شد.

diff --git a/app/views/user_mailer/reset_password_instructions.fi.html.erb b/app/views/user_mailer/reset_password_instructions.fi.html.erb deleted file mode 100644 index 53be0b62b..000000000 --- a/app/views/user_mailer/reset_password_instructions.fi.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

Hei <%= @resource.email %>!

- -

Joku on pyytänyt salasanvaihto Mastodonissa. Voit tehdä sen allaolevassa linkissä.

- -

<%= link_to 'Vaihda salasanani', edit_password_url(@resource, reset_password_token: @token) %>

- -

Jos et pyytänyt vaihtoa, poista tämä viesti.

-

Salasanaasi ei vaihdeta ennen kuin menet ylläolevaan linkkiin ja luot uuden.

diff --git a/app/views/user_mailer/reset_password_instructions.fr.html.erb b/app/views/user_mailer/reset_password_instructions.fr.html.erb deleted file mode 100644 index db55c5884..000000000 --- a/app/views/user_mailer/reset_password_instructions.fr.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

Bonjour <%= @resource.email %> !

- -

Quelqu’un a demandé à réinitialiser votre mot de passe sur Mastodon. Vous pouvez effectuer la réinitialisation en cliquant sur le lien ci-dessous.

- -

<%= link_to 'Modifier mon mot de passe', edit_password_url(@resource, reset_password_token: @token) %>

- -

Si vous n’êtes pas à l’origine de cette demande, vous pouvez ignorer ce message.

-

Votre mot de passe ne sera pas modifié tant que vous n’accéderez pas au lien ci-dessus et n’en choisirez pas un nouveau.

diff --git a/app/views/user_mailer/reset_password_instructions.he.html.erb b/app/views/user_mailer/reset_password_instructions.he.html.erb deleted file mode 100644 index 5d0930839..000000000 --- a/app/views/user_mailer/reset_password_instructions.he.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -
-

שלום <%= @resource.email %>!

- -

מישהו ביקש לינק להחלפת סיסמתך במסטודון. באפשרותך לעשות זאת ע"י בלחיצה על הקישורית שבהמשך.

- -

<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>

- -

אם בקשה זו לא הגיעה ממך, אפשר להתעלם מההודעה.

-

סיסמתך לא תוחלף לפני שהקישורית תיפתח בדפדפן וסיסמא חדשה תוכנס.

-
\ No newline at end of file diff --git a/app/views/user_mailer/reset_password_instructions.html.haml b/app/views/user_mailer/reset_password_instructions.html.haml new file mode 100644 index 000000000..c6a9d4bf6 --- /dev/null +++ b/app/views/user_mailer/reset_password_instructions.html.haml @@ -0,0 +1,60 @@ +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.hero + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center.padded + %table.hero-icon{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td + = image_tag asset_pack_path('icon_lock_open.svg') + + %h1= t 'devise.mailer.reset_password_instructions.title' + %p.lead= t 'devise.mailer.reset_password_instructions.explanation' + +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.content-start + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.button-cell + %table.button{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.button-primary + = link_to edit_password_url(@resource, reset_password_token: @token) do + %span= t 'devise.mailer.reset_password_instructions.action' + +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center.padded + %p= t 'devise.mailer.reset_password_instructions.extra' diff --git a/app/views/user_mailer/reset_password_instructions.id.html.erb b/app/views/user_mailer/reset_password_instructions.id.html.erb deleted file mode 100644 index f07e175ae..000000000 --- a/app/views/user_mailer/reset_password_instructions.id.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

Hai <%= @resource.email %>!

- -

Seseorang telah melakukan permintaan link untuk merubah kata sandi anda di Mastodon. Anda bisa melakukan ini melalui link dibawah ini.

- -

<%= link_to 'Ubah kata sandi saya', edit_password_url(@resource, reset_password_token: @token) %>

- -

Jika anda tidak memintanya, mohon abaikan email ini.

-

Password anda tidak akan diubah kecuali anda mengakses link di atas dan menggantinya.

diff --git a/app/views/user_mailer/reset_password_instructions.it.html.erb b/app/views/user_mailer/reset_password_instructions.it.html.erb deleted file mode 100644 index cc411dad3..000000000 --- a/app/views/user_mailer/reset_password_instructions.it.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

Ciao <%= @resource.email %>!

- -

Qualcuno ha richiesto un link per cambiare la tua password su Mastodon. Lo puoi fare tramite il link qui sotto.

- -

<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>

- -

Se non l'hai richiesto tu, ignora questa email.

-

La tua password non verrà cambiata finché non accedi al link qui sopra e ne crei una nuova.

diff --git a/app/views/user_mailer/reset_password_instructions.ja.html.erb b/app/views/user_mailer/reset_password_instructions.ja.html.erb deleted file mode 100644 index d0d7203f4..000000000 --- a/app/views/user_mailer/reset_password_instructions.ja.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

こんにちは<%= @resource.email %>さん

- -

Mastodonアカウントのパスワードの変更がリクエストされました。以下のリンクをクリックして操作を完了できます。

- -

<%= link_to 'パスワードを変更', edit_password_url(@resource, reset_password_token: @token) %>

- -

このメールに身に覚えのない場合は無視してください。

-

上記のリンクにアクセスし、変更をしない限りパスワードは変更されません。

diff --git a/app/views/user_mailer/reset_password_instructions.nl.html.erb b/app/views/user_mailer/reset_password_instructions.nl.html.erb deleted file mode 100644 index ca1748145..000000000 --- a/app/views/user_mailer/reset_password_instructions.nl.html.erb +++ /dev/null @@ -1,9 +0,0 @@ -

Hallo <%= @resource.email %>!

- -

Er heeft iemand een nieuw wachtwoord aangevraagd voor Mastodon. Je kan op de link hieronder klikken om jouw wach -twoord te veranderen.

- -

<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>

- -

Je kan deze e-mail negeren wanneer jij dit niet hebt aangevraagd.

-

Jouw wachtwoord blijft onveranderd wanneer je niet op bovenstaande link klikt.

diff --git a/app/views/user_mailer/reset_password_instructions.no.html.erb b/app/views/user_mailer/reset_password_instructions.no.html.erb deleted file mode 100644 index 398e95e4e..000000000 --- a/app/views/user_mailer/reset_password_instructions.no.html.erb +++ /dev/null @@ -1,9 +0,0 @@ - -

Hei <%= @resource.email %>!

- -

Noen har forespurt en lenke til å bytte passord på din Mastodon-bruker. Du kan gjøre det ved å følge lenken under.

- -

<%= link_to 'Endre mitt passord', edit_password_url(@resource, reset_password_token: @token) %>

- -

Hvis du ikke vil endre ditt passord kan du ignorere denne epost.

-

Passordet ditt blir ikke endret før du følger lenken over og endrer det.

diff --git a/app/views/user_mailer/reset_password_instructions.oc.html.erb b/app/views/user_mailer/reset_password_instructions.oc.html.erb deleted file mode 100644 index 92e4b8f8b..000000000 --- a/app/views/user_mailer/reset_password_instructions.oc.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

Bonjorn <%= @resource.email %> !

- -

Qualqu’un a demandat la reïnicializacion de vòstre senhal per Mastodon. Podètz realizar la reïnicializacion en clicant sul ligam çai-jos.

- -

<%= link_to 'Modificar mon senhal', edit_password_url(@resource, reset_password_token: @token) %>

- -

S’avètz pas res demandat, fasquètz pas cas a aqueste corrièl.

-

Vòstre senhal cambiarà pas se clicatz pas sul ligam e que ne causissètz pas un novèl.

diff --git a/app/views/user_mailer/reset_password_instructions.pl.html.erb b/app/views/user_mailer/reset_password_instructions.pl.html.erb deleted file mode 100644 index 2a9913a1d..000000000 --- a/app/views/user_mailer/reset_password_instructions.pl.html.erb +++ /dev/null @@ -1,9 +0,0 @@ -

Witaj, <%= @resource.email %>!

- -

Ktoś próbował zmienić Twoje hasło na <%= @instance %>. Możesz zrobić to klikając w -poniższy link.

- -

<%= link_to 'Zmień moje hasło', edit_password_url(@resource, reset_password_token: @token) %>

- -

Jeżeli to nie Ty, zignoruj ten e-mail.

-

Twoje hasło nie zostanie zmienione, dopóki nie użyjesz linku z podobnej wiadomości.

diff --git a/app/views/user_mailer/reset_password_instructions.pt-BR.html.erb b/app/views/user_mailer/reset_password_instructions.pt-BR.html.erb deleted file mode 100644 index 9b21aae92..000000000 --- a/app/views/user_mailer/reset_password_instructions.pt-BR.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

Olá, <%= @resource.email %>!

- -

Alguém solicitou um link para mudar a sua senha na instância <%= @instance %>. Você pode fazer isso através do link abaixo:

- -

<%= link_to 'Mudar a minha senha', edit_password_url(@resource, reset_password_token: @token) %>

- -

Se você não solicitou isso, por favor ignore este e-mail.

-

A senha não será modificada até que você acesse o link acima e crie uma nova.

diff --git a/app/views/user_mailer/reset_password_instructions.ru.html.erb b/app/views/user_mailer/reset_password_instructions.ru.html.erb deleted file mode 100644 index a24c9cc6c..000000000 --- a/app/views/user_mailer/reset_password_instructions.ru.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

Здравствуйте, <%= @resource.email %>!

- -

Кто-то отправил запрос о сбросе пароля для Вашего аккаунта Mastodon. Вы можете использовать для этого следующую ссылку:

- -

<%= edit_password_url(@resource, reset_password_token: @token) %>

- -

Если Вы не запрашивали сброс пароля, пожалуйста, проигнорируйте это сообщение.

-

Ваш пароль не будет изменен, пока вы не проследуете по вышеприведенной ссылке и не создадите новый.

diff --git a/app/views/user_mailer/reset_password_instructions.sr-Latn.html.erb b/app/views/user_mailer/reset_password_instructions.sr-Latn.html.erb deleted file mode 100644 index 7dede16b2..000000000 --- a/app/views/user_mailer/reset_password_instructions.sr-Latn.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

Zdravo <%= @resource.email %>!

- -

Neko je zatražio link za promenu lozinke na instanci <%= @instance %>. Ovo možete uraditi klikom na link ispod.

- -

<%= link_to 'Promeni moju lozinku', edit_password_url(@resource, reset_password_token: @token) %>

- -

Ignorišite ovu poruku, ako niste Vi bili ti koji ste zatražili promenu lozinke.

-

Lozinka se neće promeniti sve dok ne kliknete link iznad i ne napravite novu lozinku.

diff --git a/app/views/user_mailer/reset_password_instructions.sr.html.erb b/app/views/user_mailer/reset_password_instructions.sr.html.erb deleted file mode 100644 index be8d0c3ed..000000000 --- a/app/views/user_mailer/reset_password_instructions.sr.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

Здраво <%= @resource.email %>!

- -

Неко је затражио линк за промену лозинке на инстанци <%= @instance %>. Ово можете урадити кликом на линк испод.

- -

<%= link_to 'Промени моју лозинку', edit_password_url(@resource, reset_password_token: @token) %>

- -

Игноришите ову поруку, ако нисте Ви били ти који сте затражили промену лозинке.

-

Лозинка се неће променити све док не кликнете линк изнад и не направите нову лозинку.

diff --git a/app/views/user_mailer/reset_password_instructions.sv.html.erb b/app/views/user_mailer/reset_password_instructions.sv.html.erb deleted file mode 100644 index f38d2a39f..000000000 --- a/app/views/user_mailer/reset_password_instructions.sv.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

Hej <%= @resource.email %>!

- -

SNågon har begärt en länk för att ändra ditt lösenord på <%= @instance %>. Du kan göra det genom länken nedan.

- -

<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>

- -

Om du inte begärt detta, ignorerar du det här e-postmeddelandet.

-

Ditt lösenord ändras inte förrän du öppnar länken ovan och skapar en ny.

diff --git a/app/views/user_mailer/reset_password_instructions.th.html.erb b/app/views/user_mailer/reset_password_instructions.th.html.erb deleted file mode 100644 index 1fe1c2725..000000000 --- a/app/views/user_mailer/reset_password_instructions.th.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

สวัสดี <%= @resource.email %>!

- -

มีการแจ้งขอลิงค์เปลี่ยนแปลงพาสเวิร์ดเข้า Mastodon ของคุณ. คุณสามารถแก้ไขพาสเวิร์ดได้ผ่านทางลิงค์ด้านล่างนี้.

- -

<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>

- -

ถ้าคุณไม่ได้เป็นคนขอลิงค์นี้, กรุณาข้ามเมล์นี้ไป.

-

พาร์สเวิร์ดของคุณจะยังไม่ถูกเปลี่ยนจนกว่าคุณจะเข้าไปในลิงค์ด้านบนนี้เพื่อสร้างพาสเวิร์ดใหม่.

diff --git a/app/views/user_mailer/reset_password_instructions.tr.html.erb b/app/views/user_mailer/reset_password_instructions.tr.html.erb deleted file mode 100644 index d19c6c498..000000000 --- a/app/views/user_mailer/reset_password_instructions.tr.html.erb +++ /dev/null @@ -1,14 +0,0 @@ -

Merhaba <%= @resource.email %>

- -

Biri <%= @instance %> üzerinden sizin hesabınız için parola değişim isteği gönderdi. Aşağıdaki linke tıklayarak bunu gerçekleştirebilirsiniz.

- -

<%= link_to 'Parolamı değiştir', edit_password_url(@resource, reset_password_token: @token) %>

- -

Eğer bu isteği siz göndermediyseniz, lütfen bu e-postayı görmezden geliniz.

- -

Siz bu linke tıklayıp yeni bir parola girene kadar parolanız değişmeyecektir.

- -

En içten dileklerimizle,

- -

<%= @instance %> ekibi

- diff --git a/app/views/user_mailer/reset_password_instructions.zh-cn.html.erb b/app/views/user_mailer/reset_password_instructions.zh-cn.html.erb deleted file mode 100644 index 124305675..000000000 --- a/app/views/user_mailer/reset_password_instructions.zh-cn.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

<%= @resource.email %>,你好呀!

- -

有人想修改你在 <%= @instance %> 上的密码呢。如果你确实想修改密码的话,点击下面的链接吧:

- -

<%= link_to '修改密码', edit_password_url(@resource, reset_password_token: @token) %>

- -

如果你不想修改密码的话,还请忽略这封邮件哦。

-

在你点击上面的链接并修改密码前,你的密码是不会改变的。

diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index f2bf17364..53b39718d 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -8,6 +8,6 @@ Rails.application.config.assets.version = '1.0' # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. -# Rails.application.config.assets.precompile += %w(application_public.js custom.css) +# Rails.application.config.assets.precompile += %w() Rails.application.config.assets.initialize_on_precompile = true diff --git a/config/initializers/premailer_rails.rb b/config/initializers/premailer_rails.rb new file mode 100644 index 000000000..31c02dffa --- /dev/null +++ b/config/initializers/premailer_rails.rb @@ -0,0 +1,6 @@ +require_relative '../../lib/mastodon/premailer_webpack_strategy' + +Premailer::Rails.config.merge!(remove_ids: true, + adapter: :nokogiri, + generate_text_part: false, + strategies: [PremailerWebpackStrategy]) diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml index c5ae583ff..4b3f81edb 100644 --- a/config/locales/devise.en.yml +++ b/config/locales/devise.en.yml @@ -17,15 +17,32 @@ en: unconfirmed: You have to confirm your email address before continuing. mailer: confirmation_instructions: + action: Verify email address + explanation: You have created an account on %{host} with this email address. You are one click away from activating it. If this wasn't you, please ignore this e-mail. + extra_html: Please also check out our
terms of service and privacy policy. subject: 'Mastodon: Confirmation instructions for %{instance}' + title: Verify e-mail address email_changed: + explanation: 'The email address for your account is being changed to:' + extra: If you did not change your email, it is likely that someone has gained access to your account. Please change your password immediately or contact the instance admin if you're locked out of your account. subject: 'Mastodon: Email changed' + title: New email address password_change: + explanation: The password for your account has been changed. + extra: If you did not change your password, it is likely that someone has gained access to your account. Please change your password immediately or contact the instance admin if you're locked out of your account. subject: 'Mastodon: Password changed' + title: Password changed reconfirmation_instructions: + explanation: Confirm the new address to change your email. + extra: If this change wasn't initiated by you, please ignore this email. The email address for the Mastodon account won't change until you access the link above. subject: 'Mastodon: Confirm email for %{instance}' + title: Verify email address reset_password_instructions: + action: Change password + explanation: You requested a new password for your account. + extra: If you didn't request this, please ignore this email. Your password won't change until you access the link above and create a new one. subject: 'Mastodon: Reset password instructions' + title: Password reset unlock_instructions: subject: 'Mastodon: Unlock instructions' omniauth_callbacks: diff --git a/config/locales/en.yml b/config/locales/en.yml index 23dce73e9..93ff88fd8 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -338,6 +338,7 @@ en: body: "%{reporter} has reported %{target}" subject: New report for %{instance} (#%{id}) application_mailer: + notification_preferences: Change e-mail preferences salutation: "%{name}," settings: 'Change e-mail preferences: %{link}' signature: Mastodon notifications from %{instance} diff --git a/lib/mastodon/premailer_webpack_strategy.rb b/lib/mastodon/premailer_webpack_strategy.rb new file mode 100644 index 000000000..4ea3ce80c --- /dev/null +++ b/lib/mastodon/premailer_webpack_strategy.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module PremailerWebpackStrategy + def load(url) + if Webpacker.dev_server.running? + url = File.join("#{Webpacker.dev_server.protocol}://#{Webpacker.dev_server.host_with_port}", url) + HTTP.get(url).to_s + else + url = url[1..-1] if url.start_with?('/') + File.read(Rails.root.join('public', url)) + end + end + + module_function :load +end diff --git a/spec/mailers/previews/notification_mailer_preview.rb b/spec/mailers/previews/notification_mailer_preview.rb index a08a80d17..99495d862 100644 --- a/spec/mailers/previews/notification_mailer_preview.rb +++ b/spec/mailers/previews/notification_mailer_preview.rb @@ -1,4 +1,5 @@ # Preview all emails at http://localhost:3000/rails/mailers/notification_mailer + class NotificationMailerPreview < ActionMailer::Preview # Preview this email at http://localhost:3000/rails/mailers/notification_mailer/mention def mention diff --git a/spec/mailers/previews/user_mailer_preview.rb b/spec/mailers/previews/user_mailer_preview.rb new file mode 100644 index 000000000..6ed0090f4 --- /dev/null +++ b/spec/mailers/previews/user_mailer_preview.rb @@ -0,0 +1,32 @@ +# Preview all emails at http://localhost:3000/rails/mailers/user_mailer + +class UserMailerPreview < ActionMailer::Preview + # Preview this email at http://localhost:3000/rails/mailers/user_mailer/confirmation_instructions + def confirmation_instructions + UserMailer.confirmation_instructions(User.first, 'spec') + end + + # Preview this email at http://localhost:3000/rails/mailers/user_mailer/email_changed + def email_changed + user = User.first + user.unconfirmed_email = 'foo@bar.com' + UserMailer.email_changed(user) + end + + # Preview this email at http://localhost:3000/rails/mailers/user_mailer/password_change + def password_change + UserMailer.password_change(User.first) + end + + # Preview this email at http://localhost:3000/rails/mailers/user_mailer/reconfirmation_instructions + def reconfirmation_instructions + user = User.first + user.unconfirmed_email = 'foo@bar.com' + UserMailer.confirmation_instructions(user, 'spec') + end + + # Preview this email at http://localhost:3000/rails/mailers/user_mailer/reset_password_instructions + def reset_password_instructions + UserMailer.reset_password_instructions(User.first, 'spec') + end +end From e6fd4bea35d311f9d2a3569fb0165bbaaf9c593b Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Tue, 16 Jan 2018 14:15:28 +0900 Subject: [PATCH 11/72] Stop duplicate CI with Pull Request (#6265) see also https://blog.travis-ci.com/2012-08-13-build-workflow-around-pull-requests --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 777ca581c..59d495c43 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,9 @@ cache: - tmp/cache/babel-loader dist: trusty sudo: required +branches: + only: + - master notifications: email: false From 9a28052e92702463098570a181b2f7b2e8859b1e Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Tue, 16 Jan 2018 14:26:46 +0900 Subject: [PATCH 12/72] Change image URL in mailer to full path (#6264) --- app/mailers/user_mailer.rb | 2 ++ app/views/layouts/mailer.html.haml | 4 ++-- app/views/user_mailer/confirmation_instructions.html.haml | 2 +- app/views/user_mailer/email_changed.html.haml | 2 +- app/views/user_mailer/password_change.html.haml | 2 +- app/views/user_mailer/reconfirmation_instructions.html.haml | 2 +- app/views/user_mailer/reset_password_instructions.html.haml | 2 +- 7 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 7821be32b..a7efa73c1 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -5,6 +5,8 @@ class UserMailer < Devise::Mailer helper :instance + add_template_helper RoutingHelper + def confirmation_instructions(user, token, **) @resource = user @token = token diff --git a/app/views/layouts/mailer.html.haml b/app/views/layouts/mailer.html.haml index 8a7ce4369..e41b91069 100644 --- a/app/views/layouts/mailer.html.haml +++ b/app/views/layouts/mailer.html.haml @@ -24,7 +24,7 @@ %tr %td.column-cell = link_to root_url do - = image_tag asset_pack_path('logo_full.svg'), height: 34, class: 'logo' + = image_tag full_pack_url('logo_full.svg'), alt: 'Mastodon', height: 34, class: 'logo' = yield @@ -52,4 +52,4 @@ %tbody %td.column-cell.text-right = link_to root_url do - = image_tag asset_pack_path('logo_transparent.svg'), height: 24 + = image_tag full_pack_url('logo_transparent.svg'), alt: 'Mastodon', height: 24 diff --git a/app/views/user_mailer/confirmation_instructions.html.haml b/app/views/user_mailer/confirmation_instructions.html.haml index 7a148ec72..0f999bcbc 100644 --- a/app/views/user_mailer/confirmation_instructions.html.haml +++ b/app/views/user_mailer/confirmation_instructions.html.haml @@ -17,7 +17,7 @@ %tbody %tr %td - = image_tag asset_pack_path('icon_email.svg') + = image_tag full_pack_url('icon_email.svg'), alt: '' %h1= t 'devise.mailer.confirmation_instructions.title' diff --git a/app/views/user_mailer/email_changed.html.haml b/app/views/user_mailer/email_changed.html.haml index e526f3a2c..45dc06650 100644 --- a/app/views/user_mailer/email_changed.html.haml +++ b/app/views/user_mailer/email_changed.html.haml @@ -17,7 +17,7 @@ %tbody %tr %td - = image_tag asset_pack_path('icon_email.svg') + = image_tag full_pack_url('icon_email.svg'), alt: '' %h1= t 'devise.mailer.email_changed.title' %p.lead= t 'devise.mailer.email_changed.explanation' diff --git a/app/views/user_mailer/password_change.html.haml b/app/views/user_mailer/password_change.html.haml index a0afd5930..2e9377dff 100644 --- a/app/views/user_mailer/password_change.html.haml +++ b/app/views/user_mailer/password_change.html.haml @@ -17,7 +17,7 @@ %tbody %tr %td - = image_tag asset_pack_path('icon_lock_open.svg') + = image_tag full_pack_url('icon_lock_open.svg'), alt: '' %h1= t 'devise.mailer.password_change.title' %p.lead= t 'devise.mailer.password_change.explanation' diff --git a/app/views/user_mailer/reconfirmation_instructions.html.haml b/app/views/user_mailer/reconfirmation_instructions.html.haml index 52855e223..3ae226093 100644 --- a/app/views/user_mailer/reconfirmation_instructions.html.haml +++ b/app/views/user_mailer/reconfirmation_instructions.html.haml @@ -17,7 +17,7 @@ %tbody %tr %td - = image_tag asset_pack_path('icon_email.svg') + = image_tag full_pack_url('icon_email.svg'), alt: '' %h1= t 'devise.mailer.reconfirmation_instructions.title' %p.lead= t 'devise.mailer.reconfirmation_instructions.explanation' diff --git a/app/views/user_mailer/reset_password_instructions.html.haml b/app/views/user_mailer/reset_password_instructions.html.haml index c6a9d4bf6..c0e6775d4 100644 --- a/app/views/user_mailer/reset_password_instructions.html.haml +++ b/app/views/user_mailer/reset_password_instructions.html.haml @@ -17,7 +17,7 @@ %tbody %tr %td - = image_tag asset_pack_path('icon_lock_open.svg') + = image_tag full_pack_url('icon_lock_open.svg'), alt: '' %h1= t 'devise.mailer.reset_password_instructions.title' %p.lead= t 'devise.mailer.reset_password_instructions.explanation' From 3323b4173edad987a049c6c1c2903781ed5be059 Mon Sep 17 00:00:00 2001 From: SerCom_KC Date: Tue, 16 Jan 2018 13:44:57 +0800 Subject: [PATCH 13/72] Change disclaimer in email according to #5817 (#6266) --- config/locales/devise.en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml index 4b3f81edb..19c146322 100644 --- a/config/locales/devise.en.yml +++ b/config/locales/devise.en.yml @@ -19,7 +19,7 @@ en: confirmation_instructions: action: Verify email address explanation: You have created an account on %{host} with this email address. You are one click away from activating it. If this wasn't you, please ignore this e-mail. - extra_html: Please also check out our terms of service and privacy policy. + extra_html: Please also check out the rules of the instance and our terms of service. subject: 'Mastodon: Confirmation instructions for %{instance}' title: Verify e-mail address email_changed: From 02194838dd64558cd974e68cb0bf800dffd25c91 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 16 Jan 2018 20:20:15 +0100 Subject: [PATCH 14/72] HTML e-mails for NotificationMailer (#6263) * HTML e-mails for NotificationMailer (except digest) * Add HTML template for digest * Fix build --- app/javascript/images/icon_cached.svg | 4 + app/javascript/images/icon_grade.svg | 4 + app/javascript/images/icon_person_add.svg | 4 + app/javascript/images/icon_reply.svg | 4 + app/javascript/styles/mailer.scss | 78 +++++++++++++++++++ app/mailers/notification_mailer.rb | 4 +- .../notification_mailer/_status.html.haml | 30 +++++++ .../notification_mailer/digest.html.haml | 44 +++++++++++ .../notification_mailer/favourite.html.haml | 45 +++++++++++ .../notification_mailer/follow.html.haml | 43 ++++++++++ .../follow_request.html.haml | 43 ++++++++++ .../notification_mailer/mention.html.haml | 45 +++++++++++ .../notification_mailer/reblog.html.haml | 45 +++++++++++ config/locales/en.yml | 16 +++- .../previews/notification_mailer_preview.rb | 6 ++ 15 files changed, 410 insertions(+), 5 deletions(-) create mode 100644 app/javascript/images/icon_cached.svg create mode 100644 app/javascript/images/icon_grade.svg create mode 100644 app/javascript/images/icon_person_add.svg create mode 100644 app/javascript/images/icon_reply.svg create mode 100644 app/views/notification_mailer/_status.html.haml create mode 100644 app/views/notification_mailer/digest.html.haml create mode 100644 app/views/notification_mailer/favourite.html.haml create mode 100644 app/views/notification_mailer/follow.html.haml create mode 100644 app/views/notification_mailer/follow_request.html.haml create mode 100644 app/views/notification_mailer/mention.html.haml create mode 100644 app/views/notification_mailer/reblog.html.haml diff --git a/app/javascript/images/icon_cached.svg b/app/javascript/images/icon_cached.svg new file mode 100644 index 000000000..8fdd63f44 --- /dev/null +++ b/app/javascript/images/icon_cached.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/javascript/images/icon_grade.svg b/app/javascript/images/icon_grade.svg new file mode 100644 index 000000000..f48b46889 --- /dev/null +++ b/app/javascript/images/icon_grade.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/javascript/images/icon_person_add.svg b/app/javascript/images/icon_person_add.svg new file mode 100644 index 000000000..068b8ae7c --- /dev/null +++ b/app/javascript/images/icon_person_add.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/javascript/images/icon_reply.svg b/app/javascript/images/icon_reply.svg new file mode 100644 index 000000000..cf6a09abc --- /dev/null +++ b/app/javascript/images/icon_reply.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/javascript/styles/mailer.scss b/app/javascript/styles/mailer.scss index 2fd3f2661..d84763612 100644 --- a/app/javascript/styles/mailer.scss +++ b/app/javascript/styles/mailer.scss @@ -254,6 +254,10 @@ h3 { .content-cell { background-color: darken($ui-base-color, 4%); + + &.darker { + background-color: darken($ui-base-color, 8%); + } } .hero { @@ -261,6 +265,18 @@ h3 { padding-top: 20px; } +.hero-with-button { + h1 { + margin-bottom: 4px; + } + + p.lead { + margin-bottom: 32px; + } + + padding-bottom: 16px; +} + .header { border-radius: 5px 5px 0 0; background-color: darken($ui-base-color, 8%); @@ -385,6 +401,68 @@ h3 { } } +.hr { + width: 100%; + + td { + font-size: 0; + line-height: 1px; + mso-line-height-rule: exactly; + min-height: 1px; + overflow: hidden; + height: 2px; + background-color: transparent !important; + border-top: 1px solid lighten($ui-base-color, 8%); + } +} + +.status { + padding-bottom: 32px; + + .status-header { + td { + font-size: 14px; + padding-bottom: 15px; + } + + bdi { + color: $white; + font-size: 16px; + display: block; + font-weight: 500; + } + + td:first-child { + padding-right: 10px; + } + + img { + width: 48px; + height: 48px; + border-radius: 4px; + } + } + + p { + font-size: 19px; + margin-bottom: 20px; + + &.status-footer { + color: lighten($ui-base-color, 26%); + font-size: 14px; + margin-bottom: 0; + + a { + color: lighten($ui-base-color, 26%); + } + } + } +} + +.border-top { + border-top: 1px solid lighten($ui-base-color, 8%); +} + @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) { body { min-height: 1024px !important; diff --git a/app/mailers/notification_mailer.rb b/app/mailers/notification_mailer.rb index 07992102d..9fed4a636 100644 --- a/app/mailers/notification_mailer.rb +++ b/app/mailers/notification_mailer.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true class NotificationMailer < ApplicationMailer - layout 'plain_mailer' - helper :stream_entries + add_template_helper RoutingHelper + def mention(recipient, notification) @me = recipient @status = notification.target_status diff --git a/app/views/notification_mailer/_status.html.haml b/app/views/notification_mailer/_status.html.haml new file mode 100644 index 000000000..1e796ed29 --- /dev/null +++ b/app/views/notification_mailer/_status.html.haml @@ -0,0 +1,30 @@ +- i ||= 0 + +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell{ class: i.zero? ? 'content-start' : nil } + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.padded.status + %table.status-header{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td{ align: 'left', width: 48 } + = image_tag status.account.avatar + %td{ align: 'left' } + %bdi= display_name(status.account) + = "@#{status.account.acct}" + + = Formatter.instance.format(status) + + %p.status-footer + = link_to l(status.created_at), web_url("statuses/#{status.id}") diff --git a/app/views/notification_mailer/digest.html.haml b/app/views/notification_mailer/digest.html.haml new file mode 100644 index 000000000..10e44f8dd --- /dev/null +++ b/app/views/notification_mailer/digest.html.haml @@ -0,0 +1,44 @@ +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.darker.hero-with-button + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center.padded + %h1= t 'notification_mailer.digest.title' + %p.lead= t('notification_mailer.digest.body', since: l(@since.to_date, format: :short), instance: site_hostname) + %table.button{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.button-primary + = link_to web_url do + %span= t 'notification_mailer.digest.action' + +- @notifications.each_with_index do |n, i| + = render 'status', status: n.target_status, i: i + +- unless @follows_since.zero? + %table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.content-start.border-top + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center + %p= t('notification_mailer.digest.new_followers_summary', count: @follows_since) diff --git a/app/views/notification_mailer/favourite.html.haml b/app/views/notification_mailer/favourite.html.haml new file mode 100644 index 000000000..6cbc552fa --- /dev/null +++ b/app/views/notification_mailer/favourite.html.haml @@ -0,0 +1,45 @@ +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.hero + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center.padded + %table.hero-icon{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td + = image_tag asset_pack_path('icon_grade.svg') + + %h1= t 'notification_mailer.favourite.title' + %p.lead= t('notification_mailer.favourite.body', name: @account.acct) + += render 'status', status: @status + +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.content-start.border-top + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.button-cell + %table.button{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.button-primary + = link_to web_url("statuses/#{@status.id}") do + %span= t 'application_mailer.view_status' diff --git a/app/views/notification_mailer/follow.html.haml b/app/views/notification_mailer/follow.html.haml new file mode 100644 index 000000000..d1ae18ea9 --- /dev/null +++ b/app/views/notification_mailer/follow.html.haml @@ -0,0 +1,43 @@ +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.hero + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center.padded + %table.hero-icon{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td + = image_tag asset_pack_path('icon_person_add.svg') + + %h1= t 'notification_mailer.follow.title' + %p.lead= t('notification_mailer.follow.body', name: @account.acct) + +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.content-start + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.button-cell + %table.button{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.button-primary + = link_to web_url("accounts/#{@account.id}") do + %span= t 'application_mailer.view_profile' diff --git a/app/views/notification_mailer/follow_request.html.haml b/app/views/notification_mailer/follow_request.html.haml new file mode 100644 index 000000000..ce5f578b1 --- /dev/null +++ b/app/views/notification_mailer/follow_request.html.haml @@ -0,0 +1,43 @@ +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.hero + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center.padded + %table.hero-icon{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td + = image_tag asset_pack_path('icon_person_add.svg') + + %h1= t 'notification_mailer.follow_request.title' + %p.lead= t('notification_mailer.follow_request.body', name: @account.acct) + +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.content-start + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.button-cell + %table.button{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.button-primary + = link_to web_url("follow_requests") do + %span= t 'notification_mailer.follow_request.action' diff --git a/app/views/notification_mailer/mention.html.haml b/app/views/notification_mailer/mention.html.haml new file mode 100644 index 000000000..9ecbe8550 --- /dev/null +++ b/app/views/notification_mailer/mention.html.haml @@ -0,0 +1,45 @@ +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.hero + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center.padded + %table.hero-icon{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td + = image_tag asset_pack_path('icon_reply.svg') + + %h1= t 'notification_mailer.mention.title' + %p.lead= t('notification_mailer.mention.body', name: @status.account.acct) + += render 'status', status: @status + +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.content-start.border-top + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.button-cell + %table.button{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.button-primary + = link_to web_url("statuses/#{@status.id}") do + %span= t 'notification_mailer.mention.action' diff --git a/app/views/notification_mailer/reblog.html.haml b/app/views/notification_mailer/reblog.html.haml new file mode 100644 index 000000000..895e903ea --- /dev/null +++ b/app/views/notification_mailer/reblog.html.haml @@ -0,0 +1,45 @@ +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.hero + .email-row + .col-6 + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.text-center.padded + %table.hero-icon{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td + = image_tag asset_pack_path('icon_cached.svg') + + %h1= t 'notification_mailer.reblog.title' + %p.lead= t('notification_mailer.reblog.body', name: @account.acct) + += render 'status', status: @status + +%table.email-table{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.email-body + .email-container + %table.content-section{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.content-cell.content-start.border-top + %table.column{ cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.column-cell.button-cell + %table.button{ align: 'center', cellspacing: 0, cellpadding: 0 } + %tbody + %tr + %td.button-primary + = link_to web_url("statuses/#{@status.id}") do + %span= t 'application_mailer.view_status' diff --git a/config/locales/en.yml b/config/locales/en.yml index 93ff88fd8..7b9a1f15d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -343,6 +343,7 @@ en: settings: 'Change e-mail preferences: %{link}' signature: Mastodon notifications from %{instance} view: 'View:' + view_status: View status applications: created: Application successfully created destroyed: Application successfully deleted @@ -483,29 +484,38 @@ en: title: Moderation notification_mailer: digest: - body: 'Here is a brief summary of what you missed on %{instance} since your last visit on %{since}:' + action: View all notifications + body: Here is a brief summary of the messages you missed since your last visit on %{since} mention: "%{name} mentioned you in:" new_followers_summary: - one: You have acquired one new follower! Yay! - other: You have gotten %{count} new followers! Amazing! + one: Also, you have acquired one new follower while being away! Yay! + other: Also, you have acquired %{count} new followers while being away! Amazing! subject: one: "1 new notification since your last visit \U0001F418" other: "%{count} new notifications since your last visit \U0001F418" + title: In your absence… favourite: body: 'Your status was favourited by %{name}:' subject: "%{name} favourited your status" + title: New favourite follow: body: "%{name} is now following you!" subject: "%{name} is now following you" + title: New follower follow_request: + action: Manage follow requests body: "%{name} has requested to follow you" subject: 'Pending follower: %{name}' + title: New follow request mention: + action: Reply body: 'You were mentioned by %{name} in:' subject: You were mentioned by %{name} + title: New mention reblog: body: 'Your status was boosted by %{name}:' subject: "%{name} boosted your status" + title: New boost number: human: decimal_units: diff --git a/spec/mailers/previews/notification_mailer_preview.rb b/spec/mailers/previews/notification_mailer_preview.rb index 99495d862..e31445c36 100644 --- a/spec/mailers/previews/notification_mailer_preview.rb +++ b/spec/mailers/previews/notification_mailer_preview.rb @@ -13,6 +13,12 @@ class NotificationMailerPreview < ActionMailer::Preview NotificationMailer.follow(f.target_account, Notification.find_by(activity: f)) end + # Preview this email at http://localhost:3000/rails/mailers/notification_mailer/follow_request + def follow_request + f = Follow.last + NotificationMailer.follow_request(f.target_account, Notification.find_by(activity: f)) + end + # Preview this email at http://localhost:3000/rails/mailers/notification_mailer/favourite def favourite f = Favourite.last From eed7484cd6541b93452cd7aa62a3f61c361c89cc Mon Sep 17 00:00:00 2001 From: mayaeh Date: Wed, 17 Jan 2018 20:41:24 +0900 Subject: [PATCH 15/72] Change mailer image url (#6279) * Change image URL in mailer to full path * Add application_mailer.view_profile localization. --- app/views/notification_mailer/favourite.html.haml | 2 +- app/views/notification_mailer/follow.html.haml | 2 +- app/views/notification_mailer/follow_request.html.haml | 2 +- app/views/notification_mailer/mention.html.haml | 2 +- app/views/notification_mailer/reblog.html.haml | 2 +- config/locales/en.yml | 1 + 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/views/notification_mailer/favourite.html.haml b/app/views/notification_mailer/favourite.html.haml index 6cbc552fa..f26b08b18 100644 --- a/app/views/notification_mailer/favourite.html.haml +++ b/app/views/notification_mailer/favourite.html.haml @@ -17,7 +17,7 @@ %tbody %tr %td - = image_tag asset_pack_path('icon_grade.svg') + = image_tag full_pack_url('icon_grade.svg'), alt:'' %h1= t 'notification_mailer.favourite.title' %p.lead= t('notification_mailer.favourite.body', name: @account.acct) diff --git a/app/views/notification_mailer/follow.html.haml b/app/views/notification_mailer/follow.html.haml index d1ae18ea9..1290e2bc4 100644 --- a/app/views/notification_mailer/follow.html.haml +++ b/app/views/notification_mailer/follow.html.haml @@ -17,7 +17,7 @@ %tbody %tr %td - = image_tag asset_pack_path('icon_person_add.svg') + = image_tag full_pack_url('icon_person_add.svg'), alt: '' %h1= t 'notification_mailer.follow.title' %p.lead= t('notification_mailer.follow.body', name: @account.acct) diff --git a/app/views/notification_mailer/follow_request.html.haml b/app/views/notification_mailer/follow_request.html.haml index ce5f578b1..41efeafaf 100644 --- a/app/views/notification_mailer/follow_request.html.haml +++ b/app/views/notification_mailer/follow_request.html.haml @@ -17,7 +17,7 @@ %tbody %tr %td - = image_tag asset_pack_path('icon_person_add.svg') + = image_tag full_pack_url('icon_person_add.svg'), alt: '' %h1= t 'notification_mailer.follow_request.title' %p.lead= t('notification_mailer.follow_request.body', name: @account.acct) diff --git a/app/views/notification_mailer/mention.html.haml b/app/views/notification_mailer/mention.html.haml index 9ecbe8550..619c580ce 100644 --- a/app/views/notification_mailer/mention.html.haml +++ b/app/views/notification_mailer/mention.html.haml @@ -17,7 +17,7 @@ %tbody %tr %td - = image_tag asset_pack_path('icon_reply.svg') + = image_tag full_pack_url('icon_reply.svg'), alt: '' %h1= t 'notification_mailer.mention.title' %p.lead= t('notification_mailer.mention.body', name: @status.account.acct) diff --git a/app/views/notification_mailer/reblog.html.haml b/app/views/notification_mailer/reblog.html.haml index 895e903ea..61c6ee6be 100644 --- a/app/views/notification_mailer/reblog.html.haml +++ b/app/views/notification_mailer/reblog.html.haml @@ -17,7 +17,7 @@ %tbody %tr %td - = image_tag asset_pack_path('icon_cached.svg') + = image_tag full_pack_url('icon_cached.svg'), alt: '' %h1= t 'notification_mailer.reblog.title' %p.lead= t('notification_mailer.reblog.body', name: @account.acct) diff --git a/config/locales/en.yml b/config/locales/en.yml index 7b9a1f15d..f23f35a89 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -343,6 +343,7 @@ en: settings: 'Change e-mail preferences: %{link}' signature: Mastodon notifications from %{instance} view: 'View:' + view_profile: View Profile view_status: View status applications: created: Application successfully created From acb982fc6677e727980ac71f58e64d35e9576a3b Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Wed, 17 Jan 2018 20:42:11 +0900 Subject: [PATCH 16/72] Korean translate (#6277) * Translate Korean * Translate Korean #6263 --- config/locales/ko.yml | 64 +++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 9e3505a72..b0bac4c1d 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -48,8 +48,8 @@ ko: remote_follow: 리모트 팔로우 reserved_username: 이 아이디는 예약되어 있습니다. roles: - admin: Admin - moderator: 모드 + admin: 관리자 + moderator: 모더레이터 unfollow: 팔로우 해제 admin: account_moderation_notes: @@ -105,7 +105,7 @@ ko: perform_full_suspension: 완전히 정지시키기 profile_url: 프로필 URL promote: 모더레이터로 승급 - protocol: Protocol + protocol: 프로토콜 public: 전체 공개 push_subscription_expires: PuSH 구독 기간 만료 redownload: 아바타 업데이트 @@ -133,7 +133,7 @@ ko: undo_suspension: 정지 해제 unsubscribe: 구독 해제 username: 아이디 - web: Web + web: 웹 action_logs: actions: confirm_user: "%{name}이 %{target}의 이메일 주소를 컨펌했습니다" @@ -338,9 +338,12 @@ ko: body: "%{reporter} 가 %{target} 를 신고했습니다" subject: "%{instance} 에 새 신고 등록됨 (#%{id})" application_mailer: + notification_preferences: 메일 설정 변경 settings: '메일 설정을 변경: %{link}' signature: Mastodon %{instance} 인스턴스로에서 알림 view: 'View:' + view_profile: 프로필 보기 + view_status: 게시물 보기 applications: created: 애플리케이션이 작성되었습니다. destroyed: 애플리케이션이 삭제되었습니다. @@ -481,6 +484,7 @@ ko: title: 모더레이션 notification_mailer: digest: + action: 모든 알림 보기 body: "%{instance} 에서 마지막 로그인 뒤로 일어난 일:" mention: "%{name} 님이 답장했습니다:" new_followers_summary: @@ -489,21 +493,29 @@ ko: subject: one: "1건의 새로운 알림 \U0001F418" other: "%{count}건의 새로운 알림 \U0001F418" + title: 당신이 없는 동안에… favourite: body: "%{name} 님이 내 툿을 즐겨찾기에 등록했습니다." subject: "%{name} 님이 내 툿을 즐겨찾기에 등록했습니다" + title: 새 즐겨찾기 follow: body: "%{name} 님이 나를 팔로우 했습니다" subject: "%{name} 님이 나를 팔로우 했습니다" + title: 새 팔로워 follow_request: + action: 팔로우 요청 관리 body: "%{name} 님이 내게 팔로우 요청을 보냈습니다." subject: "%{name} 님이 보낸 팔로우 요청" + title: 새 팔로우 요청 mention: + action: 답장 body: "%{name} 님이 답장을 보냈습니다:" subject: "%{name} 님이 답장을 보냈습니다" + title: 새 멘션 reblog: body: "%{name} 님이 내 툿을 부스트 했습니다:" subject: "%{name} 님이 내 툿을 부스트 했습니다" + title: 새 부스트 number: human: decimal_units: @@ -547,38 +559,38 @@ ko: activity: 마지막 활동 browser: 브라우저 browsers: - alipay: Alipay - blackberry: Blackberry - chrome: Chrome - edge: Microsoft Edge - firefox: Firefox + alipay: 알리페이 + blackberry: 블랙베리 + chrome: 크롬 + edge: 엣지 + firefox: 파이어폭스 generic: 알 수 없는 브라우저 - ie: Internet Explorer + ie: IE micro_messenger: MicroMessenger - nokia: Nokia S40 Ovi Browser - opera: Opera + nokia: 노키아 S40 Ovi 브라우저 + opera: 오페라 phantom_js: PhantomJS - qq: QQ Browser - safari: Safari + qq: QQ 브라우저 + safari: 사파리 uc_browser: UCBrowser - weibo: Weibo + weibo: 웨이보 current_session: 현재 세션 - description: "%{browser} on %{platform}" + description: "%{platform}의 %{browser}" explanation: 내 Mastodon 계정에 현재 로그인 중인 웹 브라우저 목록입니다. ip: IP platforms: - adobe_air: Adobe Air - android: Android - blackberry: Blackberry - chrome_os: ChromeOS - firefox_os: Firefox OS + adobe_air: 어도비 에어 + android: 안드로이드 + blackberry: 블랙베리 + chrome_os: 크롬OS + firefox_os: 파이어폭스OS ios: iOS - linux: Linux - mac: Mac + linux: 리눅스 + mac: 맥 other: 알 수 없는 플랫폼 - windows: Windows - windows_mobile: Windows Mobile - windows_phone: Windows Phone + windows: 윈도우즈 + windows_mobile: 윈도우즈 모바일 + windows_phone: 윈도우즈 폰 revoke: 삭제 revoke_success: 세션이 삭제되었습니다. title: 세션 From ea75ae2d1fd987075f600fca66003e2f69cc6cca Mon Sep 17 00:00:00 2001 From: Mike Burns Date: Wed, 17 Jan 2018 06:45:09 -0500 Subject: [PATCH 17/72] Use be_within instead of eq for a to_f test match (#6275) Floating point values are notoriously hard to pin down, so use the `be_within` matcher to verify the approximate value. --- spec/services/precompute_feed_service_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/services/precompute_feed_service_spec.rb b/spec/services/precompute_feed_service_spec.rb index d1ef6c184..396a3c3fb 100644 --- a/spec/services/precompute_feed_service_spec.rb +++ b/spec/services/precompute_feed_service_spec.rb @@ -16,7 +16,7 @@ RSpec.describe PrecomputeFeedService do subject.call(account) - expect(Redis.current.zscore(FeedManager.instance.key(:home, account.id), reblog.id)).to eq status.id.to_f + expect(Redis.current.zscore(FeedManager.instance.key(:home, account.id), reblog.id)).to be_within(0.1).of(status.id.to_f) end it 'does not raise an error even if it could not find any status' do From 6f244ba82c5821e2e8af11597ff970e7af445160 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 17 Jan 2018 14:12:59 +0100 Subject: [PATCH 18/72] Use better reblog icon and improve contrast in HTML e-mails (#6272) --- app/javascript/images/icon_cached.svg | 6 ++---- app/javascript/styles/mailer.scss | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/javascript/images/icon_cached.svg b/app/javascript/images/icon_cached.svg index 8fdd63f44..1087c4350 100644 --- a/app/javascript/images/icon_cached.svg +++ b/app/javascript/images/icon_cached.svg @@ -1,4 +1,2 @@ - - - - \ No newline at end of file + + diff --git a/app/javascript/styles/mailer.scss b/app/javascript/styles/mailer.scss index d84763612..e6422b2ea 100644 --- a/app/javascript/styles/mailer.scss +++ b/app/javascript/styles/mailer.scss @@ -300,7 +300,7 @@ h3 { .footer { .column-cell, p { - color: lighten($ui-base-color, 26%); + color: lighten($ui-base-color, 34%); } p { @@ -313,7 +313,7 @@ h3 { } a { - color: lighten($ui-base-color, 26%); + color: lighten($ui-base-color, 34%); text-decoration: underline; } @@ -363,7 +363,7 @@ h3 { } .button-primary { - background-color: $ui-highlight-color; + background-color: darken($ui-highlight-color, 3%); } .text-center { From fb16c37d2a780c385e0ce00d136f749036778314 Mon Sep 17 00:00:00 2001 From: SerCom_KC Date: Wed, 17 Jan 2018 23:47:25 +0800 Subject: [PATCH 19/72] Update Simplified Chinese translations (#6280) * i18n: (zh-CN) Update translation for #6252 * e-mail -> email * i18n: (zh-CN) Update translations for #6256 * i18n: (zh-CN) Minor Improvements * i18n: (zh-CN) Update translations for #6263 * i18n: (zh-CN) Update translations for #6279 --- app/javascript/mastodon/locales/zh-CN.json | 12 ++++++------ config/locales/devise.en.yml | 4 ++-- config/locales/devise.zh-CN.yml | 21 +++++++++++++++++++-- config/locales/simple_form.zh-CN.yml | 2 +- config/locales/zh-CN.yml | 18 +++++++++++++++--- 5 files changed, 43 insertions(+), 14 deletions(-) diff --git a/app/javascript/mastodon/locales/zh-CN.json b/app/javascript/mastodon/locales/zh-CN.json index ef850256c..b6435a260 100644 --- a/app/javascript/mastodon/locales/zh-CN.json +++ b/app/javascript/mastodon/locales/zh-CN.json @@ -170,10 +170,10 @@ "notifications.column_settings.sound": "播放音效", "onboarding.done": "出发!", "onboarding.next": "下一步", - "onboarding.page_five.public_timelines": "本站时间轴显示的是由本站({domain})用户发布的所有公开嘟文。跨站公共时间轴显示的的是由本站用户关注对象所发布的所有公开嘟文。这些就是寻人好去处的公共时间轴啦。", - "onboarding.page_four.home": "你的主页时间轴上显示的是你的关注对象所发布的嘟文。", - "onboarding.page_four.notifications": "如果有人与你互动了,他们就会出现在通知栏中哦~", - "onboarding.page_one.federation": "Mastodon 是由一系列独立的服务器共同打造的强大的社交网络,我们将这些各自独立而又相互连接的服务器叫做实例。", + "onboarding.page_five.public_timelines": "“本站时间轴”显示的是由本站({domain})用户发布的所有公开嘟文。“跨站公共时间轴”显示的的是由本站用户关注对象所发布的所有公开嘟文。这些就是寻人好去处的公共时间轴啦。", + "onboarding.page_four.home": "你的“主页”时间轴上显示的是你的关注对象所发布的嘟文。", + "onboarding.page_four.notifications": "如果有人与你互动了,他们就会出现在“通知”栏中哦~", + "onboarding.page_one.federation": "Mastodon 是由一系列独立的服务器共同打造的强大的社交网络,我们将这些各自独立而又相互连接的服务器叫做“实例”。", "onboarding.page_one.handle": "你是在 {domain} 上注册的,所以你的完整用户地址是 {handle}。", "onboarding.page_one.welcome": "欢迎来到 Mastodon!", "onboarding.page_six.admin": "{admin} 是你所在服务器实例的管理员。", @@ -184,8 +184,8 @@ "onboarding.page_six.guidelines": "社区指南", "onboarding.page_six.read_guidelines": "别忘了看看 {domain} 的{guidelines}!", "onboarding.page_six.various_app": "移动设备应用", - "onboarding.page_three.profile": "你可以修改你的个人资料,比如头像、简介和昵称等偏好设置。", - "onboarding.page_three.search": "你可以通过搜索功能寻找用户和话题标签,比如{illustration}或者{introductions}。如果你想搜索其他实例上的用户,就需要输入完整用户地址(@用户名@域名)哦。", + "onboarding.page_three.profile": "你还可以修改你的个人资料,比如头像、简介和昵称等偏好设置。", + "onboarding.page_three.search": "你可以通过搜索功能寻找用户和话题标签,比如“{illustration}”,或是“{introductions}”。如果你想搜索其他实例上的用户,就需要输入完整用户地址(@用户名@域名)哦。", "onboarding.page_two.compose": "在撰写栏中开始嘟嘟吧!下方的按钮分别可以用来上传图片、修改嘟文可见范围,以及添加警告信息。", "onboarding.skip": "跳过", "privacy.change": "设置嘟文可见范围", diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml index 19c146322..20938e47b 100644 --- a/config/locales/devise.en.yml +++ b/config/locales/devise.en.yml @@ -18,10 +18,10 @@ en: mailer: confirmation_instructions: action: Verify email address - explanation: You have created an account on %{host} with this email address. You are one click away from activating it. If this wasn't you, please ignore this e-mail. + explanation: You have created an account on %{host} with this email address. You are one click away from activating it. If this wasn't you, please ignore this email. extra_html: Please also check out the rules of the instance and our terms of service. subject: 'Mastodon: Confirmation instructions for %{instance}' - title: Verify e-mail address + title: Verify email address email_changed: explanation: 'The email address for your account is being changed to:' extra: If you did not change your email, it is likely that someone has gained access to your account. Please change your password immediately or contact the instance admin if you're locked out of your account. diff --git a/config/locales/devise.zh-CN.yml b/config/locales/devise.zh-CN.yml index 0bd855137..dd6b48795 100644 --- a/config/locales/devise.zh-CN.yml +++ b/config/locales/devise.zh-CN.yml @@ -17,15 +17,32 @@ zh-CN: unconfirmed: 继续操作前请先确认你的帐户。 mailer: confirmation_instructions: + action: 验证电子邮件地址 + explanation: 你在 %{host} 上使用这个电子邮件地址创建了一个帐户。只需点击下面的按钮,即可完成激活。如果你并没有创建过帐户,请忽略此邮件。 + extra_html: 请记得阅读本实例的相关规定我们的使用条款。 subject: Mastodon:确认 %{instance} 帐户信息 + title: 验证电子邮件地址 email_changed: - subject: Mastodon:电子邮件地址已被修改 + explanation: 你的帐户的电子邮件地址即将变更为: + extra: 如果你并没有请求更改你的电子邮件地址,则他人很有可能已经入侵你的帐户。请立即更改你的密码;如果你已经无法访问你的帐户,请联系实例的管理员请求协助。 + subject: Mastodon:电子邮件地址已被更改 + title: 新电子邮件地址 password_change: - subject: Mastodon:密码已被重置 + explanation: 你的帐户的密码已被更改。 + extra: 如果你并没有请求更改你的密码,则他人很有可能已经入侵你的帐户。请立即更改你的密码;如果你已经无法访问你的帐户,请联系实例的管理员请求协助。 + subject: Mastodon:密码已被更改 + title: 密码已被重置 reconfirmation_instructions: + explanation: 请确认你的新电子邮件地址以完成更改。 + extra: 如果你并没有请求本次变更,请忽略此邮件。Mastodon 帐户的电子邮件地址只有在你点击上面的链接后才会更改。 subject: Mastodon:确认 %{instance} 电子邮件地址 + title: 验证电子邮件地址 reset_password_instructions: + action: 更改密码 + explanation: 你正在请求更改帐户的密码。 + extra: 如果你并没有请求本次变更,请忽略此邮件。你的密码只有在你点击上面的链接并输入新密码后才会更改。 subject: Mastodon:重置密码信息 + title: 重置密码 unlock_instructions: subject: Mastodon:帐户解锁信息 omniauth_callbacks: diff --git a/config/locales/simple_form.zh-CN.yml b/config/locales/simple_form.zh-CN.yml index 1f2fa173d..4eb993e52 100644 --- a/config/locales/simple_form.zh-CN.yml +++ b/config/locales/simple_form.zh-CN.yml @@ -4,7 +4,7 @@ zh-CN: hints: defaults: avatar: 文件大小限制 2MB,只支持 PNG、GIF 或 JPG 格式。图片分辨率将会压缩至 120×120px - digest: 在你长时间未登录的情况下,我们会向你发送一份含有提及你的嘟文的摘要邮件 + digest: 仅在你长时间未登录,且收到了私信时发送 display_name: 还能输入 %{count} 个字符 header: 文件大小限制 2MB,只支持 PNG、GIF 或 JPG 格式。图片分辨率将会压缩至 700×335px locked: 你需要手动审核所有关注请求 diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index bb9f45e93..14382331b 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -336,10 +336,13 @@ zh-CN: body: "%{reporter} 举报了用户 %{target}。" subject: 来自 %{instance} 的用户举报(#%{id}) application_mailer: + notification_preferences: 更改电子邮件首选项 salutation: "%{name}:" settings: 使用此链接更改你的电子邮件首选项:%{link} signature: 这是一封来自 %{instance} 的 Mastodon 电子邮件通知。 view: 点此链接查看详情: + view_profile: 查看个人资料页 + view_status: 查看嘟文 applications: created: 应用创建成功 destroyed: 应用删除成功 @@ -476,27 +479,36 @@ zh-CN: title: 运营 notification_mailer: digest: - body: 自从你最后一次(时间是%{since})登录 %{instance} 以来,你错过了这些嘟嘟滴滴: + action: 查看所有通知 + body: 以下是自%{since}你最后一次登录以来错过的消息的摘要 mention: "%{name} 在嘟文中提到了你:" new_followers_summary: - one: 有个人关注了你!耶! - other: 有 %{count} 个人关注了你!好棒! + one: 而且,你不在的时候,有一个人关注了你!耶! + other: 而且,你不在的时候,有 %{count} 个人关注了你!好棒! subject: "自从你最后一次登录以来,你错过了 %{count} 条新通知 \U0001F418" + title: 在你不在的这段时间…… favourite: body: 你的嘟文被 %{name} 收藏了: subject: "%{name} 收藏了你的嘟文" + title: 新的收藏 follow: body: "%{name} 关注了你!" subject: "%{name} 关注了你" + title: 新的关注者 follow_request: + action: 处理关注请求 body: "%{name} 向你发送了关注请求!" subject: 来自 %{name} 的关注请求 + title: 新的关注请求 mention: + action: 回复 body: "%{name} 在嘟文中提到了你:" subject: "%{name} 提到了你" + title: 新的提及 reblog: body: 你的嘟文被 %{name} 转嘟了: subject: "%{name} 转嘟了你的嘟文" + title: 新的转嘟 number: human: decimal_units: From 0a103c774977cda29e5c02e697b4632f98bcc621 Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Thu, 18 Jan 2018 00:57:15 +0900 Subject: [PATCH 20/72] Upgrade ESLint to version 4.x (#6276) --- .codeclimate.yml | 1 + .eslintrc.yml | 19 +- .../mastodon/components/attachment_list.js | 4 +- .../mastodon/components/collapsable.js | 4 +- .../mastodon/components/icon_button.js | 4 +- app/javascript/mastodon/components/status.js | 18 +- .../features/account/components/header.js | 4 +- .../features/account_gallery/index.js | 4 +- .../compose/components/privacy_dropdown.js | 4 +- .../compose/components/search_results.js | 4 +- .../mastodon/features/compose/index.js | 4 +- .../features/compose/util/url_regex.js | 192 +++---- .../features/emoji/__tests__/emoji-test.js | 4 +- .../mastodon/features/list_editor/index.js | 4 +- .../features/ui/components/column_header.js | 2 +- .../features/ui/components/modal_root.js | 12 +- .../features/ui/components/upload_area.js | 4 +- package.json | 10 +- yarn.lock | 501 +++++++++--------- 19 files changed, 411 insertions(+), 388 deletions(-) diff --git a/.codeclimate.yml b/.codeclimate.yml index 47e3e6ab9..21e6b33bf 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -27,6 +27,7 @@ plugins: enabled: true eslint: enabled: true + channel: eslint-4 rubocop: enabled: true scss-lint: diff --git a/.eslintrc.yml b/.eslintrc.yml index 7c6da9d57..cf276a16f 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -17,11 +17,9 @@ plugins: parserOptions: sourceType: module ecmaFeatures: - arrowFunctions: true + experimentalObjectRestSpread: true jsx: true - destructuring: true - modules: true - spread: true + ecmaVersion: 2018 settings: import/extensions: @@ -109,6 +107,7 @@ rules: react/self-closing-comp: error jsx-a11y/accessible-emoji: warn + jsx-a11y/alt-text: warn jsx-a11y/anchor-has-content: warn jsx-a11y/aria-activedescendant-has-tabindex: warn jsx-a11y/aria-props: warn @@ -119,16 +118,22 @@ rules: jsx-a11y/href-no-hash: warn jsx-a11y/html-has-lang: warn jsx-a11y/iframe-has-title: warn - jsx-a11y/img-has-alt: warn jsx-a11y/img-redundant-alt: warn + jsx-a11y/interactive-supports-focus: warn jsx-a11y/label-has-for: off jsx-a11y/mouse-events-have-key-events: warn jsx-a11y/no-access-key: warn jsx-a11y/no-distracting-elements: warn + jsx-a11y/no-noninteractive-element-interactions: + - warn + - handlers: + - onClick jsx-a11y/no-onchange: warn jsx-a11y/no-redundant-roles: warn - jsx-a11y/onclick-has-focus: warn - jsx-a11y/onclick-has-role: warn + jsx-a11y/no-static-element-interactions: + - warn + - handlers: + - onClick jsx-a11y/role-has-required-aria-props: warn jsx-a11y/role-supports-aria-props: off jsx-a11y/scope: warn diff --git a/app/javascript/mastodon/components/attachment_list.js b/app/javascript/mastodon/components/attachment_list.js index b3d00b335..9f2d46ddd 100644 --- a/app/javascript/mastodon/components/attachment_list.js +++ b/app/javascript/mastodon/components/attachment_list.js @@ -20,11 +20,11 @@ export default class AttachmentList extends ImmutablePureComponent {
); diff --git a/app/javascript/mastodon/components/collapsable.js b/app/javascript/mastodon/components/collapsable.js index 42ea37ec2..d5d431186 100644 --- a/app/javascript/mastodon/components/collapsable.js +++ b/app/javascript/mastodon/components/collapsable.js @@ -5,11 +5,11 @@ import PropTypes from 'prop-types'; const Collapsable = ({ fullHeight, isVisible, children }) => ( - {({ opacity, height }) => + {({ opacity, height }) => (
{children}
- } + )}
); diff --git a/app/javascript/mastodon/components/icon_button.js b/app/javascript/mastodon/components/icon_button.js index 06f53841d..b96e48fd0 100644 --- a/app/javascript/mastodon/components/icon_button.js +++ b/app/javascript/mastodon/components/icon_button.js @@ -93,7 +93,7 @@ export default class IconButton extends React.PureComponent { return ( - {({ rotate }) => + {({ rotate }) => (