Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Added plain text templates for storage health status

Andreas Pfohle53d3eecfd05
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 5d33a1a6866..c8d96211a64 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -2423,6 +2423,20 @@ en:
group: "%{user} shared a work package with the group %{group} you are a member of"
storages:
health:
+ plaintext:
+ storage: "Storage"
+ healthy:
+ summary: "Good news! The status of your storage, %{storage_name}, is currently displaying as \"Healthy\"."
+ error-solved-on: "Solved On"
+ recommendation: "We will continue monitoring the system to ensure it remains in good health. In case of any discrepancies, we will notify you."
+ details: "For more details or to make any necessary amendments, you can visit your storage configuration"
+ unhealthy:
+ summary: "The status of your storage, %{storage_name}, is currently displaying as \"Error\". We've detected an issue that might require your attention."
+ error-details: "Error Details"
+ error-message: "Error Message"
+ error-occurred-on: "Occurred On"
+ recommendation: "We recommend heading over to the storage configuration page to address this issue"
+ unsubscribe: "If you would no longer like to receive these notifications, you can unsubscribe at any time. To unsubscribe, please follow the instructions on this page"
email_notification_settings: "Storage email notification settings"
see_storage_settings: "See storage settings"
healthy:
diff --git a/modules/storages/app/views/storages/storages_mailer/notify_healthy.text.erb b/modules/storages/app/views/storages/storages_mailer/notify_healthy.text.erb
index bf96035ca24..4c563fb5d7d 100644
--- a/modules/storages/app/views/storages/storages_mailer/notify_healthy.text.erb
+++ b/modules/storages/app/views/storages/storages_mailer/notify_healthy.text.erb
@@ -27,16 +27,19 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
-<%= I18n.t('mail.salutation', user: @admin.firstname) %>
+<%= I18n.t('mail.salutation', user: @admin.firstname) %>,
-<%= "-" * 100 %>
+<%= I18n.t('mail.storages.health.plaintext.healthy.summary', storage_name: @storage.name) %>
-<%= I18n.t("mail.storages.health.healthy.summary", storage_name: @storage.name) %>
+<%= I18n.t('mail.storages.health.plaintext.storage') %>: <%= I18n.t("storages.provider_types.#{@storage.short_provider_type}.name") %> - <%= @storage.host %>
-<%= I18n.t("storages.provider_types.#{@storage.short_provider_type}.name") %> - <%= @storage.host %>
+<%= I18n.t('mail.storages.health.plaintext.unhealthy.error-details') %>:
+<%= "-" * 30 %>
+<%= I18n.t('mail.storages.health.plaintext.unhealthy.error-message') %>: <%= "#{Storages::Storage.extract_part_from_piped_string(@reason, 0)} - #{Storages::Storage.extract_part_from_piped_string(@reason, 1)}" %>
+<%= I18n.t('mail.storages.health.plaintext.healthy.error-solved-on') %>: <%= format_time(@storage.health_changed_at) %>
-<%= "#{Storages::Storage.extract_part_from_piped_string(@reason, 0)} - #{Storages::Storage.extract_part_from_piped_string(@reason, 1)}" %> <%= I18n.t('mail.storages.health.healthy.solved_at') %> <%= format_time(@storage.health_changed_at) %>
+<%= I18n.t('mail.storages.health.plaintext.healthy.details') %>: <%= @url %>
-<%= @url %>
+<%= I18n.t('mail.storages.health.plaintext.healthy.recommendation') %>
-<%= "-" * 100 %>
+<%#= I18n.t('mail.storages.health.plaintext.unhealthy.unsubscribe') %>: <%= @url %>
diff --git a/modules/storages/app/views/storages/storages_mailer/notify_unhealthy.text.erb b/modules/storages/app/views/storages/storages_mailer/notify_unhealthy.text.erb
index 39b4ba312a5..f766fce9b5a 100644
--- a/modules/storages/app/views/storages/storages_mailer/notify_unhealthy.text.erb
+++ b/modules/storages/app/views/storages/storages_mailer/notify_unhealthy.text.erb
@@ -27,16 +27,17 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
-<%= I18n.t('mail.salutation', user: @admin.firstname) %>
+<%= I18n.t('mail.salutation', user: @admin.firstname) %>,
-<%= "-" * 100 %>
+<%= I18n.t('mail.storages.health.plaintext.unhealthy.summary', storage_name: @storage.name) %>
-<%= I18n.t("mail.storages.health.unhealthy.summary", storage_name: @storage.name) %>
+<%= I18n.t('mail.storages.health.plaintext.storage') %>: <%= I18n.t("storages.provider_types.#{@storage.short_provider_type}.name") %> - <%= @storage.host %>
-<%= I18n.t("storages.provider_types.#{@storage.short_provider_type}.name") %> - <%= @storage.host %>
+<%= I18n.t('mail.storages.health.plaintext.unhealthy.error-details') %>:
+<%= "-" * 30 %>
+<%= I18n.t('mail.storages.health.plaintext.unhealthy.error-message') %>: <%= "#{@storage.health_reason_identifier} - #{@storage.health_reason_description}" %>
+<%= I18n.t('mail.storages.health.plaintext.unhealthy.error-occurred-on') %>: <%= format_time(@storage.health_changed_at) %>
-<%= "#{@storage.health_reason_identifier} - #{@storage.health_reason_description}" %> <%= I18n.t('mail.storages.health.unhealthy.since') %> <%= format_time(@storage.health_changed_at) %>
+<%= I18n.t('mail.storages.health.plaintext.unhealthy.recommendation') %>: <%= @url %>
-<%= @url %>
-
-<%= "-" * 100 %>
+<%#= I18n.t('mail.storages.health.plaintext.unhealthy.unsubscribe') %>: <%= @url %>