diff options
author | Tao Wang <twang2218@gmail.com> | 2018-06-16 08:22:42 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-11-26 15:43:05 +0300 |
commit | 5e8ea61ecdd44ba33093625a88d363ddbda6d204 (patch) | |
tree | 56962821d4e07c2f7d0adb98b2cc5c86e422c56b | |
parent | f9c6134b60465a5628c36d396e7f81f04c3ea235 (diff) |
i18n: externalize strings from 'app/views/shared/members'
Signed-off-by: Tao Wang <twang2218@gmail.com>
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r-- | app/views/shared/members/_filter_2fa_dropdown.html.haml | 4 | ||||
-rw-r--r-- | app/views/shared/members/_group.html.haml | 10 | ||||
-rw-r--r-- | app/views/shared/members/_member.html.haml | 27 | ||||
-rw-r--r-- | app/views/shared/members/_requests.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/members/_sort_dropdown.html.haml | 2 | ||||
-rw-r--r-- | locale/gitlab.pot | 42 |
6 files changed, 64 insertions, 23 deletions
diff --git a/app/views/shared/members/_filter_2fa_dropdown.html.haml b/app/views/shared/members/_filter_2fa_dropdown.html.haml index 95c35c56b3c..3e98587aeaa 100644 --- a/app/views/shared/members/_filter_2fa_dropdown.html.haml +++ b/app/views/shared/members/_filter_2fa_dropdown.html.haml @@ -1,10 +1,10 @@ - filter = params[:two_factor] || 'everyone' -- filter_options = { 'everyone' => 'Everyone', 'enabled' => 'Enabled', 'disabled' => 'Disabled' } +- filter_options = { 'everyone' => _('Everyone'), 'enabled' => _('Enabled'), 'disabled' => _('Disabled') } .dropdown.inline.member-filter-2fa-dropdown = dropdown_toggle('2FA: ' + filter_options[filter], { toggle: 'dropdown' }) %ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable %li.dropdown-header - Filter by two-factor authentication + = _("Filter by two-factor authentication") - filter_options.each do |value, title| %li = link_to filter_group_project_member_path(two_factor: value), class: ("is-active" if filter == value) do diff --git a/app/views/shared/members/_group.html.haml b/app/views/shared/members/_group.html.haml index d0b492b43f3..9ec76d82d18 100644 --- a/app/views/shared/members/_group.html.haml +++ b/app/views/shared/members/_group.html.haml @@ -12,7 +12,7 @@ - if group_link.expires? · %span{ class: ('text-warning' if group_link.expires_soon?) } - Expires in #{distance_of_time_in_words_to_now(group_link.expires_at)} + = _("Expires in %{expires_at}").html_safe % { expires_at: distance_of_time_in_words_to_now(group_link.expires_at) } .controls.member-controls = form_tag project_group_link_path(@project, group_link), method: :put, remote: true, class: 'js-edit-member-form form-group row append-right-5' do = hidden_field_tag "group_link[group_access]", group_link.group_access @@ -24,7 +24,7 @@ = group_link.human_access = icon("chevron-down") .dropdown-menu.dropdown-select.dropdown-menu-right.dropdown-menu-selectable - = dropdown_title("Change permissions") + = dropdown_title(_("Change permissions")) .dropdown-content %ul - Gitlab::Access.options.each do |role, role_id| @@ -33,13 +33,13 @@ class: ("is-active" if group_link.group_access == role_id), data: { id: role_id, el_id: dom_id } .prepend-left-5.clearable-input.member-form-control - = text_field_tag 'group_link[expires_at]', group_link.expires_at, class: 'form-control js-access-expiration-date js-member-update-control', placeholder: 'Expiration date', id: "member_expires_at_#{group.id}", disabled: !can_admin_member + = text_field_tag 'group_link[expires_at]', group_link.expires_at, class: 'form-control js-access-expiration-date js-member-update-control', placeholder: _('Expiration date'), id: "member_expires_at_#{group.id}", disabled: !can_admin_member %i.clear-icon.js-clear-input - if can_admin_member = link_to project_group_link_path(@project, group_link), method: :delete, - data: { confirm: "Are you sure you want to remove #{group.name}?" }, + data: { confirm: _("Are you sure you want to remove %{group_name}?") % { group_name: group.name } }, class: 'btn btn-remove prepend-left-10' do %span.d-block.d-sm-none - Delete + = _("Delete") = icon('trash', class: 'd-none d-sm-block') diff --git a/app/views/shared/members/_member.html.haml b/app/views/shared/members/_member.html.haml index b4b3f4a6b7e..a7fd75d85d7 100644 --- a/app/views/shared/members/_member.html.haml +++ b/app/views/shared/members/_member.html.haml @@ -17,15 +17,15 @@ = render_if_exists 'shared/members/ee/sso_badge', member: member - if user == current_user - %span.badge.badge-success.prepend-left-5 It's you + %span.badge.badge-success.prepend-left-5= _("It's you") - if user.blocked? %label.badge.badge-danger - %strong Blocked + %strong= _("Blocked") - if user.two_factor_enabled? %label.badge.badge-info - 2FA + = _("2FA") - if source.instance_of?(Group) && source != @group · @@ -33,14 +33,13 @@ .cgray - if member.request? - Requested - = time_ago_with_tooltip(member.requested_at) + = _("Requested %{time_ago}").html_safe % { time_ago: time_ago_with_tooltip(member.requested_at) } - else - Given access #{time_ago_with_tooltip(member.created_at)} + = _("Given access %{time_ago}").html_safe % { time_ago: time_ago_with_tooltip(member.created_at) } - if member.expires? · %span{ class: "#{"text-warning" if member.expires_soon?} has-tooltip", title: member.expires_at.to_time.in_time_zone.to_s(:medium) } - Expires in #{distance_of_time_in_words_to_now(member.expires_at)} + = _("Expires in %{expires_at}").html_safe % { expires_at: distance_of_time_in_words_to_now(member.expires_at) } - else = image_tag avatar_icon_for_email(member.invite_email, 40), class: "avatar s40", alt: '' @@ -61,7 +60,7 @@ = link_to icon('paper-plane'), polymorphic_path([:resend_invite, member]), method: :post, class: 'btn btn-default prepend-left-10 d-none d-sm-block', - title: 'Resend invite' + title: _('Resend invite') - if user != current_user && member.can_update? = form_for member, remote: true, html: { class: 'js-edit-member-form form-group row append-right-5' } do |f| @@ -73,7 +72,7 @@ = member.human_access = icon("chevron-down") .dropdown-menu.dropdown-select.dropdown-menu-right.dropdown-menu-selectable - = dropdown_title("Change permissions") + = dropdown_title(_("Change permissions")) .dropdown-content %ul - member.access_level_roles.each do |role, role_id| @@ -84,7 +83,7 @@ .prepend-left-5.clearable-input.member-form-control = f.text_field :expires_at, class: 'form-control js-access-expiration-date js-member-update-control', - placeholder: 'Expiration date', + placeholder: _('Expiration date'), id: "member_expires_at_#{member.id}", data: { el_id: dom_id(member) } %i.clear-icon.js-clear-input @@ -95,15 +94,15 @@ = link_to polymorphic_path([:approve_access_request, member]), method: :post, class: 'btn btn-success prepend-left-10', - title: 'Grant access' do + title: _('Grant access') do %span{ class: ('d-block d-sm-none' unless force_mobile_view) } - Grant access + = _('Grant access') - unless force_mobile_view = icon('check inverse', class: 'd-none d-sm-block') - if member.can_remove? - if current_user == user - = link_to icon('sign-out', text: 'Leave'), polymorphic_path([:leave, member.source, :members]), + = link_to icon('sign-out', text: _('Leave')), polymorphic_path([:leave, member.source, :members]), method: :delete, data: { confirm: leave_confirmation_message(member.source) }, class: 'btn btn-remove prepend-left-10' @@ -114,7 +113,7 @@ class: 'btn btn-remove prepend-left-10', title: remove_member_title(member) do %span{ class: ('d-block d-sm-none' unless force_mobile_view) } - Delete + = _("Delete") - unless force_mobile_view = icon('trash', class: 'd-none d-sm-block') - else diff --git a/app/views/shared/members/_requests.html.haml b/app/views/shared/members/_requests.html.haml index 54679ab86cc..1f62c3cbcf4 100644 --- a/app/views/shared/members/_requests.html.haml +++ b/app/views/shared/members/_requests.html.haml @@ -6,7 +6,7 @@ .card.prepend-top-default{ class: ('card-mobile' if force_mobile_view ) } .card-header - Users requesting access to + = _("Users requesting access to") %strong= membership_source.name %span.badge.badge-pill= requesters.size %ul.content-list.members-list diff --git a/app/views/shared/members/_sort_dropdown.html.haml b/app/views/shared/members/_sort_dropdown.html.haml index 56b8c8f033e..59bdfb73e6e 100644 --- a/app/views/shared/members/_sort_dropdown.html.haml +++ b/app/views/shared/members/_sort_dropdown.html.haml @@ -2,7 +2,7 @@ = dropdown_toggle(member_sort_options_hash[@sort], { toggle: 'dropdown' }) %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable %li.dropdown-header - Sort by + = _("Sort by") - member_sort_options_hash.each do |value, title| %li = link_to filter_group_project_member_path(sort: value), class: ("is-active" if @sort == value) do diff --git a/locale/gitlab.pot b/locale/gitlab.pot index c29c25c917e..5efbe03f3e2 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -216,6 +216,9 @@ msgstr[1] "" msgid "1st contribution!" msgstr "" +msgid "2FA" +msgstr "" + msgid "2FA enabled" msgstr "" @@ -921,6 +924,9 @@ msgstr "" msgid "Bitbucket import" msgstr "" +msgid "Blocked" +msgstr "" + msgid "Blog" msgstr "" @@ -1160,6 +1166,9 @@ msgstr "" msgid "Cannot modify managed Kubernetes cluster" msgstr "" +msgid "Change permissions" +msgstr "" + msgid "Change template" msgstr "" @@ -2468,6 +2477,9 @@ msgstr "" msgid "Disable shared Runners" msgstr "" +msgid "Disabled" +msgstr "" + msgid "Discard" msgstr "" @@ -2621,6 +2633,9 @@ msgstr "" msgid "Enable usage ping to get an overview of how you are using GitLab from a feature perspective." msgstr "" +msgid "Enabled" +msgstr "" + msgid "Ends at (UTC)" msgstr "" @@ -2816,6 +2831,9 @@ msgstr "" msgid "Every week (Sundays at 4:00am)" msgstr "" +msgid "Everyone" +msgstr "" + msgid "Everyone can contribute" msgstr "" @@ -2831,6 +2849,9 @@ msgstr "" msgid "Expiration date" msgstr "" +msgid "Expires in %{expires_at}" +msgstr "" + msgid "Explain the problem. If appropriate, provide a link to the relevant issue or comment." msgstr "" @@ -2930,6 +2951,9 @@ msgstr "" msgid "Filter by commit message" msgstr "" +msgid "Filter by two-factor authentication" +msgstr "" + msgid "Filter..." msgstr "" @@ -3101,6 +3125,9 @@ msgstr "" msgid "Gitea Import" msgstr "" +msgid "Given access %{time_ago}" +msgstr "" + msgid "Go Back" msgstr "" @@ -3125,6 +3152,9 @@ msgstr "" msgid "Got it!" msgstr "" +msgid "Grant access" +msgstr "" + msgid "Graph" msgstr "" @@ -3541,6 +3571,9 @@ msgstr "" msgid "Issues, merge requests, pushes and comments." msgstr "" +msgid "It's you" +msgstr "" + msgid "Jan" msgstr "" @@ -5390,6 +5423,9 @@ msgstr "" msgid "Request Access" msgstr "" +msgid "Requested %{time_ago}" +msgstr "" + msgid "Requests Profiles" msgstr "" @@ -5399,6 +5435,9 @@ msgstr "" msgid "Require all users to accept Terms of Service and Privacy Policy when they access GitLab." msgstr "" +msgid "Resend invite" +msgstr "" + msgid "Reset health check access token" msgstr "" @@ -7014,6 +7053,9 @@ msgstr "" msgid "Users" msgstr "" +msgid "Users requesting access to" +msgstr "" + msgid "Variables" msgstr "" |