diff options
author | Tao Wang <twang2218@gmail.com> | 2018-06-16 07:45:36 +0300 |
---|---|---|
committer | Tao Wang <twang2218@gmail.com> | 2018-07-12 18:36:09 +0300 |
commit | 03437b49a5afe579f1ded8db9fad9a2c159a0a5f (patch) | |
tree | 87da7933e00c74ab6ce3d1b919e0a880bf686f3e /app/views/admin | |
parent | d5e53119ce8654f36ca64fd8fc972227862de1e8 (diff) |
i18n: externalize strings from 'app/views/admin/groups'
Signed-off-by: Tao Wang <twang2218@gmail.com>
Diffstat (limited to 'app/views/admin')
-rw-r--r-- | app/views/admin/groups/_form.html.haml | 10 | ||||
-rw-r--r-- | app/views/admin/groups/_group.html.haml | 4 | ||||
-rw-r--r-- | app/views/admin/groups/edit.html.haml | 4 | ||||
-rw-r--r-- | app/views/admin/groups/index.html.haml | 4 | ||||
-rw-r--r-- | app/views/admin/groups/new.html.haml | 4 | ||||
-rw-r--r-- | app/views/admin/groups/show.html.haml | 56 |
6 files changed, 39 insertions, 43 deletions
diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml index c8008771236..a3773e90cfb 100644 --- a/app/views/admin/groups/_form.html.haml +++ b/app/views/admin/groups/_form.html.haml @@ -6,7 +6,7 @@ = render_if_exists 'admin/namespace_plan', f: f .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 @@ -26,12 +26,12 @@ .alert.alert-info = render 'shared/group_tips' .form-actions - = f.submit 'Create group', class: "btn btn-create" - = link_to 'Cancel', admin_groups_path, class: "btn btn-cancel" + = f.submit _('Create group'), class: "btn btn-create" + = link_to _('Cancel'), admin_groups_path, class: "btn btn-cancel" - else .form-actions - = f.submit 'Save changes', class: "btn btn-save" - = link_to 'Cancel', admin_group_path(@group), class: "btn btn-cancel" + = f.submit _('Save changes'), class: "btn btn-save" + = link_to _('Cancel'), admin_group_path(@group), class: "btn btn-cancel" = render_if_exists 'ldap_group_links/ldap_syncrhonizations', group: @group diff --git a/app/views/admin/groups/_group.html.haml b/app/views/admin/groups/_group.html.haml index 3f96988c203..0a688b90f3a 100644 --- a/app/views/admin/groups/_group.html.haml +++ b/app/views/admin/groups/_group.html.haml @@ -3,8 +3,8 @@ %li.group-row{ class: css_class } .controls - = link_to 'Edit', admin_group_edit_path(group), id: "edit_#{dom_id(group)}", class: 'btn' - = link_to 'Delete', [:admin, group], data: { confirm: "Are you sure you want to remove #{group.name}?" }, method: :delete, class: 'btn btn-remove' + = link_to _('Edit'), admin_group_edit_path(group), id: "edit_#{dom_id(group)}", class: 'btn' + = link_to _('Delete'), [:admin, group], data: { confirm: _("Are you sure you want to remove %{group_name}?") % { group_name: group.name } }, method: :delete, class: 'btn btn-remove' .stats %span.badge.badge-pill = storage_counter(group.storage_size) diff --git a/app/views/admin/groups/edit.html.haml b/app/views/admin/groups/edit.html.haml index c2b9807015d..8e9e1a58a17 100644 --- a/app/views/admin/groups/edit.html.haml +++ b/app/views/admin/groups/edit.html.haml @@ -1,4 +1,4 @@ -- page_title "Edit", @group.name, "Groups" -%h3.page-title Edit group: #{@group.name} +- page_title _("Edit"), @group.name, _("Groups") +%h3.page-title= _('Edit group: %{group_name}') % { group_name: @group.name } %hr = render 'form', visibility_level: @group.visibility_level diff --git a/app/views/admin/groups/index.html.haml b/app/views/admin/groups/index.html.haml index 25946ba6eaf..6a9b85b4109 100644 --- a/app/views/admin/groups/index.html.haml +++ b/app/views/admin/groups/index.html.haml @@ -1,5 +1,5 @@ - @no_container = true -- page_title "Groups" +- page_title _("Groups") %div{ class: container_class } .top-area @@ -13,7 +13,7 @@ = icon("search", class: "search-icon") = render "shared/groups/dropdown", options_hash: admin_groups_sort_options_hash = link_to new_admin_group_path, class: "btn btn-new" do - New group + = _('New group') %ul.content-list = render @groups diff --git a/app/views/admin/groups/new.html.haml b/app/views/admin/groups/new.html.haml index 8f9fe96249f..553e8638e52 100644 --- a/app/views/admin/groups/new.html.haml +++ b/app/views/admin/groups/new.html.haml @@ -1,4 +1,4 @@ -- page_title "New Group" -%h3.page-title New group +- page_title _("New Group") +%h3.page-title= _('New group') %hr = render 'form', visibility_level: default_group_visibility diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index a40f98ad24f..72b068ea6b5 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -1,61 +1,58 @@ -- add_to_breadcrumbs "Groups", admin_groups_path +- add_to_breadcrumbs _("Groups"), admin_groups_path - breadcrumb_title @group.name -- page_title @group.name, "Groups" +- page_title @group.name, _("Groups") %h3.page-title - Group: #{@group.full_name} + = _('Group: %{group_name}') % { group_name: @group.full_name } = link_to admin_group_edit_path(@group), class: "btn float-right" do %i.fa.fa-pencil-square-o - Edit + = _('Edit') %hr .row .col-md-6 .card .card-header - Group info: + = _('Group info:') %ul.content-list %li .avatar-container.s60 = group_icon(@group, class: "avatar s60") %li - %span.light Name: + %span.light= _('Name:') %strong= @group.name %li - %span.light Path: + %span.light= _('Path:') %strong = @group.path %li - %span.light Description: + %span.light= _('Description:') %strong = @group.description %li - %span.light Visibility level: + %span.light= _('Visibility level:') %strong = visibility_level_label(@group.visibility_level) %li - %span.light Created on: + %span.light= _('Created on:') %strong = @group.created_at.to_s(:medium) = render_if_exists 'admin/namespace_plan_info', namespace: @group %li - %span.light Storage: - %strong= storage_counter(@group.storage_size) - ( - = storage_counter(@group.repository_size) - repositories, - = storage_counter(@group.build_artifacts_size) - build artifacts, - = storage_counter(@group.lfs_objects_size) - LFS - ) + %span.light= _('Storage:') + - counter_storage = storage_counter(@group.storage_size) + - counter_repositories = storage_counter(@group.repository_size) + - counter_build_artifacts = storage_counter(@group.build_artifacts_size) + - counter_lfs_objects = storage_counter(@group.lfs_objects_size) + %strong + = _("%{counter_storage} (%{counter_repositories} repositories, %{counter_build_artifacts} build artifacts, %{counter_lfs_objects} LFS)") % { counter_storage: counter_storage, counter_repositories: counter_repositories, counter_build_artifacts: counter_build_artifacts, counter_lfs_objects: counter_lfs_objects } %li - %span.light Group Git LFS status: + %span.light= _('Group Git LFS status:') %strong = group_lfs_status(@group) = link_to icon('question-circle'), help_page_path('workflow/lfs/manage_large_binaries_with_git_lfs') @@ -67,7 +64,7 @@ .card .card-header %h3.card-title - Projects + = _('Projects') %span.badge.badge-pill #{@group.projects.count} %ul.content-list @@ -85,7 +82,7 @@ - if @group.shared_projects.any? .card .card-header - Projects shared with #{@group.name} + = _('Projects shared with %{group_name}') % { group_name: @group.name } %span.badge.badge-pill #{@group.shared_projects.count} %ul.content-list @@ -102,11 +99,11 @@ - if can?(current_user, :admin_group_member, @group) .card .card-header - Add user(s) to the group: + = _('Add user(s) to the group:') .card-body.form-holder %p.light - Read more about project permissions - %strong= link_to "here", help_page_path("user/permissions"), class: "vlink" + - link_to_help = link_to(_("here"), help_page_path("user/permissions"), class: "vlink") + = _('Read more about project permissions <strong>%{link_to_help}</strong>').html_safe % { link_to_help: link_to_help } = form_tag admin_group_members_update_path(@group), id: "new_project_member", class: "bulk_import", method: :put do %div @@ -114,16 +111,15 @@ .prepend-top-10 = select_tag :access_level, options_for_select(GroupMember.access_level_roles), class: "project-access-select select2" %hr - = button_tag 'Add users to group', class: "btn btn-create" + = button_tag _('Add users to group'), class: "btn btn-create" = render 'shared/members/requests', membership_source: @group, requesters: @requesters, force_mobile_view: true .card .card-header - %strong= @group.name - group members + = _("<strong>%{group_name}</strong> group members").html_safe % { group_name: @group.name } %span.badge.badge-pill= @group.members.size .float-right - = link_to icon('pencil-square-o', text: 'Manage access'), polymorphic_url([@group, :members]), class: "btn btn-sm" + = link_to icon('pencil-square-o', text: _('Manage access')), polymorphic_url([@group, :members]), class: "btn btn-sm" %ul.content-list.group-users-list.content-list.members-list = render partial: 'shared/members/member', collection: @members, as: :member, locals: { show_controls: false } .card-footer |