10000 Fix deprecation of positional hash arg in translated texts by manno · Pull Request #944 · frab/frab · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix deprecation of positional hash arg in translated texts #944

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
10000 Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions app/views/conferences/_notification_section.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.bulk-notification
%h3= t('notifications_module.n_events_in_state_x', { count: e.count, state: t(state, scope: 'conferences_module') })
%h3= t('notifications_module.n_events_in_state_x', count: e.count, state: t(state, scope: 'conferences_module'))
- subscribers = e.map { |e| e.subscribers.count }.sum
- nospeakers = e.select { |e| e.speakers.count == 0 }
- if nospeakers.count > 0
Expand All @@ -9,13 +9,13 @@
= link_to e.title, e
%p

= button_to(t('notifications_module.send_notification_to_subscribers',
{ name: t(name, scope: 'notifications_module.notif'),
count: subscribers,
event: t('notifications_module.n_events', count: e.count) }),
{ action: 'send_notification', notification: state },
{ class: "btn danger",
data: { confirm: t('notifications_module.send_notification_confirm',
{ name: t(name, scope: 'notifications_module.notif'),
count: e.count }),
= button_to(t('notifications_module.send_notification_to_subscribers',
{ name: t(name, scope: 'notifications_module.notif'),
count: subscribers,
event: t('notifications_module.n_events', count: e.count) }),
{ action: 'send_notification', notification: state },
{ class: "btn danger",
data: { confirm: t('notifications_module.send_notification_confirm',
name: t(name, scope: 'notifications_module.notif'),
count: e.count),
disable_with: t('work_in_progress') }})
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.bulk-notification
%h3= t('notifications_module.n_events_in_state_x', **{ count: e.count, state: t(state, scope: 'conferences_module') })
%h3= t('notifications_module.n_events_in_state_x', count: e.count, state: t(state, scope: 'conferences_module'))
- noticket = e.select { |e| e.ticket == nil }
- subscribers = e.map { |e| e.subscribers.count }.sum
- nosubscribers = e.select { |e| e.subscribers.count == 0 }
Expand Down
2 changes: 1 addition & 1 deletion app/views/conferences/edit_classifiers.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.row
.span16
.blank-slate
%p= raw(GitHub.render(t('classifiers_module.modify_classifier_with_parent', {parent: @conference.parent.title})))
%p= raw(GitHub.render(t('classifiers_module.modify_classifier_with_parent', parent: @conference.parent.title)))
%p= t('classifiers_module.current_classifiers')

%uls
Expand Down
2 changes: 1 addition & 1 deletion app/views/conferences/edit_review_metrics.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.row
.span16
.blank-slate
%p= raw(GitHub.render(t('reviewing_module.modify_review_metric_with_parent', {parent: @conference.parent.title})))
%p= raw(GitHub.render(t('reviewing_module.modify_review_metric_with_parent', parent: @conference.parent.title)))
%p= t('reviewing_module.current_review_metrics')

%uls
Expand Down
4 changes: 2 additions & 2 deletions app/views/events/_event_person_fields.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
collection: [[f.object.person&.full_name_annotated, f.object.person_id]],
label: false,
style: 'width: 360px;'
%span#person_id= f.input_field :person_id, as: :hidden
%span#person_id= f.input_field :person_id, as: :hidden
= f.input :event_role, as: :select, collection: translated_options(EventPerson::ROLES), hint: t('people_module.inputs.hints.event_role')
= f.input :role_state, as: :select, collection: translated_options(EventPerson::STATES)
- if f.object.notification_subject.present? or f.object.notification_body.present?
= f.input :notification_subject, label: t('people_module.inputs.notification_subject')
= f.input :notification_body, label: t('people_module.inputs.notification_body'), as: :text, hint: t('people_module.inputs.hints.notification_body', {variables: Notification::VARIABLES.collect{ |key, desc| '%{'+key+'}' }.join(', ')})
= f.input :notification_body, label: t('people_module.inputs.notification_body'), as: :text, hint: t('people_module.inputs.hints.notification_body', variables: Notification::VARIABLES.collect{ |key, desc| '%{'+key+'}' }.join(', '))
= remove_association_link :event_person, f
8 changes: 3 additions & 5 deletions app/views/recent_changes/_table.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,20 @@
- @versions.each do |version|
- user = nil
- if version.whodunnit
- begin
- user = User.find(version.whodunnit)
- rescue
- user = User.find_by(id: version.whodunnit)
%tr
%td= version.created_at.to_fs(:long)
- if user and user.person
%td= image_box user.person.avatar, :small
%td= link_to user.person.full_name, user.person
-else
- else
%td= image_box Person.new.avatar, :small
%td= t('unknown_id')
%td= verb_for version.event
%td
- if version.item
- if version.associated_id
= raw(t('version_on_item', {version: version.item.to_s, item: associated_link_for(version)}))
= raw(t('version_on_item', version: version.item.to_s, item: associated_link_for(version)))
- else
- if version.item.is_a? Conference
= link_to version.item.to_s, conference_path(conference: version.item)
Expand Down
0