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 @@
-
- <%= quota.to_s %><%= ". #{t('dashboard.quota_additional_message')}" %>
+ <%= t('dashboard.quota_message', quota: quota.to_s, additional_message: t('dashboard.quota_additional_message')) %>
-
<%=
diff --git a/apps/dashboard/config/locales/en.yml b/apps/dashboard/config/locales/en.yml
index ac890393a4..d393e6a294 100644
--- a/apps/dashboard/config/locales/en.yml
+++ b/apps/dashboard/config/locales/en.yml
@@ -69,11 +69,13 @@ en:
batch_connect_no_sessions: You have no active sessions.
batch_connect_sandbox: " [Sandbox]"
batch_connect_sessions_cancel_confirm: Are you sure?
+ batch_connect_sessions_cancel_full_title: "Cancel %{title} Session"
batch_connect_sessions_cancel_title: Cancel
batch_connect_sessions_data_html: |
The %{title} session data for this session can be accessed
under the %{data_link_tag}.
batch_connect_sessions_delete_confirm: Are you sure?
+ batch_connect_sessions_delete_full_title: "Delete %{title} Session"
batch_connect_sessions_delete_hover: Delete Session
batch_connect_sessions_delete_title: Delete
batch_connect_sessions_edit_title: Edit new %{title} with this session parameters
@@ -86,6 +88,7 @@ en:
batch_connect_sessions_novnc_launch: Launch %{app_title}
batch_connect_sessions_novnc_view_only: View Only (Share-able Link)
batch_connect_sessions_path_selector_forbidden_error: You do not have permission to select that directory or file.
+ batch_connect_sessions_relaunch_full_title: "Relaunch %{title} Session"
batch_connect_sessions_relaunch_title: Relaunch
batch_connect_sessions_staged_root: staged root directory
batch_connect_sessions_stats_created_at: 'Created at:'
@@ -160,6 +163,7 @@ en:
files_send_to_target_title_default: Send selected files metadata to the external application
files_shell: Open in Terminal
files_shell_dropdown: Select Cluster to Open in Terminal
+ files_title: File browsing
files_doesnt_exist: "%{path} does not exist."
files_not_readable: "You do not have sufficient permissions to read '%{path}'."
home_directory: Home Directory
@@ -250,7 +254,6 @@ en:
mode: Mode
module_browser_last_updated: 'Last updated: %{last_updated}'
module_browser_title: Module Browser
- files_title: File browsing
motd_erb_render_error: 'MOTD was not parsed or rendered correctly: %{error_message}'
motd_title: Message of the Day
name: Name
@@ -275,6 +278,8 @@ en:
nsf_access_events: NSF ACCESS Events
ok: OK
owner: Owner
+ page_title: "%{page} - %{site}"
+ page_title_with_dir: "%{page} - %{site} - %{dir}"
path_selector_default_popup_title: Select Your Working Directory
path_selector_home: home
path_selector_parent_directory: parent directory
@@ -283,6 +288,7 @@ en:
pinned_apps_title: Pinned Apps
project: Project
project_balances: Project Balances
+ project_directory: Project Directory
project_zip_error_message: 'Error creating ZIP file: %{error}'
project_zip_success_message: 'Success: project.zip has been created in your project directory.'
quota_additional_message: Consider deleting or archiving files to free up disk space.
@@ -290,6 +296,7 @@ en:
quota_block_shared: "(%{used_exclusive} are yours)"
quota_file: Using %{used} files of quota %{available} files
quota_file_shared: "(%{used_exclusive} files are yours)"
+ quota_message: "%{quota}. %{additional_message}"
quota_reload_message: Reload page to see updated quota. Quotas are updated every 5 minutes.
quota_warning_prefix_html: Quota limit warning for
recently_used_apps_title: Recently Used Apps
@@ -299,6 +306,7 @@ en:
restart_msg_html: |
Your group membership has changed, which affects your access to apps. Your dashboard should restart automatically.
If it doesn't please, click: restart web server.
+ root: Root
save: Save
saved_settings_title: Saved Settings
select_path: Select Path
diff --git a/apps/dashboard/test/helpers/batch_connect/sessions_helper_test.rb b/apps/dashboard/test/helpers/batch_connect/sessions_helper_test.rb
index 5d98456240..fa9fa3dc07 100644
--- a/apps/dashboard/test/helpers/batch_connect/sessions_helper_test.rb
+++ b/apps/dashboard/test/helpers/batch_connect/sessions_helper_test.rb
@@ -62,7 +62,7 @@ class BatchConnect::SessionsHelperTest < ActionView::TestCase
assert_equal true, form['class'].include?('relaunch')
button = html.at_css('button')
- assert_equal 'Relaunch AppName Session', button['title']
+ assert_equal I18n.t('dashboard.batch_connect_sessions_relaunch_full_title', title: 'AppName'), button['title']
assert_equal true, button['class'].include?('relaunch')
end
@@ -80,10 +80,10 @@ def create_session(state = :running, valid: true)
end
def cancel_session_title
- "#{I18n.t('dashboard.batch_connect_sessions_cancel_title')} AppName #{I18n.t('dashboard.batch_connect_sessions_word')}"
+ I18n.t('dashboard.batch_connect_sessions_cancel_full_title', title: 'AppName')
end
def delete_session_title
- "#{I18n.t('dashboard.batch_connect_sessions_delete_title')} AppName #{I18n.t('dashboard.batch_connect_sessions_word')}"
+ I18n.t('dashboard.batch_connect_sessions_delete_full_title', title: 'AppName')
end
end
\ No newline at end of file