From ce7ecaef46dccb59868851b6c156cec9eb733f44 Mon Sep 17 00:00:00 2001 From: Tao Wang Date: Wed, 13 Jun 2018 00:17:39 +1000 Subject: [PATCH] i18n: externalize strings from 'app/views/groups' Signed-off-by: Tao Wang --- app/views/groups/_activities.html.haml | 2 +- app/views/groups/_create_chat_team.html.haml | 6 +- .../groups/_group_admin_settings.html.haml | 12 +- app/views/groups/activity.html.haml | 4 +- app/views/groups/edit.html.haml | 2 +- .../group_members/_new_group_member.html.haml | 12 +- .../groups/group_members/index.html.haml | 16 +- app/views/groups/issues.html.haml | 6 +- app/views/groups/labels/edit.html.haml | 4 +- app/views/groups/labels/index.html.haml | 4 +- app/views/groups/labels/new.html.haml | 6 +- app/views/groups/merge_requests.html.haml | 4 +- app/views/groups/milestones/_form.html.haml | 14 +- .../groups/milestones/_header_title.html.haml | 2 +- app/views/groups/milestones/edit.html.haml | 4 +- app/views/groups/milestones/index.html.haml | 6 +- app/views/groups/milestones/new.html.haml | 6 +- app/views/groups/new.html.haml | 12 +- app/views/groups/projects.html.haml | 17 +- app/views/groups/runners/edit.html.haml | 2 +- app/views/groups/settings/_advanced.html.haml | 31 +-- app/views/groups/settings/_general.html.haml | 16 +- .../groups/settings/_permissions.html.haml | 2 +- .../groups/settings/ci_cd/show.html.haml | 4 +- app/views/groups/show.html.haml | 2 +- ee/app/views/groups/analytics/show.html.haml | 6 +- .../groups/saml_providers/_info.html.haml | 4 +- locale/gitlab.pot | 178 ++++++++++++++++-- qa/qa/page/group/new.rb | 2 +- 29 files changed, 270 insertions(+), 116 deletions(-) diff --git a/app/views/groups/_activities.html.haml b/app/views/groups/_activities.html.haml index 82a497289f35d3..757a1d4ef04873 100644 --- a/app/views/groups/_activities.html.haml +++ b/app/views/groups/_activities.html.haml @@ -1,7 +1,7 @@ .nav-block.activities = render 'shared/event_filter' .controls - = link_to group_path(@group, rss_url_options), class: 'btn rss-btn has-tooltip' , title: 'Subscribe' do + = link_to group_path(@group, rss_url_options), class: 'btn rss-btn has-tooltip' , title: _('Subscribe') do %i.fa.fa-rss .content_list diff --git a/app/views/groups/_create_chat_team.html.haml b/app/views/groups/_create_chat_team.html.haml index f950968030f668..11f6151f93274a 100644 --- a/app/views/groups/_create_chat_team.html.haml +++ b/app/views/groups/_create_chat_team.html.haml @@ -2,15 +2,15 @@ = f.label :create_chat_team, class: 'col-form-label' do %span.mattermost-icon = custom_icon('icon_mattermost') - Mattermost + = _('Mattermost') .col-sm-10 .form-check.js-toggle-container .js-toggle-button.form-check-input= f.check_box(:create_chat_team, { checked: true }, true, false) = f.label :create_chat_team, class: 'form-check-label' do - Create a Mattermost team for this group + = _("Create a Mattermost team for this group") %br %small.light.js-toggle-content - Mattermost URL: + = _('Mattermost URL:') = Settings.mattermost.host %span> / %span{ "data-bind-out" => "create_chat_team" } diff --git a/app/views/groups/_group_admin_settings.html.haml b/app/views/groups/_group_admin_settings.html.haml index b1ed2667e6410f..b6173590109af5 100644 --- a/app/views/groups/_group_admin_settings.html.haml +++ b/app/views/groups/_group_admin_settings.html.haml @@ -1,27 +1,27 @@ .form-group.row - = f.label :lfs_enabled, 'Large File Storage', class: 'col-form-label col-sm-2' + = f.label :lfs_enabled, _('Large File Storage'), class: 'col-form-label col-sm-2' .col-sm-10 .form-check = f.check_box :lfs_enabled, checked: @group.lfs_enabled?, class: 'form-check-input' = f.label :lfs_enabled, class: 'form-check-label' do %strong - Allow projects within this group to use Git LFS + = _('Allow projects within this group to use Git LFS') = link_to icon('question-circle'), help_page_path('workflow/lfs/manage_large_binaries_with_git_lfs') %br/ - %span.descr This setting can be overridden in each project. + %span.descr= _('This setting can be overridden in each project.') = render partial: 'groups/ee/project_creation_level', locals: { form: f, group: @group } .form-group.row - = f.label :require_two_factor_authentication, 'Two-factor authentication', class: 'col-form-label col-sm-2' + = f.label :require_two_factor_authentication, _('Two-factor authentication'), class: 'col-form-label col-sm-2' .col-sm-10 .form-check = f.check_box :require_two_factor_authentication, class: 'form-check-input' = f.label :require_two_factor_authentication, class: 'form-check-label' do %strong - Require all users in this group to setup Two-factor authentication + = _("Require all users in this group to setup Two-factor authentication") = link_to icon('question-circle'), help_page_path('security/two_factor_authentication', anchor: 'enforcing-2fa-for-all-users-in-a-group') .form-group.row .offset-sm-2.col-sm-10 = f.text_field :two_factor_grace_period, class: 'form-control' - .form-text.text-muted Amount of time (in hours) that users are allowed to skip forced configuration of two-factor authentication + .form-text.text-muted= _("Amount of time (in hours) that users are allowed to skip forced configuration of two-factor authentication") diff --git a/app/views/groups/activity.html.haml b/app/views/groups/activity.html.haml index cb7dab2633237b..6ba6dab96ae584 100644 --- a/app/views/groups/activity.html.haml +++ b/app/views/groups/activity.html.haml @@ -1,7 +1,7 @@ = content_for :meta_tags do - = auto_discovery_link_tag(:atom, group_url(@group, rss_url_options), title: "#{@group.name} activity") + = auto_discovery_link_tag(:atom, group_url(@group, rss_url_options), title: _("%{group_name} activity") % { group_name: @group.name }) -- page_title "Activity" +- page_title _("Activity") %section.activities = render 'activities' diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml index cae2df4699e6e0..965e1df014c693 100644 --- a/app/views/groups/edit.html.haml +++ b/app/views/groups/edit.html.haml @@ -1,4 +1,4 @@ -- breadcrumb_title "General Settings" +- breadcrumb_title _("General Settings") - @content_class = "limit-container-width" unless fluid_layout - expanded = Rails.env.test? diff --git a/app/views/groups/group_members/_new_group_member.html.haml b/app/views/groups/group_members/_new_group_member.html.haml index 8e390738b6e535..a9ea23b1272e4a 100644 --- a/app/views/groups/group_members/_new_group_member.html.haml +++ b/app/views/groups/group_members/_new_group_member.html.haml @@ -3,20 +3,20 @@ .col-md-4.col-lg-6 = users_select_tag(:user_ids, multiple: true, class: 'input-clamp', scope: :all, email_user: true, skip_ldap: @group.ldap_synced?) .form-text.text-muted.append-bottom-10 - Search for members by name, username, or email, or invite new ones using their email address. + = _("Search for members by name, username, or email, or invite new ones using their email address.") .col-md-3.col-lg-2 = select_tag :access_level, options_for_select(GroupMember.access_level_roles, @group_member.access_level), class: "form-control project-access-select" .form-text.text-muted.append-bottom-10 - = link_to "Read more", help_page_path("user/permissions"), class: "vlink" - about role permissions + - link_to_read_more = link_to(_("Read more"), help_page_path("user/permissions"), class: "vlink") + = _('%{link_to_read_more} about role permissions').html_safe % { link_to_read_more: link_to_read_more } .col-md-3.col-lg-2 .clearable-input - = text_field_tag :expires_at, nil, class: 'form-control js-access-expiration-date', placeholder: 'Expiration date' + = text_field_tag :expires_at, nil, class: 'form-control js-access-expiration-date', placeholder: _('Expiration date') %i.clear-icon.js-clear-input .form-text.text-muted.append-bottom-10 - On this date, the member(s) will automatically lose access to this group and all of its projects. + = _("On this date, the member(s) will automatically lose access to this group and all of its projects.") .col-md-2 - = f.submit 'Add to group', class: "btn btn-create btn-block" + = f.submit _('Add to group'), class: "btn btn-create btn-block" diff --git a/app/views/groups/group_members/index.html.haml b/app/views/groups/group_members/index.html.haml index 970216e252b5a1..ade62be4dec6d3 100644 --- a/app/views/groups/group_members/index.html.haml +++ b/app/views/groups/group_members/index.html.haml @@ -1,15 +1,14 @@ -- page_title "Members" +- page_title _("Members") - can_manage_members = can?(current_user, :admin_group_member, @group) .project-members-page.prepend-top-default %h4 - Members + = _('Members') %hr - if can_manage_members .project-members-new.append-bottom-default %p.clearfix - Add new member to - %strong= @group.name + = _('Add new member to %{strong_start}%{group_name}%{strong_end}').html_safe % { group_name: @group.name, strong_start: ''.html_safe, strong_end: ''.html_safe } = render "new_group_member" = render 'shared/members/requests', membership_source: @group, requesters: @requesters @@ -18,18 +17,17 @@ .clearfix %h5.member.existing-title - Existing members + = _('Existing members') .card .card-header.flex-project-members-panel %span.flex-project-title - Members with access to - %strong= @group.name + = _('Members with access to %{strong_start}%{group_name}%{strong_end}').html_safe % { group_name: @group.name, strong_start: ''.html_safe, strong_end: ''.html_safe } %span.badge= @members.total_count = form_tag group_group_members_path(@group), method: :get, class: 'form-inline member-search-form flex-project-members-form' do .form-group .position-relative.append-right-8 - = search_field_tag :search, params[:search], { placeholder: 'Find existing members by name', class: 'form-control', spellcheck: false } - %button.member-search-btn{ type: "submit", "aria-label" => "Submit search" } + = search_field_tag :search, params[:search], { placeholder: _('Find existing members by name'), class: 'form-control', spellcheck: false } + %button.member-search-btn{ type: "submit", "aria-label" => _("Submit search") } = icon("search") - if can_manage_members = render 'shared/members/filter_2fa_dropdown' diff --git a/app/views/groups/issues.html.haml b/app/views/groups/issues.html.haml index 5e1ae1dbe38845..c2e4848928f5ef 100644 --- a/app/views/groups/issues.html.haml +++ b/app/views/groups/issues.html.haml @@ -1,6 +1,6 @@ -- page_title "Issues" +- page_title _("Issues") = content_for :meta_tags do - = auto_discovery_link_tag(:atom, safe_params.merge(rss_url_options).to_h, title: "#{@group.name} issues") + = auto_discovery_link_tag(:atom, safe_params.merge(rss_url_options).to_h, title: _("%{group_name} issues") % { group_name: @group.name }) - if group_issues_count(state: 'all').zero? = render 'shared/empty_states/issues', project_select_button: true @@ -9,7 +9,7 @@ = render 'shared/issuable/nav', type: :issues .nav-controls = render 'shared/issuable/feed_buttons' - = render 'shared/new_project_item_select', path: 'issues/new', label: "New issue", type: :issues, with_feature_enabled: 'issues' + = render 'shared/new_project_item_select', path: 'issues/new', label: _("New issue"), type: :issues, with_feature_enabled: 'issues' = render 'shared/issuable/search_bar', type: :issues diff --git a/app/views/groups/labels/edit.html.haml b/app/views/groups/labels/edit.html.haml index 836981fc6fde12..572a4d01d67fae 100644 --- a/app/views/groups/labels/edit.html.haml +++ b/app/views/groups/labels/edit.html.haml @@ -1,7 +1,7 @@ -- page_title 'Edit', @label.name, 'Labels' +- page_title _('Edit'), @label.name, _('Labels') %h3.page-title - Edit Label + = _('Edit Label') %hr = render 'shared/labels/form', url: group_label_path(@group, @label), back_path: @previous_labels_path diff --git a/app/views/groups/labels/index.html.haml b/app/views/groups/labels/index.html.haml index 9fa07d9a4694e2..a2e505f8943589 100644 --- a/app/views/groups/labels/index.html.haml +++ b/app/views/groups/labels/index.html.haml @@ -1,4 +1,4 @@ -- page_title 'Labels' +- page_title _('Labels') - can_admin_label = can?(current_user, :admin_label, @group) - issuables = ['issues', 'merge requests'] + (@group&.feature_available?(:epics) ? ['epics'] : []) @@ -16,7 +16,7 @@ .labels-container.prepend-top-5 .other-labels - %h5 Labels + %h5= _("Labels") %ul.content-list.manage-labels-list.js-other-labels = render partial: 'shared/label', subject: @group, collection: @labels, as: :label, locals: { use_label_priority: false } = paginate @labels, theme: 'gitlab' diff --git a/app/views/groups/labels/new.html.haml b/app/views/groups/labels/new.html.haml index 538c353cf2dbb0..0ddd7af79eda6e 100644 --- a/app/views/groups/labels/new.html.haml +++ b/app/views/groups/labels/new.html.haml @@ -1,8 +1,8 @@ -- breadcrumb_title "Labels" -- page_title 'New Label' +- breadcrumb_title _("Labels") +- page_title _('New Label') %h3.page-title - New Label + = _('New Label') %hr = render 'shared/labels/form', url: group_labels_path, back_path: @previous_labels_path diff --git a/app/views/groups/merge_requests.html.haml b/app/views/groups/merge_requests.html.haml index e2a317dbf673a0..17cafe1e6e31f8 100644 --- a/app/views/groups/merge_requests.html.haml +++ b/app/views/groups/merge_requests.html.haml @@ -1,4 +1,4 @@ -- page_title "Merge Requests" +- page_title _("Merge Requests") - if group_merge_requests_count(state: 'all').zero? = render 'shared/empty_states/merge_requests', project_select_button: true @@ -7,7 +7,7 @@ = render 'shared/issuable/nav', type: :merge_requests - if current_user .nav-controls - = render 'shared/new_project_item_select', path: 'merge_requests/new', label: "New merge request", type: :merge_requests, with_feature_enabled: 'merge_requests' + = render 'shared/new_project_item_select', path: 'merge_requests/new', label: _("New merge request"), type: :merge_requests, with_feature_enabled: 'merge_requests' = render 'shared/issuable/search_bar', type: :merge_requests diff --git a/app/views/groups/milestones/_form.html.haml b/app/views/groups/milestones/_form.html.haml index 6d35457a0ecf0f..da92f055fbd2f2 100644 --- a/app/views/groups/milestones/_form.html.haml +++ b/app/views/groups/milestones/_form.html.haml @@ -4,14 +4,14 @@ .col-md-6 .form-group.row - = f.label :title, "Title", class: "col-form-label col-sm-2" + = f.label :title, _("Title"), class: "col-form-label col-sm-2" .col-sm-10 = f.text_field :title, maxlength: 255, class: "form-control", required: true, autofocus: true .form-group.row.milestone-description - = f.label :description, "Description", class: "col-form-label col-sm-2" + = f.label :description, _("Description"), class: "col-form-label col-sm-2" .col-sm-10 = render layout: 'projects/md_preview', locals: { url: group_preview_markdown_path } do - = render 'projects/zen', f: f, attr: :description, classes: 'note-textarea', placeholder: 'Write milestone description...', supports_autocomplete: false + = render 'projects/zen', f: f, attr: :description, classes: 'note-textarea', placeholder: _('Write milestone description...'), supports_autocomplete: false .clearfix .error-alert @@ -19,9 +19,9 @@ .form-actions - if @milestone.new_record? - = f.submit 'Create milestone', class: "btn-create btn" - = link_to "Cancel", group_milestones_path(@group), class: "btn btn-cancel" + = f.submit _('Create milestone'), class: "btn-create btn" + = link_to _("Cancel"), group_milestones_path(@group), class: "btn btn-cancel" - else - = f.submit 'Update milestone', class: "btn-create btn" - = link_to "Cancel", group_milestone_path(@group, @milestone), class: "btn btn-cancel" + = f.submit _('Update milestone'), class: "btn-create btn" + = link_to _("Cancel"), group_milestone_path(@group, @milestone), class: "btn btn-cancel" diff --git a/app/views/groups/milestones/_header_title.html.haml b/app/views/groups/milestones/_header_title.html.haml index 24eb39b8e2fb61..f222dba1f90988 100644 --- a/app/views/groups/milestones/_header_title.html.haml +++ b/app/views/groups/milestones/_header_title.html.haml @@ -1,2 +1,2 @@ - breadcrumb_title @milestone.title -- add_to_breadcrumbs "Milestones", group_milestones_path(@group) +- add_to_breadcrumbs _("Milestones"), group_milestones_path(@group) diff --git a/app/views/groups/milestones/edit.html.haml b/app/views/groups/milestones/edit.html.haml index 5f6d7d209d0627..ab92cdf52d72da 100644 --- a/app/views/groups/milestones/edit.html.haml +++ b/app/views/groups/milestones/edit.html.haml @@ -1,7 +1,7 @@ -- page_title "Milestones" +- page_title _("Milestones") - render "header_title" %h3.page-title - Edit Milestone + = _('Edit Milestone') = render "form" diff --git a/app/views/groups/milestones/index.html.haml b/app/views/groups/milestones/index.html.haml index f5f621507b8f31..a8da4067ea8cba 100644 --- a/app/views/groups/milestones/index.html.haml +++ b/app/views/groups/milestones/index.html.haml @@ -1,4 +1,4 @@ -- page_title "Milestones" +- page_title _("Milestones") .top-area = render 'shared/milestones_filter', counts: @milestone_states @@ -6,13 +6,13 @@ .nav-controls = render 'shared/milestones_sort_dropdown' - if can?(current_user, :admin_milestones, @group) - = link_to "New milestone", new_group_milestone_path(@group), class: "btn btn-new" + = link_to _("New milestone"), new_group_milestone_path(@group), class: "btn btn-new" .milestones %ul.content-list - if @milestones.blank? %li - .nothing-here-block No milestones to show + .nothing-here-block= _("No milestones to show") - else - @milestones.each do |milestone| = render 'milestone', milestone: milestone diff --git a/app/views/groups/milestones/new.html.haml b/app/views/groups/milestones/new.html.haml index d758e314d41426..b2cb17187cb887 100644 --- a/app/views/groups/milestones/new.html.haml +++ b/app/views/groups/milestones/new.html.haml @@ -1,7 +1,7 @@ -- breadcrumb_title "Milestones" -- page_title "Milestones" +- breadcrumb_title _("Milestones") +- page_title _("Milestones") %h3.page-title - New Milestone + = _("New Milestone") = render "form" diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml index 53f54db1ddfb5a..94e5b2a5181914 100644 --- a/app/views/groups/new.html.haml +++ b/app/views/groups/new.html.haml @@ -1,8 +1,8 @@ - @breadcrumb_link = dashboard_groups_path -- breadcrumb_title "Groups" +- breadcrumb_title _("Groups") - @hide_top_links = true -- page_title 'New Group' -- header_title "Groups", dashboard_groups_path +- page_title = _('New Group') +- header_title = _("Groups"), dashboard_groups_path .row.prepend-top-default .col-lg-3.profile-settings-sidebar @@ -23,7 +23,7 @@ = render 'shared/group_form', f: f, autofocus: true .form-group.row.group-description-holder - = f.label :avatar, "Group avatar", class: 'col-form-label col-sm-2' + = f.label :avatar, _("Group avatar"), class: 'col-form-label col-sm-2' .col-sm-10 = render 'shared/choose_group_avatar_button', f: f @@ -36,5 +36,5 @@ = render 'shared/group_tips' .form-actions - = f.submit 'Create group', class: "btn btn-create" - = link_to 'Cancel', dashboard_groups_path, class: 'btn btn-cancel' + = f.submit _('Create group'), class: "btn btn-create" + = link_to _('Cancel'), dashboard_groups_path, class: 'btn btn-cancel' diff --git a/app/views/groups/projects.html.haml b/app/views/groups/projects.html.haml index ba186875a86de8..61c3fe91ac1e5e 100644 --- a/app/views/groups/projects.html.haml +++ b/app/views/groups/projects.html.haml @@ -1,13 +1,12 @@ -- breadcrumb_title "Projects" +- breadcrumb_title _("Projects") .card.prepend-top-default .card-header - %strong= @group.name - projects: + = _('%{strong_start}%{group_name}%{strong_end} projects:').html_safe % { group_name: @group.name, strong_start: ''.html_safe, strong_end: ''.html_safe } - if can? current_user, :admin_group, @group .controls = link_to new_project_path(namespace_id: @group.id), class: "btn btn-sm btn-success" do - New project + = _('New project') %ul.content-list - @projects.each do |project| %li @@ -17,13 +16,13 @@ %strong= link_to project.full_name, project .float-right - if project.archived - %span.badge.badge-warning archived + %span.badge.badge-warning= _('archived') %span.badge.badge-pill = storage_counter(project.statistics.storage_size) - = link_to 'Members', project_project_members_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-sm" - = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-sm" - = link_to 'Remove', project, data: { confirm: remove_project_message(project)}, method: :delete, class: "btn btn-sm btn-remove" + = link_to _('Members'), project_project_members_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-sm" + = link_to _('Edit'), edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-sm" + = link_to _('Remove'), project, data: { confirm: remove_project_message(project)}, method: :delete, class: "btn btn-sm btn-remove" - if @projects.blank? - .nothing-here-block This group has no projects yet + .nothing-here-block= _('This group has no projects yet') = paginate @projects, theme: "gitlab" diff --git a/app/views/groups/runners/edit.html.haml b/app/views/groups/runners/edit.html.haml index fcd096eeaa030a..c332009def450b 100644 --- a/app/views/groups/runners/edit.html.haml +++ b/app/views/groups/runners/edit.html.haml @@ -1,4 +1,4 @@ -- page_title _('Edit'), "#{@runner.description} ##{@runner.id}", 'Runners' +- page_title _('Edit'), "#{@runner.description} ##{@runner.id}", _('Runners') %h4 Runner ##{@runner.id} diff --git a/app/views/groups/settings/_advanced.html.haml b/app/views/groups/settings/_advanced.html.haml index b7c673db7052cb..7551f5e0f73f0a 100644 --- a/app/views/groups/settings/_advanced.html.haml +++ b/app/views/groups/settings/_advanced.html.haml @@ -4,9 +4,9 @@ = form_errors(@group) .form-group %p - Changing group path can have unintended side effects. + = _("Changing group path can have unintended side effects.") = succeed '.' do - = link_to 'Learn more', help_page_path('user/group/index', anchor: 'changing-a-groups-path'), target: '_blank' + = link_to _('Learn more'), help_page_path('user/group/index', anchor: 'changing-a-groups-path'), target: '_blank' .input-group.gl-field-error-anchor .group-root-path.input-group-prepend.has-tooltip{ title: group_path(@group), :'data-placement' => 'bottom' } @@ -18,32 +18,33 @@ = f.text_field :path, placeholder: 'open-source', class: 'form-control', autofocus: local_assigns[:autofocus] || false, required: true, pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS, - title: 'Please choose a group path with no special characters.', + title: _('Please choose a group path with no special characters.'), "data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}" - = f.submit 'Change group path', class: 'btn btn-warning' + = f.submit _('Change group path'), class: 'btn btn-warning' .sub-section - %h4.danger-title Remove group + %h4.danger-title= _("Remove group") = form_tag(@group, method: :delete) do %p - Removing group will cause all child projects and resources to be removed. + = _("Removing group will cause all child projects and resources to be removed.") %br - %strong Removed group can not be restored! + %strong= _("Removed group can not be restored!") - = button_to 'Remove group', '#', class: 'btn btn-remove js-confirm-danger', data: { 'confirm-danger-message' => remove_group_message(@group) } + = button_to _('Remove group'), '#', class: 'btn btn-remove js-confirm-danger', data: { 'confirm-danger-message' => remove_group_message(@group) } - if supports_nested_groups? .sub-section - %h4.warning-title Transfer group + %h4.warning-title= _("Transfer group") = form_for @group, url: transfer_group_path(@group), method: :put do |f| .form-group - = dropdown_tag('Select parent group', options: { toggle_class: 'js-groups-dropdown', title: 'Parent Group', filter: true, dropdown_class: 'dropdown-open-top dropdown-group-transfer', placeholder: 'Search groups', data: { data: parent_group_options(@group) } }) + = dropdown_tag(_('Select parent group'), options: { toggle_class: 'js-groups-dropdown', title: _('Parent Group'), filter: true, dropdown_class: 'dropdown-open-top dropdown-group-transfer', placeholder: _('Search groups'), data: { data: parent_group_options(@group) } }) = hidden_field_tag 'new_parent_group_id' %ul - %li Be careful. Changing a group's parent can have unintended #{link_to 'side effects', 'https://docs.gitlab.com/ce/user/project/index.html#redirects-when-changing-repository-paths', target: 'blank'}. - %li You can only transfer the group to a group you manage. - %li You will need to update your local repositories to point to the new location. - %li If the parent group's visibility is lower than the group current visibility, visibility levels for subgroups and projects will be changed to match the new parent group's visibility. - = f.submit 'Transfer group', class: 'btn btn-warning' + - link_to_side_effects = link_to(_('side effects'), 'https://docs.gitlab.com/ce/user/project/index.html#redirects-when-changing-repository-paths', target: 'blank') + %li= _("Be careful. Changing a group's parent can have unintended %{link_to_side_effects}.").html_safe % { link_to_side_effects: link_to_side_effects } + %li= _("You can only transfer the group to a group you manage.") + %li= _("You will need to update your local repositories to point to the new location.") + %li= _("If the parent group's visibility is lower than the group current visibility, visibility levels for subgroups and projects will be changed to match the new parent group's visibility.") + = f.submit _('Transfer group'), class: 'btn btn-warning' diff --git a/app/views/groups/settings/_general.html.haml b/app/views/groups/settings/_general.html.haml index ab8263533beb2c..ff4ff8b5824260 100644 --- a/app/views/groups/settings/_general.html.haml +++ b/app/views/groups/settings/_general.html.haml @@ -5,18 +5,18 @@ .row .form-group.col-md-9 = f.label :name, class: 'label-bold' do - Group name + = _("Group name") = f.text_field :name, class: 'form-control' .form-group.col-md-3 = f.label :id, class: 'label-bold' do - Group ID + = _("Group ID") = f.text_field :id, class: 'form-control', readonly: true .form-group = f.label :description, class: 'label-bold' do - Group description - %span.light (optional) + = _("Group description") + %span.light= _("(optional)") = f.text_area :description, class: 'form-control', rows: 3, maxlength: 250 = render_if_exists 'shared/repository_size_limit_setting', form: f, type: :group @@ -27,12 +27,12 @@ = group_icon(@group, alt: '', class: 'avatar group-avatar s160') %p.light - if @group.avatar? - You can change the group avatar here + = _("You can change the group avatar here") - else - You can upload a group avatar here + = _("You can upload a group avatar here") = render 'shared/choose_group_avatar_button', f: f - if @group.avatar? %hr - = link_to _('Remove avatar'), group_avatar_path(@group.to_param), data: { confirm: _('Avatar will be removed. Are you sure?')}, method: :delete, class: 'btn btn-danger btn-inverted' + = link_to _('Remove avatar'), group_avatar_path(@group.to_param), data: { confirm: _('Avatar will be removed. Are you sure?') }, method: :delete, class: 'btn btn-danger btn-inverted' - = f.submit 'Save group', class: 'btn btn-success' + = f.submit _('Save group'), class: 'btn btn-success' diff --git a/app/views/groups/settings/_permissions.html.haml b/app/views/groups/settings/_permissions.html.haml index f1f67af1d1e039..4c000cc5ac9f8e 100644 --- a/app/views/groups/settings/_permissions.html.haml +++ b/app/views/groups/settings/_permissions.html.haml @@ -25,4 +25,4 @@ = render_if_exists 'groups/member_lock_setting', f: f, group: @group - = f.submit 'Save group', class: 'btn btn-success' + = f.submit _('Save group'), class: 'btn btn-success' diff --git a/app/views/groups/settings/ci_cd/show.html.haml b/app/views/groups/settings/ci_cd/show.html.haml index 647948c7dff6d4..d4f204d6f6e1ce 100644 --- a/app/views/groups/settings/ci_cd/show.html.haml +++ b/app/views/groups/settings/ci_cd/show.html.haml @@ -1,5 +1,5 @@ -- breadcrumb_title "CI / CD Settings" -- page_title "CI / CD" +- breadcrumb_title _("CI / CD Settings") +- page_title _("CI / CD") - expanded = Rails.env.test? diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index 5a88619f7697a4..339b1d190ad4f2 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -3,7 +3,7 @@ - can_create_subgroups = can?(current_user, :create_subgroup, @group) = content_for :meta_tags do - = auto_discovery_link_tag(:atom, group_url(@group, rss_url_options), title: "#{@group.name} activity") + = auto_discovery_link_tag(:atom, group_url(@group, rss_url_options), title: _("%{group_name} activity") % { group_name: @group.name }) = render 'groups/home_panel' diff --git a/ee/app/views/groups/analytics/show.html.haml b/ee/app/views/groups/analytics/show.html.haml index ad2b57b3ecaeb0..006e631880fc62 100644 --- a/ee/app/views/groups/analytics/show.html.haml +++ b/ee/app/views/groups/analytics/show.html.haml @@ -25,7 +25,7 @@ - commits_count = @events.code_push.map(&:commits_count).sum - person_count = @events.code_push.pluck(:author_id).uniq.count - person_count_string = pluralize person_count, 'person' - - pushes_string = _('%{pushes} pushes, more than %{commits} commits by %{people} contributors.').html_safe % { pushes: code_push_count, commits: commits_count , people: person_count_string } + - pushes_string = _('%{strong_start}%{pushes}%{strong_end} pushes, more than %{strong_start}%{commits}%{strong_end} commits by %{strong_start}%{people}%{strong_end} contributors.').html_safe % { pushes: code_push_count, commits: commits_count , people: person_count_string, strong_start: ''.html_safe, strong_end: ''.html_safe } - if code_push_count > 0 || commits_count > 0 || person_count > 0 = pushes_string - else @@ -39,7 +39,7 @@ - mr_created_count = @events.merge_requests.created.count - mr_merged_count = @events.merge_requests.merged.count - if mr_created_count > 0 || mr_merged_count > 0 - = _('%{created_count} created, %{accepted_count} accepted.').html_safe % { created_count: mr_created_count, accepted_count: mr_merged_count } + = _('%{strong_start}%{created_count}%{strong_end} created, %{strong_start}%{accepted_count}%{strong_end} accepted.').html_safe % { created_count: mr_created_count, accepted_count: mr_merged_count, strong_start: ''.html_safe, strong_end: ''.html_safe } - else = _('No merge requests for the selected time period.') @@ -51,7 +51,7 @@ - issues_created_count = @events.issues.created.count - issues_closed_count = @events.issues.closed.pluck(:target_id).uniq.count - if issues_created_count > 0 && issues_closed_count > 0 - = _('%{created_count} created, %{closed_count} closed.').html_safe % { created_count: issues_created_count, closed_count: issues_closed_count } + = _('%{strong_start}%{created_count}%{strong_end} created, %{strong_start}%{closed_count}%{strong_end} closed.').html_safe % { created_count: issues_created_count, closed_count: issues_closed_count, strong_start: ''.html_safe, strong_end: ''.html_safe } - else = _('No issues for the selected time period.') diff --git a/ee/app/views/groups/saml_providers/_info.html.haml b/ee/app/views/groups/saml_providers/_info.html.haml index d764d8eb7a503d..d1b7704287d03b 100644 --- a/ee/app/views/groups/saml_providers/_info.html.haml +++ b/ee/app/views/groups/saml_providers/_info.html.haml @@ -12,9 +12,9 @@ %li = (_("Set up assertions/attributes/claims (email, first_name, last_name) and NameID according to %{docsLinkStart}the documentation %{icon}%{docsLinkEnd}") % { icon: icon('external-link'), docsLinkStart: "", docsLinkEnd: '' }).html_safe %li - = (_("Fill in the fields below, turn on %{enable_label}, and press %{save_changes}") % { enable_label: _('Enable SAML authentication for this group'), save_changes: _('Save changes') }).html_safe + = _("Fill in the fields below, turn on %{strong_start}%{enable_label}%{strong_end}, and press %{strong_start}%{save_changes}%{strong_end}").html_safe % { enable_label: _('Enable SAML authentication for this group'), save_changes: _('Save changes'), strong_start: ''.html_safe, strong_end: ''.html_safe } %li - = (_("Share the %{sso_label} with members so they can sign in to your group through your identity provider") % { sso_label: _('GitLab single sign on URL') }).html_safe + = _("Share the %{strong_start}%{sso_label}%{strong_end} with members so they can sign in to your group through your identity provider").html_safe % { sso_label: _('GitLab single sign on URL'), strong_start: ''.html_safe, strong_end: ''.html_safe } .well-segment.borderless = render 'info_row', field: :assertion_consumer_service_url, label_text: _('Assertion consumer service URL') .form-text.text-muted= _('Also called "Relying party service URL" or "Reply URL"') diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 0ea8789d6cbfc5..9392fd69b0bc6d 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -122,6 +122,15 @@ msgstr "" msgid "%{group_docs_link_start}Groups%{group_docs_link_end} allow you to manage and collaborate across multiple projects. Members of a group have access to all of its projects." msgstr "" +msgid "%{group_name} activity" +msgstr "" + +msgid "%{group_name} issues" +msgstr "" + +msgid "%{link_to_read_more} about role permissions" +msgstr "" + msgid "%{loadingIcon} Started" msgstr "" @@ -154,6 +163,18 @@ msgid_plural "%{storage_name}: %{failed_attempts} failed storage access attempts msgstr[0] "" msgstr[1] "" +msgid "%{strong_start}%{created_count}%{strong_end} created, %{strong_start}%{accepted_count}%{strong_end} accepted." +msgstr "" + +msgid "%{strong_start}%{created_count}%{strong_end} created, %{strong_start}%{closed_count}%{strong_end} closed." +msgstr "" + +msgid "%{strong_start}%{group_name}%{strong_end} projects:" +msgstr "" + +msgid "%{strong_start}%{pushes}%{strong_end} pushes, more than %{strong_start}%{commits}%{strong_end} commits by %{strong_start}%{people}%{strong_end} contributors." +msgstr "" + msgid "%{text} %{files}" msgid_plural "%{text} %{files} files" msgstr[0] "" @@ -188,6 +209,9 @@ msgstr[1] "" msgid "%{unstaged} unstaged and %{staged} staged changes" msgstr "" +msgid "(optional)" +msgstr "" + msgid "+ %{moreCount} more" msgstr "" @@ -291,18 +315,9 @@ msgstr "" msgid "%{changedFilesLength} unstaged and %{stagedFilesLength} staged changes" msgstr "" -msgid "%{created_count} created, %{accepted_count} accepted." -msgstr "" - -msgid "%{created_count} created, %{closed_count} closed." -msgstr "" - msgid "%{group_name} group members" msgstr "" -msgid "%{pushes} pushes, more than %{commits} commits by %{people} contributors." -msgstr "" - msgid "Removes source branch" msgstr "" @@ -408,9 +423,15 @@ msgstr "" msgid "Add new directory" msgstr "" +msgid "Add new member to %{strong_start}%{group_name}%{strong_end}" +msgstr "" + msgid "Add reaction" msgstr "" +msgid "Add to group" +msgstr "" + msgid "Add todo" msgstr "" @@ -513,6 +534,9 @@ msgstr "" msgid "Allow commits from members who can merge to the target branch." msgstr "" +msgid "Allow projects within this group to use Git LFS" +msgstr "" + msgid "Allow public access to pipelines and job details, including output logs and artifacts" msgstr "" @@ -537,6 +561,9 @@ msgstr "" msgid "Alternatively, you can use a %{personal_access_token_link}. When you create your Personal Access Token, you will need to select the repo scope, so we can display a list of your public and private repositories which are available to import." msgstr "" +msgid "Amount of time (in hours) that users are allowed to skip forced configuration of two-factor authentication" +msgstr "" + msgid "An SSH key will be automatically generated when the form is submitted. For more information, please refer to the documentation." msgstr "" @@ -969,6 +996,9 @@ msgstr "" msgid "Badges|Your badges" msgstr "" +msgid "Be careful. Changing a group's parent can have unintended %{link_to_side_effects}." +msgstr "" + msgid "Begin with the selected commit" msgstr "" @@ -1313,6 +1343,9 @@ msgstr "" msgid "Change Weight" msgstr "" +msgid "Change group path" +msgstr "" + msgid "Change template" msgstr "" @@ -1340,6 +1373,9 @@ msgstr "" msgid "Changes are shown as if the source revision was being merged into the target revision." msgstr "" +msgid "Changing group path can have unintended side effects." +msgstr "" + msgid "Charts" msgstr "" @@ -2229,6 +2265,9 @@ msgstr "" msgid "Create New Directory" msgstr "" +msgid "Create a Mattermost team for this group" +msgstr "" + msgid "Create a new branch" msgstr "" @@ -2277,6 +2316,9 @@ msgstr "" msgid "Create merge request and branch" msgstr "" +msgid "Create milestone" +msgstr "" + msgid "Create new branch" msgstr "" @@ -2690,6 +2732,9 @@ msgstr "" msgid "Edit Label" msgstr "" +msgid "Edit Milestone" +msgstr "" + msgid "Edit Pipeline Schedule %{id}" msgstr "" @@ -2966,6 +3011,9 @@ msgstr "" msgid "Everyone can contribute" msgstr "" +msgid "Existing members" +msgstr "" + msgid "Expand" msgstr "" @@ -2975,6 +3023,9 @@ msgstr "" msgid "Expand sidebar" msgstr "" +msgid "Expiration date" +msgstr "" + msgid "Explore" msgstr "" @@ -3062,7 +3113,7 @@ msgstr "" msgid "Files (%{human_size})" msgstr "" -msgid "Fill in the fields below, turn on %{enable_label}, and press %{save_changes}" +msgid "Fill in the fields below, turn on %{strong_start}%{enable_label}%{strong_end}, and press %{strong_start}%{save_changes}%{strong_end}" msgstr "" msgid "Filter" @@ -3074,6 +3125,9 @@ msgstr "" msgid "Find by path" msgstr "" +msgid "Find existing members by name" +msgstr "" + msgid "Find file" msgstr "" @@ -3181,6 +3235,9 @@ msgstr "" msgid "General" msgstr "" +msgid "General Settings" +msgstr "" + msgid "General pipelines" msgstr "" @@ -3571,6 +3628,9 @@ msgstr "" msgid "Group avatar" msgstr "" +msgid "Group description" +msgstr "" + msgid "Group details" msgstr "" @@ -3580,6 +3640,9 @@ msgstr "" msgid "Group maintainers can register group runners in the %{link}" msgstr "" +msgid "Group name" +msgstr "" + msgid "Group: %{group_name}" msgstr "" @@ -3828,6 +3891,9 @@ msgstr "" msgid "If enabled, access to projects will be validated on an external service using their classification label." msgstr "" +msgid "If the parent group's visibility is lower than the group current visibility, visibility levels for subgroups and projects will be changed to match the new parent group's visibility." +msgstr "" + msgid "If using GitHub, you’ll see pipeline statuses on GitHub for your commits and pull requests. %{more_info_link}" msgstr "" @@ -4100,6 +4166,9 @@ msgstr "" msgid "Labels|Promoting %{labelTitle} will make it available for all projects inside %{groupName}. Existing project labels with the same title will be merged. This action cannot be reversed." msgstr "" +msgid "Large File Storage" +msgstr "" + msgid "Last %d day" msgid_plural "Last %d days" msgstr[0] "" @@ -4344,6 +4413,12 @@ msgstr "" msgid "Markdown enabled" msgstr "" +msgid "Mattermost" +msgstr "" + +msgid "Mattermost URL:" +msgstr "" + msgid "Maximum git storage failures" msgstr "" @@ -4359,6 +4434,9 @@ msgstr "" msgid "Members will be forwarded here when signing in to your group. Get this from your identity provider, where it can also be called \"SSO Service Location\", \"SAML Token Issuance Endpoint\", or \"SAML 2.0/W-Federation URL\"." msgstr "" +msgid "Members with access to %{strong_start}%{group_name}%{strong_end}" +msgstr "" + msgid "Merge Request" msgstr "" @@ -4676,6 +4754,9 @@ msgstr[1] "" msgid "New Label" msgstr "" +msgid "New Milestone" +msgstr "" + msgid "New Pipeline Schedule" msgstr "" @@ -4715,6 +4796,9 @@ msgstr "" msgid "New merge request" msgstr "" +msgid "New milestone" +msgstr "" + msgid "New pipelines will cancel older, pending pipelines on the same branch" msgstr "" @@ -4787,6 +4871,9 @@ msgstr "" msgid "No messages were logged" msgstr "" +msgid "No milestones to show" +msgstr "" + msgid "No other labels with such name or description" msgstr "" @@ -4940,6 +5027,9 @@ msgstr "" msgid "OfSearchInADropdown|Filter" msgstr "" +msgid "On this date, the member(s) will automatically lose access to this group and all of its projects." +msgstr "" + msgid "Once imported, repositories can be mirrored over SSH. Read more %{ssh_link}" msgstr "" @@ -5050,6 +5140,9 @@ msgstr "" msgid "Pagination|« First" msgstr "" +msgid "Parent Group" +msgstr "" + msgid "Part of merge request changes" msgstr "" @@ -5266,6 +5359,9 @@ msgstr "" msgid "Please accept the Terms of Service before continuing." msgstr "" +msgid "Please choose a group path with no special characters." +msgstr "" + msgid "Please convert them to %{link_to_git}, and go through the %{link_to_import_flow} again." msgstr "" @@ -5805,12 +5901,21 @@ msgstr "" msgid "Remove avatar" msgstr "" +msgid "Remove group" +msgstr "" + msgid "Remove priority" msgstr "" msgid "Remove project" msgstr "" +msgid "Removed group can not be restored!" +msgstr "" + +msgid "Removing group will cause all child projects and resources to be removed." +msgstr "" + msgid "Rename" msgstr "" @@ -5886,6 +5991,9 @@ msgstr "" msgid "Requests Profiles" msgstr "" +msgid "Require all users in this group to setup Two-factor authentication" +msgstr "" + msgid "Require all users to accept Terms of Service and Privacy Policy when they access GitLab." msgstr "" @@ -6005,6 +6113,9 @@ msgstr "" msgid "Save changes" msgstr "" +msgid "Save group" +msgstr "" + msgid "Save pipeline schedule" msgstr "" @@ -6050,9 +6161,15 @@ msgstr "" msgid "Search files" msgstr "" +msgid "Search for members by name, username, or email, or invite new ones using their email address." +msgstr "" + msgid "Search for projects, issues, etc." msgstr "" +msgid "Search groups" +msgstr "" + msgid "Search merge requests" msgstr "" @@ -6145,6 +6262,9 @@ msgstr "" msgid "Select branch/tag" msgstr "" +msgid "Select parent group" +msgstr "" + msgid "Select project" msgstr "" @@ -6235,7 +6355,7 @@ msgstr "" msgid "Share" msgstr "" -msgid "Share the %{sso_label} with members so they can sign in to your group through your identity provider" +msgid "Share the %{strong_start}%{sso_label}%{strong_end} with members so they can sign in to your group through your identity provider" msgstr "" msgid "Shared Runners" @@ -6902,6 +7022,9 @@ msgstr "" msgid "This group does not provide any group Runners yet." msgstr "" +msgid "This group has no projects yet" +msgstr "" + msgid "This is a confidential issue." msgstr "" @@ -6974,6 +7097,9 @@ msgstr "" msgid "This repository" msgstr "" +msgid "This setting can be overridden in each project." +msgstr "" + msgid "This source diff could not be displayed because it is too large." msgstr "" @@ -7275,6 +7401,9 @@ msgstr "" msgid "Track time with quick actions" msgstr "" +msgid "Transfer group" +msgstr "" + msgid "Trending" msgstr "" @@ -7299,6 +7428,9 @@ msgstr "" msgid "Twitter" msgstr "" +msgid "Two-factor authentication" +msgstr "" + msgid "Unable to load the diff. %{button_try_again}" msgstr "" @@ -7356,6 +7488,9 @@ msgstr "" msgid "Update" msgstr "" +msgid "Update milestone" +msgstr "" + msgid "Update now" msgstr "" @@ -7695,6 +7830,9 @@ msgstr "" msgid "Withdraw Access Request" msgstr "" +msgid "Write milestone description..." +msgstr "" + msgid "Yes" msgstr "" @@ -7737,6 +7875,9 @@ msgstr "" msgid "You can also test your .gitlab-ci.yml in the %{linkStart}Lint%{linkEnd}" msgstr "" +msgid "You can change the group avatar here" +msgstr "" + msgid "You can easily contribute to them by requesting to join these groups." msgstr "" @@ -7752,9 +7893,15 @@ msgstr "" msgid "You can only edit files when you are on a branch" msgstr "" +msgid "You can only transfer the group to a group you manage." +msgstr "" + msgid "You can resolve the merge conflict using either the Interactive mode, by choosing %{use_ours} or %{use_theirs} buttons, or by editing the files directly. Commit these changes into %{branch_name}" msgstr "" +msgid "You can upload a group avatar here" +msgstr "" + msgid "You cannot write to a read-only secondary GitLab Geo instance. Please use %{link_to_primary_node} instead." msgstr "" @@ -7794,6 +7941,9 @@ msgstr "" msgid "You need permission." msgstr "" +msgid "You will need to update your local repositories to point to the new location." +msgstr "" + msgid "You will not get any notifications via email" msgstr "" @@ -7891,6 +8041,9 @@ msgid_plural "and %d fixed vulnerabilities" msgstr[0] "" msgstr[1] "" +msgid "archived" +msgstr "" + msgid "assign yourself" msgstr "" @@ -8471,6 +8624,9 @@ msgstr "" msgid "remove weight" msgstr "" +msgid "side effects" +msgstr "" + msgid "source" msgstr "" diff --git a/qa/qa/page/group/new.rb b/qa/qa/page/group/new.rb index 48b71a7c883f3f..c367c6f8f25c97 100644 --- a/qa/qa/page/group/new.rb +++ b/qa/qa/page/group/new.rb @@ -9,7 +9,7 @@ class New < Page::Base end view 'app/views/groups/new.html.haml' do - element :create_group_button, "submit 'Create group'" + element :create_group_button, "submit _('Create group')" element :visibility_radios, 'visibility_level:' end -- GitLab