diff --git a/app/assets/javascripts/invite_members/components/user_limit_notification.vue b/app/assets/javascripts/invite_members/components/user_limit_notification.vue index ae5c3c11386e88f6ed5c2430e4181a174fcaa3ae..6c9b1f8e6d0b96d8b543cce54ed08366138e0a3c 100644 --- a/app/assets/javascripts/invite_members/components/user_limit_notification.vue +++ b/app/assets/javascripts/invite_members/components/user_limit_notification.vue @@ -10,7 +10,6 @@ import { CLOSE_TO_LIMIT_MESSAGE, CLOSE_TO_LIMIT_MESSAGE_PERSONAL_NAMESPACE, DANGER_ALERT_TITLE_PERSONAL_NAMESPACE, - WARNING_ALERT_TITLE_PERSONAL_NAMESPACE, } from '../constants'; export default { @@ -46,13 +45,6 @@ export default { return this.usersLimitDataset.purchasePath; }, warningAlertTitle() { - if (this.usersLimitDataset.userNamespace) { - return sprintf(WARNING_ALERT_TITLE_PERSONAL_NAMESPACE, { - count: this.freeUsersLimit - this.membersCount, - members: this.pluralMembers(this.freeUsersLimit - this.membersCount), - }); - } - return sprintf(WARNING_ALERT_TITLE, { count: this.freeUsersLimit - this.membersCount, members: this.pluralMembers(this.freeUsersLimit - this.membersCount), diff --git a/app/assets/javascripts/invite_members/constants.js b/app/assets/javascripts/invite_members/constants.js index f5187a3ef0c490367467dec6d618a0f629559daa..6a0be3fc75b46cd5c9165ff299959bc792bd2d69 100644 --- a/app/assets/javascripts/invite_members/constants.js +++ b/app/assets/javascripts/invite_members/constants.js @@ -138,9 +138,6 @@ export const ON_SUBMIT_TRACK_LABEL = 'manage_members_clicked'; export const WARNING_ALERT_TITLE = s__( 'InviteMembersModal|You only have space for %{count} more %{members} in %{name}', ); -export const WARNING_ALERT_TITLE_PERSONAL_NAMESPACE = s__( - 'InviteMembersModal|You only have space for %{count} more %{members} in your personal projects', -); export const DANGER_ALERT_TITLE = s__( "InviteMembersModal|You've reached your %{count} %{members} limit for %{name}", ); @@ -155,12 +152,12 @@ export const REACHED_LIMIT_MESSAGE = s__( export const REACHED_LIMIT_UPGRADE_SUGGESTION_MESSAGE = REACHED_LIMIT_MESSAGE.concat( s__( - 'InviteMembersModal| To get more members and access to additional paid features, an owner of this namespace can start a trial or upgrade to a paid tier.', + 'InviteMembersModal| To get more members and access to additional paid features, an owner of the group can start a trial or upgrade to a paid tier.', ), ); export const CLOSE_TO_LIMIT_MESSAGE = s__( - 'InviteMembersModal|To get more members an owner of this namespace can %{trialLinkStart}start a trial%{trialLinkEnd} or %{upgradeLinkStart}upgrade%{upgradeLinkEnd} to a paid tier.', + 'InviteMembersModal|To get more members an owner of the group can %{trialLinkStart}start a trial%{trialLinkEnd} or %{upgradeLinkStart}upgrade%{upgradeLinkEnd} to a paid tier.', ); export const CLOSE_TO_LIMIT_MESSAGE_PERSONAL_NAMESPACE = s__( 'InviteMembersModal|To make more space, you can remove members who no longer need access.', diff --git a/app/assets/javascripts/invite_members/init_invite_members_modal.js b/app/assets/javascripts/invite_members/init_invite_members_modal.js index a4be3f205a36f84317640d56b8a02e89e38c0a64..6e2c0ecb5bb653b57b7ae98156f9cc177d4c524b 100644 --- a/app/assets/javascripts/invite_members/init_invite_members_modal.js +++ b/app/assets/javascripts/invite_members/init_invite_members_modal.js @@ -20,6 +20,8 @@ export default (function initInviteMembersModal() { return false; } + const usersLimitDataset = JSON.parse(el.dataset.usersLimitDataset || '{}'); + inviteMembersModal = new Vue({ el, name: 'InviteMembersModalRoot', @@ -38,9 +40,10 @@ export default (function initInviteMembersModal() { projects: JSON.parse(el.dataset.projects || '[]'), usersFilter: el.dataset.usersFilter, filterId: parseInt(el.dataset.filterId, 10), - usersLimitDataset: convertObjectPropsToCamelCase( - JSON.parse(el.dataset.usersLimitDataset || '{}'), - ), + usersLimitDataset: convertObjectPropsToCamelCase({ + ...usersLimitDataset, + user_namespace: parseBoolean(usersLimitDataset.user_namespace), + }), }, }), }); diff --git a/app/helpers/groups/group_members_helper.rb b/app/helpers/groups/group_members_helper.rb index 2021961772a24336346f0870c4c53315e0f19958..6a013a6c8640ddbd80417fc1939ccb11139f0118 100644 --- a/app/helpers/groups/group_members_helper.rb +++ b/app/helpers/groups/group_members_helper.rb @@ -21,10 +21,11 @@ def group_members_app_data(group, members:, invited:, access_requests:, banned:, end def group_member_header_subtext(group) - html_escape(_('You can invite a new member to ' \ - '%{strong_start}%{group_name}%{strong_end}.')) % { group_name: group.name, - strong_start: '<strong>'.html_safe, - strong_end: '</strong>'.html_safe } + html_escape(_("You're viewing members of %{strong_start}%{group_name}%{strong_end}.").html_safe) % { + group_name: group.name, + strong_start: '<strong>'.html_safe, + strong_end: '</strong>'.html_safe + } end private diff --git a/ee/app/assets/javascripts/usage_quotas/seats/components/subscription_upgrade_info_card.vue b/ee/app/assets/javascripts/usage_quotas/seats/components/subscription_upgrade_info_card.vue index 44a1448a10f7d1b829ee4c8a489a540863af40ba..906c6bb44dd8b94bb544f0b1bfc77c411e3f97fa 100644 --- a/ee/app/assets/javascripts/usage_quotas/seats/components/subscription_upgrade_info_card.vue +++ b/ee/app/assets/javascripts/usage_quotas/seats/components/subscription_upgrade_info_card.vue @@ -1,6 +1,6 @@ <script> import { GlLink, GlButton, GlSprintf } from '@gitlab/ui'; -import { s__ } from '~/locale'; +import { s__, n__ } from '~/locale'; import Tracking from '~/tracking'; import { EXPLORE_PAID_PLANS_CLICKED } from '../constants'; @@ -21,11 +21,20 @@ export default { i18n: { title: s__('Billing|Free groups on GitLab are limited to %{maxNamespaceSeats} seats'), description: s__( - 'Billing|If the group has over %{maxNamespaceSeats} members, only those occupying a seat can access the namespace. To ensure all members (active and %{linkStart}over limit%{linkEnd}) can access the namespace, you can start a trial or upgrade to a paid tier.', + 'Billing|%{overLimitMessage} To ensure all members (active and %{linkStart}over limit%{linkEnd}) can access the group, you can start a trial or upgrade to a paid tier.', ), cta: s__('Billing|Explore all plans'), }, overLimitLink: 'https://about.gitlab.com/blog/2022/03/24/efficient-free-tier/', + computed: { + overLimitMessage() { + return n__( + 'Billing|If the group has over %d member, only those occupying a seat can access the group.', + 'Billing|If the group has over %d members, only those occupying a seat can access the group.', + this.maxNamespaceSeats, + ); + }, + }, methods: { trackClick() { this.track('click_button', { label: EXPLORE_PAID_PLANS_CLICKED }); @@ -45,7 +54,7 @@ export default { </p> <p class="gl-m-0" data-testid="description"> <gl-sprintf :message="$options.i18n.description"> - <template #maxNamespaceSeats>{{ maxNamespaceSeats }}</template> + <template #overLimitMessage>{{ overLimitMessage }}</template> <template #link="{ content }"> <gl-link :href="$options.overLimitLink" target="_blank">{{ content }}</gl-link> </template> diff --git a/ee/app/components/namespaces/free_user_cap/alert_component.rb b/ee/app/components/namespaces/free_user_cap/alert_component.rb index ef5bf7ddb2a52d827d94da3269842abc62c0f5cd..5f83a74b965e1e9471ad6bdb2e669967ae013807 100644 --- a/ee/app/components/namespaces/free_user_cap/alert_component.rb +++ b/ee/app/components/namespaces/free_user_cap/alert_component.rb @@ -80,7 +80,7 @@ def alert_attributes }, body: _("You can't add any more, but you can manage your existing members, for example, " \ "by removing inactive members and replacing them with new members. To get more " \ - "members an owner of this namespace can start a trial or upgrade to a paid tier."), + "members an owner of the group can start a trial or upgrade to a paid tier."), primary_cta: namespace_primary_cta, secondary_cta: namespace_secondary_cta } @@ -113,6 +113,10 @@ def link_end def container_class "container-fluid container-limited gl-pb-2! gl-pt-6! #{content_class}" end + + def free_user_limit + ::Namespaces::FreeUserCap::FREE_USER_LIMIT + end end end end diff --git a/ee/app/components/namespaces/free_user_cap/personal_alert_component.rb b/ee/app/components/namespaces/free_user_cap/personal_alert_component.rb index 6b513c9e1b073ec0213d1c88af90e0c7bc261717..42ffabf8b2aa0f905a1955010af7a9e1ffeec05b 100644 --- a/ee/app/components/namespaces/free_user_cap/personal_alert_component.rb +++ b/ee/app/components/namespaces/free_user_cap/personal_alert_component.rb @@ -8,19 +8,28 @@ class PersonalAlertComponent < AlertComponent def alert_attributes { title: _("You've reached your %{free_limit} member limit across all of your personal projects") % { - free_limit: ::Namespaces::FreeUserCap::FREE_USER_LIMIT + free_limit: free_user_limit }, - body: _('You can have a maximum of %{free_limit} unique members across all of your personal projects. ' \ - 'To view and manage members, check the members page for each project in your namespace. ' \ - 'We recommend you %{move_link_start}move your projects to a group%{move_link_end} so you can ' \ - 'easily manage users and features.').html_safe % { - free_limit: ::Namespaces::FreeUserCap::FREE_USER_LIMIT, - move_link_start: move_link_start, - move_link_end: link_end + body: _( + '%{over_limit_message} To view and manage members, check the members page for each personal project. ' \ + 'We recommend you %{link_start}move your projects to a group%{link_end} so you can easily manage users ' \ + 'and features.' + ).html_safe % { + over_limit_message: over_limit_message, + link_start: move_link_start, + link_end: link_end }, primary_cta: personal_primary_cta } end + + def over_limit_message + n_( + 'You can have a maximum of %{free_user_limit} unique member across all of your personal projects.', + 'You can have a maximum of %{free_user_limit} unique members across all of your personal projects.', + free_user_limit + ).html_safe % { free_user_limit: free_user_limit } + end end end end diff --git a/ee/app/components/namespaces/free_user_cap/personal_preview_alert_component.rb b/ee/app/components/namespaces/free_user_cap/personal_preview_alert_component.rb index 580ba2faa2e15e8319b646ad5846f57ee94c2b6f..175c31087ac8cf48c5714050c0cf51d86f773ed9 100644 --- a/ee/app/components/namespaces/free_user_cap/personal_preview_alert_component.rb +++ b/ee/app/components/namespaces/free_user_cap/personal_preview_alert_component.rb @@ -9,23 +9,39 @@ class PersonalPreviewAlertComponent < PreviewAlertComponent def alert_attributes { - title: _('From October 19, 2022, you can have a maximum of %{free_limit} unique members ' \ - 'across all of your personal projects') % { free_limit: ::Namespaces::FreeUserCap::FREE_USER_LIMIT }, - body: _('You currently have more than %{free_limit} members across all your personal projects. ' \ - 'From October 19, 2022, the %{free_limit} most recently active members will remain active, ' \ - 'and the remaining members will get a %{link_start}status of Over limit%{link_end} and lose access. ' \ - 'To view and manage members, check the members page for each project in your namespace. ' \ - 'We recommend you %{move_link_start}move your project to a group%{move_link_end} so you can easily ' \ - 'manage users and features.').html_safe % { - free_limit: ::Namespaces::FreeUserCap::FREE_USER_LIMIT, - link_start: '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: BLOG_URL }, - link_end: link_end, - move_link_start: move_link_start, - move_link_end: link_end + title: n_( + 'From October 19, 2022, you can have a maximum of %d unique member across all of your personal projects', + 'From October 19, 2022, you can have a maximum of %d unique members across all of your personal projects', + free_user_limit + ) % free_user_limit, + body: _( + '%{over_limit_message} To view and manage members, check the members page for each project in your ' \ + 'namespace. We recommend you %{link_start}move your projects to a group%{link_end} so you can easily ' \ + 'manage users and features.' + ).html_safe % { + over_limit_message: over_limit_message, + link_start: move_link_start, + link_end: link_end }, primary_cta: personal_primary_cta } end + + def over_limit_message + n_( + 'You currently have more than %{free_user_limit} member across all your personal projects. From ' \ + 'October 19, 2022, the %{free_user_limit} most recently active member will remain active, and the ' \ + 'remaining members will have the %{link_start}Over limit status%{link_end} and lose access.', + 'You currently have more than %{free_user_limit} members across all your personal projects. From ' \ + 'October 19, 2022, the %{free_user_limit} most recently active members will remain active, and the ' \ + 'remaining members will have the %{link_start}Over limit status%{link_end} and lose access.', + free_user_limit + ).html_safe % { + free_user_limit: free_user_limit, + link_start: over_limit_link_start, + link_end: link_end + } + end end end end diff --git a/ee/app/components/namespaces/free_user_cap/preview_alert_component.rb b/ee/app/components/namespaces/free_user_cap/preview_alert_component.rb index 52724bfb872406ce0ce2fb572d455f44b224fc08..b9ab07bc95d06e9df0058927706fbc2f8d5aa073 100644 --- a/ee/app/components/namespaces/free_user_cap/preview_alert_component.rb +++ b/ee/app/components/namespaces/free_user_cap/preview_alert_component.rb @@ -27,29 +27,54 @@ def feature_name def alert_attributes { - title: _('From October 19, 2022, free personal namespaces and top-level groups will be ' \ - 'limited to %{free_limit} members') % { free_limit: ::Namespaces::FreeUserCap::FREE_USER_LIMIT }, - body: _('Your %{doc_link_start}namespace%{doc_link_end}, %{strong_start}%{namespace_name}%{strong_end} ' \ - 'has more than %{free_limit} members. From October 19, 2022, it will be limited to %{free_limit}, ' \ - 'and the remaining members will get a %{link_start}status of Over limit%{link_end} and lose ' \ - 'access to the namespace. You can go to the Usage Quotas page to manage which %{free_limit} ' \ - 'members will remain in your namespace. To get more members, an owner can start a trial or upgrade ' \ - 'to a paid tier.').html_safe % { - namespace_name: namespace.name, - free_limit: ::Namespaces::FreeUserCap::FREE_USER_LIMIT, - doc_link_start: '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { - url: help_page_path('user/group/index', anchor: 'namespaces') - }, - doc_link_end: link_end, - strong_start: "<strong>".html_safe, - strong_end: "</strong>".html_safe, - link_start: '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: BLOG_URL }, - link_end: link_end - }, + title: n_( + 'From October 19, 2022, free groups will be limited to %d member', + 'From October 19, 2022, free groups will be limited to %d members', + free_user_limit + ) % free_user_limit, + body: _( + '%{over_limit_message} To get more members, an owner of the group can start ' \ + 'a trial or upgrade to a paid tier.' + ).html_safe % { over_limit_message: over_limit_message }, primary_cta: namespace_primary_cta, secondary_cta: namespace_secondary_cta } end + + def over_limit_message + n_( + 'Your group, %{strong_start}%{namespace_name}%{strong_end} has more than %{free_user_limit} ' \ + 'member. From October 19, 2022, the %{free_user_limit} most recently active member will remain ' \ + 'active, and the remaining members will have the %{link_start}Over limit status%{link_end} and ' \ + 'lose access to the group. You can go to the Usage Quotas page to manage which %{free_user_limit} ' \ + 'member will remain in your group.', + 'Your group, %{strong_start}%{namespace_name}%{strong_end} has more than %{free_user_limit} ' \ + 'members. From October 19, 2022, the %{free_user_limit} most recently active members will remain ' \ + 'active, and the remaining members will have the %{link_start}Over limit status%{link_end} and ' \ + 'lose access to the group. You can go to the Usage Quotas page to manage which %{free_user_limit} ' \ + 'members will remain in your group.', + free_user_limit + ).html_safe % { + strong_start: strong_start, + strong_end: strong_end, + namespace_name: namespace.name, + free_user_limit: free_user_limit, + link_start: over_limit_link_start, + link_end: link_end + } + end + + def strong_start + "<strong>".html_safe + end + + def strong_end + "</strong>".html_safe + end + + def over_limit_link_start + '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: BLOG_URL } + end end end end diff --git a/ee/app/components/namespaces/free_user_cap/usage_quota_alert_component.rb b/ee/app/components/namespaces/free_user_cap/usage_quota_alert_component.rb index 62927ff39a47943356d3d891b7ed1c22fa72b950..3db90b80576771cd07577edd8ef97d11d7b22b4d 100644 --- a/ee/app/components/namespaces/free_user_cap/usage_quota_alert_component.rb +++ b/ee/app/components/namespaces/free_user_cap/usage_quota_alert_component.rb @@ -36,17 +36,17 @@ def feature_name def alert_attributes { - title: s_('Billing|Your free group is now limited to %{free_user_limit} members') % { - free_user_limit: ::Namespaces::FreeUserCap::FREE_USER_LIMIT - }, + title: n_( + 'Billing|Your free group is now limited to %d member', + 'Billing|Your free group is now limited to %d members', + free_user_limit + ) % free_user_limit, body: s_( - 'Billing|Your group recently changed to use the Free plan. Free groups are limited to ' \ - '%{free_user_limit} members and the remaining members will get a status of over-limit ' \ - 'and lose access to the group. You can free up space for new members by removing ' \ - 'those who no longer need access or toggling them to over-limit. To get an unlimited ' \ - 'number of members, you can %{link_start}upgrade%{link_end} to a paid tier.' + 'Billing|Your group recently changed to use the Free plan. %{over_limit_message} You can free up ' \ + 'space for new members by removing those who no longer need access or toggling them to over-limit. ' \ + 'To get an unlimited number of members, you can %{link_start}upgrade%{link_end} to a paid tier.' ).html_safe % { - free_user_limit: ::Namespaces::FreeUserCap::FREE_USER_LIMIT, + over_limit_message: over_limit_message, link_start: '<a data-track-action="click_link" data-track-label="upgrade" ' \ 'data-track-property="free_group_limited_usage_quota_banner" ' \ 'href="%{url}">'.html_safe % { url: group_billings_path(namespace) }, @@ -55,6 +55,16 @@ def alert_attributes } end + def over_limit_message + n_( + 'Free groups are limited to %{free_user_limit} member and the remaining members will get ' \ + 'a status of over-limit and lose access to the group.', + 'Free groups are limited to %{free_user_limit} members and the remaining members will get ' \ + 'a status of over-limit and lose access to the group.', + free_user_limit + ).html_safe % { free_user_limit: free_user_limit } + end + def container_class content_class end diff --git a/ee/app/helpers/ee/members_helper.rb b/ee/app/helpers/ee/members_helper.rb index ef2eb2e0f37bdb90d195690b03aebca16415b1da..3328027ac2a4cd595fa1426ee2467ca21105d65f 100644 --- a/ee/app/helpers/ee/members_helper.rb +++ b/ee/app/helpers/ee/members_helper.rb @@ -5,8 +5,10 @@ module MembersHelper private def member_header_manage_namespace_members_text(namespace) - manage_text = _("To manage all members associated with this group and its subgroups and projects, " \ - "visit the %{link_start}usage quotas page%{link_end}.").html_safe % { + manage_text = _( + 'To manage seats for all members associated with this group and its subgroups and projects, ' \ + 'visit the %{link_start}usage quotas page%{link_end}.' + ).html_safe % { link_start: "<a href='#{group_usage_quotas_path(namespace)}'>".html_safe, link_end: '</a>'.html_safe } diff --git a/ee/spec/components/namespaces/free_user_cap/personal_preview_alert_component_spec.rb b/ee/spec/components/namespaces/free_user_cap/personal_preview_alert_component_spec.rb index d473fa21e66c76617dc7671dcaec91f71f81f38f..7c6181d094998c42c8be40d2c86f8607ae672bca 100644 --- a/ee/spec/components/namespaces/free_user_cap/personal_preview_alert_component_spec.rb +++ b/ee/spec/components/namespaces/free_user_cap/personal_preview_alert_component_spec.rb @@ -24,8 +24,8 @@ expect(rendered_component).to have_selector(".#{content_class}") expect(rendered_component).to have_content(title) expect(rendered_component).to have_link('View all personal projects', href: user_projects_path(user.username)) - expect(rendered_component).to have_link('status of Over limit', href: described_class::BLOG_URL) - expect(rendered_component).to have_link('move your project to a group') + expect(rendered_component).to have_link('Over limit status', href: described_class::BLOG_URL) + expect(rendered_component).to have_link('move your projects to a group') expect(rendered_component) .to have_css("[data-testid='user-over-limit-free-plan-alert']" \ "[data-dismiss-endpoint='#{callouts_path}']" \ diff --git a/ee/spec/components/namespaces/free_user_cap/preview_alert_component_spec.rb b/ee/spec/components/namespaces/free_user_cap/preview_alert_component_spec.rb index 4e1df45f95809cd937d8bbd14b16c700d40d224c..e7bf90474663c51e1c7308ec4e95e05746a04248 100644 --- a/ee/spec/components/namespaces/free_user_cap/preview_alert_component_spec.rb +++ b/ee/spec/components/namespaces/free_user_cap/preview_alert_component_spec.rb @@ -7,7 +7,7 @@ let_it_be(:content_class) { '_content_class_' } let(:preview_free_user_cap_over?) { true } - let(:title) { 'From October 19, 2022, free personal namespaces' } + let(:title) { 'From October 19, 2022, free groups will be limited' } subject(:component) { described_class.new(namespace: namespace, user: user, content_class: content_class) } @@ -30,7 +30,7 @@ expect(rendered_component).to have_content(title) expect(rendered_component).to have_link('Manage members', href: group_usage_quotas_path(namespace)) expect(rendered_component).to have_link('Explore paid plans', href: group_billings_path(namespace)) - expect(rendered_component).to have_link('status of Over limit', href: described_class::BLOG_URL) + expect(rendered_component).to have_link('Over limit status', href: described_class::BLOG_URL) expect(rendered_component) .to have_css("[data-testid='user-over-limit-free-plan-alert']" \ "[data-dismiss-endpoint='#{group_callouts_path}']" \ diff --git a/ee/spec/helpers/ee/groups/group_members_helper_spec.rb b/ee/spec/helpers/ee/groups/group_members_helper_spec.rb index f4787be6c55184beaa857f5c078f71df358f4a8f..c51c4f1c9bb0ba9e95ffe941edb28ffb81d2cbdb 100644 --- a/ee/spec/helpers/ee/groups/group_members_helper_spec.rb +++ b/ee/spec/helpers/ee/groups/group_members_helper_spec.rb @@ -76,9 +76,9 @@ end describe '#group_member_header_subtext' do - let(:base_subtext) { "You can invite a new member to <strong>#{group.name}</strong>." } + let(:base_subtext) { "You're viewing members of <strong>#{group.name}</strong>." } let(:standard_subtext) { "^#{base_subtext}$" } - let(:enforcement_subtext) { "^#{base_subtext}<br />To manage all members" } + let(:enforcement_subtext) { "^#{base_subtext}<br />To manage seats for all members" } where(:can_admin_member, :enforce_free_user_cap, :subtext) do true | true | ref(:enforcement_subtext) diff --git a/ee/spec/helpers/projects/project_members_helper_spec.rb b/ee/spec/helpers/projects/project_members_helper_spec.rb index 77ae6ba5007d717bc3d9c1a423df9e34f17ec3d9..c2fd3954fa0b8ba2047fda7e0464dcf32d46b8c4 100644 --- a/ee/spec/helpers/projects/project_members_helper_spec.rb +++ b/ee/spec/helpers/projects/project_members_helper_spec.rb @@ -67,7 +67,7 @@ def initialize(user) describe '#project_member_header_subtext' do let(:base_subtext) { "You can invite a new member to <strong>#{current_project.name}</strong> or invite another group." } let(:standard_subtext) { "^#{base_subtext}$" } - let(:enforcement_subtext) { "^#{base_subtext}<br />To manage all members" } + let(:enforcement_subtext) { "^#{base_subtext}<br />To manage seats for all members" } let_it_be(:project_with_group) { create(:project, group: create(:group)) } diff --git a/ee/spec/support/shared_examples/features/over_free_user_limit_shared_examples.rb b/ee/spec/support/shared_examples/features/over_free_user_limit_shared_examples.rb index 2103a95b5f0962239e212112d236d3ded7d13f61..b5d8bcaf9a7bba293f76be44b12d575906f5a725 100644 --- a/ee/spec/support/shared_examples/features/over_free_user_limit_shared_examples.rb +++ b/ee/spec/support/shared_examples/features/over_free_user_limit_shared_examples.rb @@ -39,7 +39,7 @@ end let(:alert_title_content) do - 'From October 19, 2022, free personal namespaces and top-level groups will be limited to' + 'From October 19, 2022, free groups will be limited to' end it_behaves_like 'performs entire show dismiss cycle' diff --git a/ee/spec/views/groups/group_members/index.html.haml_spec.rb b/ee/spec/views/groups/group_members/index.html.haml_spec.rb index bb0b5b0b367f65e95b7a0aeb909ebc2e2c302966..1663b0b10e40f4fdf548c4f1a06cebd2e08f1848 100644 --- a/ee/spec/views/groups/group_members/index.html.haml_spec.rb +++ b/ee/spec/views/groups/group_members/index.html.haml_spec.rb @@ -32,8 +32,8 @@ render expect(rendered).to have_content('Group members') - expect(rendered).to have_content('You can invite a new member to') - expect(rendered).to have_content('To manage all members associated with this group and its subgroups') + expect(rendered).to have_content("You're viewing members of") + expect(rendered).to have_content('To manage seats for all members associated with this group and its subgroups') expect(rendered).to have_link('usage quotas page', href: group_usage_quotas_path(group.root_ancestor)) end end diff --git a/ee/spec/views/projects/project_members/index.html.haml_spec.rb b/ee/spec/views/projects/project_members/index.html.haml_spec.rb index 8277e97deade94d2a5d5aee30f057e33477dff31..6f2466b4898dc42fc1507a8655bdc1e2c4b6d8d1 100644 --- a/ee/spec/views/projects/project_members/index.html.haml_spec.rb +++ b/ee/spec/views/projects/project_members/index.html.haml_spec.rb @@ -67,7 +67,11 @@ expect(rendered).to have_content('Project members') expect(rendered).to have_content('You can invite a new member to') - expect(rendered).to have_content('To manage all members associated with this group and its subgroups') + + expect(rendered).to have_content( + 'To manage seats for all members associated with this group and its subgroups' + ) + expect(rendered).to have_link('usage quotas page', href: group_usage_quotas_path(project.root_ancestor)) end end diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 31387932cb0c1058cba0c107631527165de0946a..9722f885206a978b3692995f6f6bb56a32e249fd 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -885,6 +885,15 @@ msgstr "" msgid "%{openedIssues} open, %{closedIssues} closed" msgstr "" +msgid "%{over_limit_message} To get more members, an owner of the group can start a trial or upgrade to a paid tier." +msgstr "" + +msgid "%{over_limit_message} To view and manage members, check the members page for each personal project. We recommend you %{link_start}move your projects to a group%{link_end} so you can easily manage users and features." +msgstr "" + +msgid "%{over_limit_message} To view and manage members, check the members page for each project in your namespace. We recommend you %{link_start}move your projects to a group%{link_end} so you can easily manage users and features." +msgstr "" + msgid "%{percentageUsed}%% used" msgstr "" @@ -6211,6 +6220,9 @@ msgstr "" msgid "Billings|Your account has been validated" msgstr "" +msgid "Billing|%{overLimitMessage} To ensure all members (active and %{linkStart}over limit%{linkEnd}) can access the group, you can start a trial or upgrade to a paid tier." +msgstr "" + msgid "Billing|%{user} was successfully approved" msgstr "" @@ -6265,8 +6277,10 @@ msgstr "" msgid "Billing|Group invite" msgstr "" -msgid "Billing|If the group has over %{maxNamespaceSeats} members, only those occupying a seat can access the namespace. To ensure all members (active and %{linkStart}over limit%{linkEnd}) can access the namespace, you can start a trial or upgrade to a paid tier." -msgstr "" +msgid "Billing|If the group has over %d member, only those occupying a seat can access the group." +msgid_plural "Billing|If the group has over %d members, only those occupying a seat can access the group." +msgstr[0] "" +msgstr[1] "" msgid "Billing|Members who were invited via a group invitation cannot be removed. You can either remove the entire group, or ask an Owner of the invited group to remove the member." msgstr "" @@ -6301,10 +6315,12 @@ msgstr "" msgid "Billing|You can begin moving members in %{namespaceName} now. A member loses access to the group when you turn off %{strongStart}In a seat%{strongEnd}. If over 5 members have %{strongStart}In a seat%{strongEnd} enabled after October 19, 2022, we'll select the 5 members who maintain access. We'll first count members that have Owner and Maintainer roles, then the most recently active members until we reach 5 members. The remaining members will get a status of Over limit and lose access to the group." msgstr "" -msgid "Billing|Your free group is now limited to %{free_user_limit} members" -msgstr "" +msgid "Billing|Your free group is now limited to %d member" +msgid_plural "Billing|Your free group is now limited to %d members" +msgstr[0] "" +msgstr[1] "" -msgid "Billing|Your group recently changed to use the Free plan. Free groups are limited to %{free_user_limit} members and the remaining members will get a status of over-limit and lose access to the group. You can free up space for new members by removing those who no longer need access or toggling them to over-limit. To get an unlimited number of members, you can %{link_start}upgrade%{link_end} to a paid tier." +msgid "Billing|Your group recently changed to use the Free plan. %{over_limit_message} You can free up space for new members by removing those who no longer need access or toggling them to over-limit. To get an unlimited number of members, you can %{link_start}upgrade%{link_end} to a paid tier." msgstr "" msgid "Bitbucket Server Import" @@ -16765,6 +16781,11 @@ msgstr "" msgid "Free Trial of GitLab.com Ultimate" msgstr "" +msgid "Free groups are limited to %{free_user_limit} member and the remaining members will get a status of over-limit and lose access to the group." +msgid_plural "Free groups are limited to %{free_user_limit} members and the remaining members will get a status of over-limit and lose access to the group." +msgstr[0] "" +msgstr[1] "" + msgid "Freeze end" msgstr "" @@ -16789,11 +16810,15 @@ msgstr "" msgid "From %{providerTitle}" msgstr "" -msgid "From October 19, 2022, free personal namespaces and top-level groups will be limited to %{free_limit} members" -msgstr "" +msgid "From October 19, 2022, free groups will be limited to %d member" +msgid_plural "From October 19, 2022, free groups will be limited to %d members" +msgstr[0] "" +msgstr[1] "" -msgid "From October 19, 2022, you can have a maximum of %{free_limit} unique members across all of your personal projects" -msgstr "" +msgid "From October 19, 2022, you can have a maximum of %d unique member across all of your personal projects" +msgid_plural "From October 19, 2022, you can have a maximum of %d unique members across all of your personal projects" +msgstr[0] "" +msgstr[1] "" msgid "From issue creation until deploy to production" msgstr "" @@ -21495,7 +21520,7 @@ msgstr "" msgid "InviteMembersBanner|We noticed that you haven't invited anyone to this group. Invite your colleagues so you can discuss issues, collaborate on merge requests, and share your knowledge." msgstr "" -msgid "InviteMembersModal| To get more members and access to additional paid features, an owner of this namespace can start a trial or upgrade to a paid tier." +msgid "InviteMembersModal| To get more members and access to additional paid features, an owner of the group can start a trial or upgrade to a paid tier." msgstr "" msgid "InviteMembersModal|%{linkStart}Read more%{linkEnd} about role permissions" @@ -21572,7 +21597,7 @@ msgstr "" msgid "InviteMembersModal|To assign issues to a new team member, you need a project for the issues. %{linkStart}Create a project to get started.%{linkEnd}" msgstr "" -msgid "InviteMembersModal|To get more members an owner of this namespace can %{trialLinkStart}start a trial%{trialLinkEnd} or %{upgradeLinkStart}upgrade%{upgradeLinkEnd} to a paid tier." +msgid "InviteMembersModal|To get more members an owner of the group can %{trialLinkStart}start a trial%{trialLinkEnd} or %{upgradeLinkStart}upgrade%{upgradeLinkEnd} to a paid tier." msgstr "" msgid "InviteMembersModal|To make more space, you can remove members who no longer need access." @@ -21587,9 +21612,6 @@ msgstr "" msgid "InviteMembersModal|You only have space for %{count} more %{members} in %{name}" msgstr "" -msgid "InviteMembersModal|You only have space for %{count} more %{members} in your personal projects" -msgstr "" - msgid "InviteMembersModal|You're inviting a group to the %{strongStart}%{name}%{strongEnd} group." msgstr "" @@ -40718,7 +40740,7 @@ msgstr "" msgid "To learn more about this project, read %{link_to_wiki}" msgstr "" -msgid "To manage all members associated with this group and its subgroups and projects, visit the %{link_start}usage quotas page%{link_end}." +msgid "To manage seats for all members associated with this group and its subgroups and projects, visit the %{link_start}usage quotas page%{link_end}." msgstr "" msgid "To move or copy an entire GitLab project from another GitLab installation to this one, navigate to the original project's settings page, generate an export file, and upload it here." @@ -44587,8 +44609,10 @@ msgstr "" msgid "You can group test cases using labels. To learn about the future direction of this feature, visit %{linkStart}Quality Management direction page%{linkEnd}." msgstr "" -msgid "You can have a maximum of %{free_limit} unique members across all of your personal projects. To view and manage members, check the members page for each project in your namespace. We recommend you %{move_link_start}move your projects to a group%{move_link_end} so you can easily manage users and features." -msgstr "" +msgid "You can have a maximum of %{free_user_limit} unique member across all of your personal projects." +msgid_plural "You can have a maximum of %{free_user_limit} unique members across all of your personal projects." +msgstr[0] "" +msgstr[1] "" msgid "You can invite a new member to %{project_name} or invite another group." msgstr "" @@ -44596,9 +44620,6 @@ msgstr "" msgid "You can invite a new member to %{project_name}." msgstr "" -msgid "You can invite a new member to %{strong_start}%{group_name}%{strong_end}." -msgstr "" - msgid "You can invite another group to %{project_name}." msgstr "" @@ -44653,7 +44674,7 @@ msgstr "" msgid "You can view the source or %{linkStart}%{cloneIcon} clone the repository%{linkEnd}" msgstr "" -msgid "You can't add any more, but you can manage your existing members, for example, by removing inactive members and replacing them with new members. To get more members an owner of this namespace can start a trial or upgrade to a paid tier." +msgid "You can't add any more, but you can manage your existing members, for example, by removing inactive members and replacing them with new members. To get more members an owner of the group can start a trial or upgrade to a paid tier." msgstr "" msgid "You cannot %{action} %{state} users." @@ -44701,8 +44722,10 @@ msgstr "" msgid "You could not create a new trigger." msgstr "" -msgid "You currently have more than %{free_limit} members across all your personal projects. From October 19, 2022, the %{free_limit} most recently active members will remain active, and the remaining members will get a %{link_start}status of Over limit%{link_end} and lose access. To view and manage members, check the members page for each project in your namespace. We recommend you %{move_link_start}move your project to a group%{move_link_end} so you can easily manage users and features." -msgstr "" +msgid "You currently have more than %{free_user_limit} member across all your personal projects. From October 19, 2022, the %{free_user_limit} most recently active member will remain active, and the remaining members will have the %{link_start}Over limit status%{link_end} and lose access." +msgid_plural "You currently have more than %{free_user_limit} members across all your personal projects. From October 19, 2022, the %{free_user_limit} most recently active members will remain active, and the remaining members will have the %{link_start}Over limit status%{link_end} and lose access." +msgstr[0] "" +msgstr[1] "" msgid "You do not have any subscriptions yet" msgstr "" @@ -45036,6 +45059,9 @@ msgstr "" msgid "You're receiving this email because you have been mentioned on %{host}. %{unsubscribe_link_start}Unsubscribe%{unsubscribe_link_end} from this thread · %{manage_notifications_link_start}Manage all notifications%{manage_notifications_link_end} · %{help_link_start}Help%{help_link_end}" msgstr "" +msgid "You're viewing members of %{strong_start}%{group_name}%{strong_end}." +msgstr "" + msgid "You've already enabled two-factor authentication using one time password authenticators. In order to register a different device, you must first disable two-factor authentication." msgstr "" @@ -45048,9 +45074,6 @@ msgstr "" msgid "YouTube" msgstr "" -msgid "Your %{doc_link_start}namespace%{doc_link_end}, %{strong_start}%{namespace_name}%{strong_end} has more than %{free_limit} members. From October 19, 2022, it will be limited to %{free_limit}, and the remaining members will get a %{link_start}status of Over limit%{link_end} and lose access to the namespace. You can go to the Usage Quotas page to manage which %{free_limit} members will remain in your namespace. To get more members, an owner can start a trial or upgrade to a paid tier." -msgstr "" - msgid "Your %{group} membership will now expire in %{days}." msgstr "" @@ -45237,6 +45260,11 @@ msgstr "" msgid "Your first project" msgstr "" +msgid "Your group, %{strong_start}%{namespace_name}%{strong_end} has more than %{free_user_limit} member. From October 19, 2022, the %{free_user_limit} most recently active member will remain active, and the remaining members will have the %{link_start}Over limit status%{link_end} and lose access to the group. You can go to the Usage Quotas page to manage which %{free_user_limit} member will remain in your group." +msgid_plural "Your group, %{strong_start}%{namespace_name}%{strong_end} has more than %{free_user_limit} members. From October 19, 2022, the %{free_user_limit} most recently active members will remain active, and the remaining members will have the %{link_start}Over limit status%{link_end} and lose access to the group. You can go to the Usage Quotas page to manage which %{free_user_limit} members will remain in your group." +msgstr[0] "" +msgstr[1] "" + msgid "Your groups" msgstr "" diff --git a/spec/frontend/invite_members/components/user_limit_notification_spec.js b/spec/frontend/invite_members/components/user_limit_notification_spec.js index bbc17932a492ffc6ffc0dda9dfc1183fa7245f66..543fc28a3422bd44b1ee2ade35fbac450028e039 100644 --- a/spec/frontend/invite_members/components/user_limit_notification_spec.js +++ b/spec/frontend/invite_members/components/user_limit_notification_spec.js @@ -9,6 +9,8 @@ import { import { freeUsersLimit, membersCount } from '../mock_data/member_modal'; +const WARNING_ALERT_TITLE = 'You only have space for 2 more members in name'; + describe('UserLimitNotification', () => { let wrapper; @@ -33,7 +35,7 @@ describe('UserLimitNotification', () => { }, ...props, }, - provide: { name: 'my group' }, + provide: { name: 'name' }, stubs: { GlSprintf }, }); }; @@ -50,7 +52,7 @@ describe('UserLimitNotification', () => { }); }); - describe('when close to limit with a personal namepace', () => { + describe('when close to limit within a personal namepace', () => { beforeEach(() => { createComponent(true, false, { membersCount: 3, userNamespace: true }); }); @@ -58,27 +60,24 @@ describe('UserLimitNotification', () => { it('renders the limit for a personal namespace', () => { const alert = findAlert(); - expect(alert.attributes('title')).toEqual( - 'You only have space for 2 more members in your personal projects', - ); + expect(alert.attributes('title')).toEqual(WARNING_ALERT_TITLE); + expect(alert.text()).toEqual( 'To make more space, you can remove members who no longer need access.', ); }); }); - describe('when close to limit', () => { + describe('when close to limit within a group', () => { it("renders user's limit notification", () => { createComponent(true, false, { membersCount: 3 }); const alert = findAlert(); - expect(alert.attributes('title')).toEqual( - 'You only have space for 2 more members in my group', - ); + expect(alert.attributes('title')).toEqual(WARNING_ALERT_TITLE); expect(alert.text()).toEqual( - 'To get more members an owner of this namespace can start a trial or upgrade to a paid tier.', + 'To get more members an owner of the group can start a trial or upgrade to a paid tier.', ); }); }); @@ -89,7 +88,7 @@ describe('UserLimitNotification', () => { const alert = findAlert(); - expect(alert.attributes('title')).toEqual("You've reached your 5 members limit for my group"); + expect(alert.attributes('title')).toEqual("You've reached your 5 members limit for name"); expect(alert.text()).toEqual(REACHED_LIMIT_UPGRADE_SUGGESTION_MESSAGE); }); diff --git a/spec/helpers/groups/group_members_helper_spec.rb b/spec/helpers/groups/group_members_helper_spec.rb index 89c26c213388fd6560ee68b1e26cd1664ce3aae9..0d53225bbcfbc8b3df40dffc1e77f6539dd3d7f7 100644 --- a/spec/helpers/groups/group_members_helper_spec.rb +++ b/spec/helpers/groups/group_members_helper_spec.rb @@ -173,7 +173,7 @@ describe '#group_member_header_subtext' do it 'contains expected text with group name' do - expect(helper.group_member_header_subtext(group)).to match("You can invite a new member to .*#{group.name}") + expect(helper.group_member_header_subtext(group)).to match("You're viewing members of .*#{group.name}") end end end diff --git a/spec/views/groups/group_members/index.html.haml_spec.rb b/spec/views/groups/group_members/index.html.haml_spec.rb index 2d7d50555d6309c7192016b957d9ad6273985e26..c7aebb94a45d4c36d7dfb2aba1feee0ddeef5bc3 100644 --- a/spec/views/groups/group_members/index.html.haml_spec.rb +++ b/spec/views/groups/group_members/index.html.haml_spec.rb @@ -21,7 +21,7 @@ render expect(rendered).to have_content('Group members') - expect(rendered).to have_content('You can invite a new member') + expect(rendered).to have_content("You're viewing members") expect(rendered).to have_selector('.js-invite-group-trigger') expect(rendered).to have_selector('.js-invite-members-trigger')