diff --git a/apps/dashboard/app/helpers/batch_connect/sessions_helper.rb b/apps/dashboard/app/helpers/batch_connect/sessions_helper.rb index 0509ac85a9..26b5038d26 100644 --- a/apps/dashboard/app/helpers/batch_connect/sessions_helper.rb +++ b/apps/dashboard/app/helpers/batch_connect/sessions_helper.rb @@ -99,7 +99,7 @@ def relaunch(session) user_context = session.user_context params = batch_connect_app.attributes.map{|attribute| ["batch_connect_session_context[#{attribute.id}]", user_context.fetch(attribute.id, nil)]}.to_h.compact - title = "#{t('dashboard.batch_connect_sessions_relaunch_title')} #{session.title} #{t('dashboard.batch_connect_sessions_word')}" + title = t('dashboard.batch_connect_sessions_relaunch_full_title', title: session.title) button_to( batch_connect_session_contexts_path(token: batch_connect_app.token), method: :post, @@ -139,7 +139,7 @@ def cancel_or_delete(session) end def delete(session) - title = "#{t('dashboard.batch_connect_sessions_delete_title')} #{session.title} #{t('dashboard.batch_connect_sessions_word')}" + title = t('dashboard.batch_connect_sessions_delete_full_title', title: session.title) button_to( batch_connect_session_path(session.id), method: :delete, @@ -153,7 +153,7 @@ def delete(session) end def cancel(session) - title = "#{t('dashboard.batch_connect_sessions_cancel_title')} #{session.title} #{t('dashboard.batch_connect_sessions_word')}" + title = t('dashboard.batch_connect_sessions_cancel_full_title', title: session.title) button_to( batch_connect_cancel_session_path(session.id), method: :post, diff --git a/apps/dashboard/app/helpers/files_helper.rb b/apps/dashboard/app/helpers/files_helper.rb index 85d9f9719a..4137726caf 100644 --- a/apps/dashboard/app/helpers/files_helper.rb +++ b/apps/dashboard/app/helpers/files_helper.rb @@ -1,13 +1,13 @@ # Helper for /files pages. module FilesHelper include ApplicationHelper - - def files_browse_page_title(path) - prefix = "#{t('dashboard.files_title')} - #{@user_configuration.dashboard_title}" - return prefix if path.blank? - dir_segment = (path.to_s == '/') ? 'Root' : path.basename.to_s - "#{prefix} - #{dir_segment}" + def files_browse_page_title(path) + site = @user_configuration.dashboard_title + page = t('dashboard.files_title') + return t('dashboard.page_title', page: page, site: site) unless path.present? + dir_segment = path.to_s == '/' ? t('dashboard.root') : path.basename.to_s + t('dashboard.page_title_with_dir', page: page, site: site, dir: dir_segment) end def path_segment_with_slash(filesystem, segment, counter, total) diff --git a/apps/dashboard/app/views/batch_connect/sessions/index.html.erb b/apps/dashboard/app/views/batch_connect/sessions/index.html.erb index 9f7471df32..a51d390d50 100644 --- a/apps/dashboard/app/views/batch_connect/sessions/index.html.erb +++ b/apps/dashboard/app/views/batch_connect/sessions/index.html.erb @@ -1,4 +1,4 @@ -<% content_for :title, "#{t('dashboard.breadcrumbs_my_sessions')} - #{@user_configuration.dashboard_title}" %> +<% content_for :title, t('dashboard.page_title', page: t('dashboard.breadcrumbs_my_sessions'), site: @user_configuration.dashboard_title) %> <%- any_apps = (@sys_app_groups + @usr_app_groups + @dev_app_groups).any? -%> diff --git a/apps/dashboard/app/views/module_browser/index.html.erb b/apps/dashboard/app/views/module_browser/index.html.erb index d560d24ee8..f996134bc1 100644 --- a/apps/dashboard/app/views/module_browser/index.html.erb +++ b/apps/dashboard/app/views/module_browser/index.html.erb @@ -1,4 +1,4 @@ -<% content_for :title, "#{t('dashboard.module_browser_title')} - #{@user_configuration.dashboard_title}" %> +<% content_for :title, t('dashboard.page_title', page: t('dashboard.module_browser_title'), site: @user_configuration.dashboard_title) %>

<%= t('dashboard.module_browser_title') %> diff --git a/apps/dashboard/app/views/projects/show.html.erb b/apps/dashboard/app/views/projects/show.html.erb index 2e887db04f..60d4bb50f3 100644 --- a/apps/dashboard/app/views/projects/show.html.erb +++ b/apps/dashboard/app/views/projects/show.html.erb @@ -77,7 +77,7 @@
-

<%= "#{t('dashboard.project')} #{t('dashboard.directory')}" %>:  <%= @project.id %>

+

<%= t('dashboard.project_directory') %>:  <%= @project.id %>


<%= turbo_frame_tag 'project_directory', src: directory_frame_path( diff --git a/apps/dashboard/app/views/shared/_insufficient_quota_resource.html.erb b/apps/dashboard/app/views/shared/_insufficient_quota_resource.html.erb index 5e532f6149..281d70c4b6 100644 --- a/apps/dashboard/app/views/shared/_insufficient_quota_resource.html.erb +++ b/apps/dashboard/app/views/shared/_insufficient_quota_resource.html.erb @@ -8,7 +8,7 @@