Commit e26982d8 authored by Jason Goodman's avatar Jason Goodman Committed by Bob Van Landuyt

Adjust text of namespace storage limit email notification

Indicate percentage remaining storage is approximate
parent b7a55159
......@@ -28,7 +28,7 @@ module Emails
mail(
bcc: recipients,
subject: s_("NamespaceStorage|Action required: Less than %{percentage_of_available_storage}%% of namespace storage remains for %{namespace_name}" %
subject: s_("NamespaceStorage|Action required: Approximately %{percentage_of_available_storage}%% of namespace storage remains for %{namespace_name}" %
{ percentage_of_available_storage: percentage_of_available_storage, namespace_name: namespace.name })
)
end
......
%p
- name_link = link_to @namespace.name, @usage_quotas_url
= html_escape(s_('NamespaceStorage|%{name_with_link} namespace has %{percent} or less namespace storage space remaining.')) % { name_with_link: name_link.html_safe, percent: "#{@percentage_of_available_storage}%" }
= html_escape(s_('NamespaceStorage|%{name_with_link} namespace has approximately %{percent} namespace storage space remaining.')) % { name_with_link: name_link.html_safe, percent: "#{@percentage_of_available_storage}%" }
%p
= s_('NamespaceStorage|We recommend that you buy additional storage to ensure your service is not interrupted.')
%p
......
<%= s_('NamespaceStorage|%{name}(%{url}) namespace has %{percent} or less namespace storage space remaining.') % { name: @namespace.name, url: @usage_quotas_url, percent: "#{@percentage_of_available_storage}%" }%>
<%= s_('NamespaceStorage|%{name}(%{url}) namespace has approximately %{percent} namespace storage space remaining.') % { name: @namespace.name, url: @usage_quotas_url, percent: "#{@percentage_of_available_storage}%" }%>
<%= s_('NamespaceStorage|We recommend that you buy additional storage to ensure your service is not interrupted.') %>
......
......@@ -36,20 +36,21 @@ RSpec.describe Emails::NamespaceStorageUsageMailer do
it 'creates an email message for a group' do
mail = described_class.notify_limit_warning(group, recipients, 25)
expect(mail).to have_subject "Action required: Less than 25% of namespace storage remains for #{group.name}"
expect(mail).to have_subject "Action required: Approximately 25% of namespace storage remains for #{group.name}"
expect(mail).to bcc_to recipients
expect(mail).to have_body_text "#{usage_quotas_url(group, anchor: 'storage-quota-tab')}"
expect(mail).to have_body_text "has 25% or less namespace storage space remaining"
expect(mail).to have_body_text "has approximately 25% namespace storage space remaining"
expect(mail).to have_body_text "#{buy_storage_subscriptions_url(selected_group: group.id)}"
end
it 'creates an email message for a namespace' do
mail = described_class.notify_limit_warning(namespace, recipients, 30)
expect(mail).to have_subject "Action required: Less than 30% of namespace storage remains for #{namespace.name}"
expect(mail)
.to have_subject "Action required: Approximately 30% of namespace storage remains for #{namespace.name}"
expect(mail).to bcc_to recipients
expect(mail).to have_body_text "#{usage_quotas_url(namespace, anchor: 'storage-quota-tab')}"
expect(mail).to have_body_text "has 30% or less namespace storage space remaining"
expect(mail).to have_body_text "has approximately 30% namespace storage space remaining"
expect(mail).to have_body_text EE::SUBSCRIPTIONS_MORE_STORAGE_URL
end
end
......
......@@ -24714,19 +24714,19 @@ msgstr ""
msgid "NamespaceStorageSize|push to your repository, create pipelines, create issues or add comments. To reduce storage capacity, delete unused repositories, artifacts, wikis, issues, and pipelines."
msgstr ""
msgid "NamespaceStorage|%{name_with_link} namespace has %{percent} or less namespace storage space remaining."
msgid "NamespaceStorage|%{name_with_link} namespace has approximately %{percent} namespace storage space remaining."
msgstr ""
msgid "NamespaceStorage|%{name_with_link} namespace has exceeded its namespace storage limit."
msgstr ""
msgid "NamespaceStorage|%{name}(%{url}) namespace has %{percent} or less namespace storage space remaining."
msgid "NamespaceStorage|%{name}(%{url}) namespace has approximately %{percent} namespace storage space remaining."
msgstr ""
msgid "NamespaceStorage|%{name}(%{url}) namespace has exceeded its namespace storage limit."
msgstr ""
msgid "NamespaceStorage|Action required: Less than %{percentage_of_available_storage}%% of namespace storage remains for %{namespace_name}"
msgid "NamespaceStorage|Action required: Approximately %{percentage_of_available_storage}%% of namespace storage remains for %{namespace_name}"
msgstr ""
msgid "NamespaceStorage|Action required: Storage has been exceeded for %{namespace_name}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment