Fix `LineLength` haml-lint in `t` usage (#28686)

pull/2563/head^2
Matt Jankowski 2024-01-11 04:32:32 -05:00 committed by GitHub
parent 0a7cff53c2
commit 6daa69327b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 7 deletions

View File

@ -5,7 +5,10 @@
= fa_icon 'warning' = fa_icon 'warning'
.log-entry__content .log-entry__content
.log-entry__title .log-entry__title
= t(account_warning.action, scope: 'admin.strikes.actions', name: content_tag(:span, account_warning.account ? account_warning.account.username : I18n.t('admin.action_logs.deleted_account'), class: 'username'), target: content_tag(:span, account_warning.target_account.pretty_acct, class: 'target')).html_safe = t(account_warning.action,
scope: 'admin.strikes.actions',
name: content_tag(:span, account_warning.account ? account_warning.account.username : I18n.t('admin.action_logs.deleted_account'), class: 'username'),
target: content_tag(:span, account_warning.target_account.pretty_acct, class: 'target')).html_safe
.log-entry__timestamp .log-entry__timestamp
%time.formatted{ datetime: account_warning.created_at.iso8601 } %time.formatted{ datetime: account_warning.created_at.iso8601 }
= l(account_warning.created_at) = l(account_warning.created_at)

View File

@ -4,6 +4,8 @@
= image_tag action_log.account.avatar.url(:original), alt: '', width: 40, height: 40, class: 'avatar' = image_tag action_log.account.avatar.url(:original), alt: '', width: 40, height: 40, class: 'avatar'
.log-entry__content .log-entry__content
.log-entry__title .log-entry__title
= t("admin.action_logs.actions.#{action_log.action}_#{action_log.target_type.underscore}_html", name: content_tag(:span, action_log.account.username, class: 'username'), target: content_tag(:span, log_target(action_log), class: 'target')) = t "admin.action_logs.actions.#{action_log.action}_#{action_log.target_type.underscore}_html",
name: content_tag(:span, action_log.account.username, class: 'username'),
target: content_tag(:span, log_target(action_log), class: 'target')
.log-entry__timestamp .log-entry__timestamp
%time.formatted{ datetime: action_log.created_at.iso8601 } %time.formatted{ datetime: action_log.created_at.iso8601 }

View File

@ -4,7 +4,11 @@
.simple_form .simple_form
%h1.title= t('mail_subscriptions.unsubscribe.title') %h1.title= t('mail_subscriptions.unsubscribe.title')
%p.lead %p.lead
= t('mail_subscriptions.unsubscribe.confirmation_html', domain: content_tag(:strong, site_hostname), type: content_tag(:strong, I18n.t(@type, scope: 'mail_subscriptions.unsubscribe.emails')), email: content_tag(:strong, @user.email), settings_path: settings_preferences_notifications_path) = t 'mail_subscriptions.unsubscribe.confirmation_html',
domain: content_tag(:strong, site_hostname),
type: content_tag(:strong, I18n.t(@type, scope: 'mail_subscriptions.unsubscribe.emails')),
email: content_tag(:strong, @user.email),
settings_path: settings_preferences_notifications_path
= form_tag unsubscribe_path, method: :post do = form_tag unsubscribe_path, method: :post do
= hidden_field_tag :token, params[:token] = hidden_field_tag :token, params[:token]

View File

@ -36,7 +36,9 @@
%tbody %tbody
%tr %tr
%td.column-cell.text-center %td.column-cell.text-center
%p= t 'user_mailer.appeal_approved.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone.presence), format: :with_time_zone), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone.presence), format: :with_time_zone) %p= t 'user_mailer.appeal_approved.explanation',
appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone.presence), format: :with_time_zone),
strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone.presence), format: :with_time_zone)
%table.email-table{ cellspacing: 0, cellpadding: 0 } %table.email-table{ cellspacing: 0, cellpadding: 0 }
%tbody %tbody

View File

@ -36,7 +36,9 @@
%tbody %tbody
%tr %tr
%td.column-cell.text-center %td.column-cell.text-center
%p= t 'user_mailer.appeal_rejected.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone.presence), format: :with_time_zone), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone.presence), format: :with_time_zone) %p= t 'user_mailer.appeal_rejected.explanation',
appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone.presence), format: :with_time_zone),
strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone.presence), format: :with_time_zone)
%table.email-table{ cellspacing: 0, cellpadding: 0 } %table.email-table{ cellspacing: 0, cellpadding: 0 }
%tbody %tbody

View File

@ -45,7 +45,10 @@
= @remote_ip = @remote_ip
%br/ %br/
%strong #{t('sessions.browser')}: %strong #{t('sessions.browser')}:
%span{ title: @user_agent }= t 'sessions.description', browser: t("sessions.browsers.#{@detection.id}", default: @detection.id.to_s), platform: t("sessions.platforms.#{@detection.platform.id}", default: @detection.platform.id.to_s) %span{ title: @user_agent }
= t 'sessions.description',
browser: t("sessions.browsers.#{@detection.id}", default: @detection.id.to_s),
platform: t("sessions.platforms.#{@detection.platform.id}", default: @detection.platform.id.to_s)
%br/ %br/
= l(@timestamp.in_time_zone(@resource.time_zone.presence), format: :with_time_zone) = l(@timestamp.in_time_zone(@resource.time_zone.presence), format: :with_time_zone)
@ -64,4 +67,5 @@
%tbody %tbody
%tr %tr
%td.column-cell.text-center %td.column-cell.text-center
%p= t 'user_mailer.suspicious_sign_in.further_actions_html', action: link_to(t('user_mailer.suspicious_sign_in.change_password'), edit_user_registration_url) %p= t 'user_mailer.suspicious_sign_in.further_actions_html',
action: link_to(t('user_mailer.suspicious_sign_in.change_password'), edit_user_registration_url)