Skip to content

Commit

Permalink
propagate locale between group form tabs
Browse files Browse the repository at this point in the history
This is a UX improvement. However, it also fixes a bug where some users
were getting an error message on these pages for the locale param being
an empty string (`?locale=`). Strangely, this only appeared to be
affecting users using Windows, but that may not be causation.
  • Loading branch information
bkiahstroud committed Jun 28, 2024
1 parent 3f8a5e5 commit 6bb1f07
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/presenters/hyku/admin/group/navigation_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def edit_tab
name: I18n.t('hyku.admin.groups.nav.attributes'),
controller: 'admin/groups',
action: 'edit',
path: Rails.application.routes.url_helpers.edit_admin_group_path(group_id),
path: Rails.application.routes.url_helpers.edit_admin_group_path(group_id, locale: I18n.locale),
context: params
)
end
Expand All @@ -37,7 +37,7 @@ def members_tab
name: I18n.t('hyku.admin.groups.nav.members'),
controller: 'admin/group_users',
action: 'index',
path: Rails.application.routes.url_helpers.admin_group_users_path(group_id),
path: Rails.application.routes.url_helpers.admin_group_users_path(group_id, locale: I18n.locale),
context: params
)
end
Expand All @@ -47,7 +47,7 @@ def roles_tab
name: I18n.t('hyku.admin.groups.nav.roles'),
controller: 'admin/group_roles',
action: 'index',
path: Rails.application.routes.url_helpers.admin_group_roles_path(group_id),
path: Rails.application.routes.url_helpers.admin_group_roles_path(group_id, locale: I18n.locale),
context: params
)
end
Expand All @@ -57,7 +57,7 @@ def remove_tab
name: I18n.t('hyku.admin.groups.nav.delete'),
controller: 'admin/groups',
action: 'remove',
path: Rails.application.routes.url_helpers.remove_admin_group_path(group_id),
path: Rails.application.routes.url_helpers.remove_admin_group_path(group_id, locale: I18n.locale),
context: params
)
end
Expand Down

0 comments on commit 6bb1f07

Please sign in to comment.