Commit 0f045c42 authored by Fatih Acet's avatar Fatih Acet

Merge branch 'i18n-access_tokens-of-user-profile' into 'master'

Externalize strings of access tokens page in user profile

See merge request gitlab-org/gitlab-ce!28635
parents 23f5dcf6 ce8cf72b
- breadcrumb_title "Access Tokens" - breadcrumb_title s_('AccessTokens|Access Tokens')
- page_title "Personal Access Tokens" - page_title s_('AccessTokens|Personal Access Tokens')
- @content_class = "limit-container-width" unless fluid_layout - @content_class = "limit-container-width" unless fluid_layout
.row.prepend-top-default .row.prepend-top-default
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
%h4.prepend-top-0 %h4.prepend-top-0
= page_title = page_title
%p %p
You can generate a personal access token for each application you use that needs access to the GitLab API. = s_('AccessTokens|You can generate a personal access token for each application you use that needs access to the GitLab API.')
%p %p
You can also use personal access tokens to authenticate against Git over HTTP. = s_('AccessTokens|You can also use personal access tokens to authenticate against Git over HTTP.')
They are the only accepted password when you have Two-Factor Authentication (2FA) enabled. = s_('AccessTokens|They are the only accepted password when you have Two-Factor Authentication (2FA) enabled.')
.col-lg-8 .col-lg-8
- if @new_personal_access_token - if @new_personal_access_token
...@@ -24,35 +24,33 @@ ...@@ -24,35 +24,33 @@
.row.prepend-top-default .row.prepend-top-default
.col-lg-4.profile-settings-sidebar .col-lg-4.profile-settings-sidebar
%h4.prepend-top-0 %h4.prepend-top-0
Feed token = s_('AccessTokens|Feed token')
%p %p
Your feed token is used to authenticate you when your RSS reader loads a personalized RSS feed or when your calendar application loads a personalized calendar, and is included in those feed URLs. = s_('AccessTokens|Your feed token is used to authenticate you when your RSS reader loads a personalized RSS feed or when your calendar application loads a personalized calendar, and is included in those feed URLs.')
%p %p
It cannot be used to access any other data. = s_('AccessTokens|It cannot be used to access any other data.')
.col-lg-8.feed-token-reset .col-lg-8.feed-token-reset
= label_tag :feed_token, 'Feed token', class: "label-bold" = label_tag :feed_token, s_('AccessTokens|Feed token'), class: "label-bold"
= text_field_tag :feed_token, current_user.feed_token, class: 'form-control', readonly: true, onclick: 'this.select()' = text_field_tag :feed_token, current_user.feed_token, class: 'form-control', readonly: true, onclick: 'this.select()'
%p.form-text.text-muted %p.form-text.text-muted
Keep this token secret. Anyone who gets ahold of it can read activity and issue RSS feeds or your calendar feed as if they were you. - reset_link = link_to s_('AccessTokens|reset it'), [:reset, :feed_token, :profile], method: :put, data: { confirm: s_('AccessTokens|Are you sure? Any RSS or calendar URLs currently in use will stop working.') }
You should - reset_message = s_('AccessTokens|Keep this token secret. Anyone who gets ahold of it can read activity and issue RSS feeds or your calendar feed as if they were you. You should %{link_reset_it} if that ever happens.') % { link_reset_it: reset_link }
= link_to 'reset it', [:reset, :feed_token, :profile], method: :put, data: { confirm: 'Are you sure? Any RSS or calendar URLs currently in use will stop working.' } = reset_message.html_safe
if that ever happens.
- if incoming_email_token_enabled? - if incoming_email_token_enabled?
%hr %hr
.row.prepend-top-default .row.prepend-top-default
.col-lg-4.profile-settings-sidebar .col-lg-4.profile-settings-sidebar
%h4.prepend-top-0 %h4.prepend-top-0
Incoming email token = s_('AccessTokens|Incoming email token')
%p %p
Your incoming email token is used to authenticate you when you create a new issue by email, and is included in your personal project-specific email addresses. = s_('AccessTokens|Your incoming email token is used to authenticate you when you create a new issue by email, and is included in your personal project-specific email addresses.')
%p %p
It cannot be used to access any other data. = s_('AccessTokens|It cannot be used to access any other data.')
.col-lg-8.incoming-email-token-reset .col-lg-8.incoming-email-token-reset
= label_tag :incoming_email_token, 'Incoming email token', class: "label-bold" = label_tag :incoming_email_token, s_('AccessTokens|Incoming email token'), class: "label-bold"
= text_field_tag :incoming_email_token, current_user.incoming_email_token, class: 'form-control', readonly: true, onclick: 'this.select()' = text_field_tag :incoming_email_token, current_user.incoming_email_token, class: 'form-control', readonly: true, onclick: 'this.select()'
%p.form-text.text-muted %p.form-text.text-muted
Keep this token secret. Anyone who gets ahold of it can create issues as if they were you. - reset_link = link_to s_('AccessTokens|reset it'), [:reset, :incoming_email_token, :profile], method: :put, data: { confirm: s_('AccessTokens|Are you sure? Any issue email addresses currently in use will stop working.') }
You should - reset_message = s_('AccessTokens|Keep this token secret. Anyone who gets ahold of it can create issues as if they were you. You should %{link_reset_it} if that ever happens.') % { link_reset_it: reset_link }
= link_to 'reset it', [:reset, :incoming_email_token, :profile], method: :put, data: { confirm: 'Are you sure? Any issue email addresses currently in use will stop working.' } = reset_message.html_safe
if that ever happens.
- container_title = local_assigns.fetch(:container_title, 'Your New Personal Access Token') - container_title = local_assigns.fetch(:container_title, _('Your New Personal Access Token'))
- clipboard_button_title = local_assigns.fetch(:clipboard_button_title, 'Copy personal access token to clipboard') - clipboard_button_title = local_assigns.fetch(:clipboard_button_title, _('Copy personal access token to clipboard'))
.created-personal-access-token-container .created-personal-access-token-container
%h5.prepend-top-0 %h5.prepend-top-0
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
= text_field_tag 'created-personal-access-token', new_token_value, readonly: true, class: "qa-created-personal-access-token form-control js-select-on-focus", 'aria-describedby' => "created-token-help-block" = text_field_tag 'created-personal-access-token', new_token_value, readonly: true, class: "qa-created-personal-access-token form-control js-select-on-focus", 'aria-describedby' => "created-token-help-block"
%span.input-group-append %span.input-group-append
= clipboard_button(text: new_token_value, title: clipboard_button_title, placement: "left", class: "input-group-text btn-default btn-clipboard") = clipboard_button(text: new_token_value, title: clipboard_button_title, placement: "left", class: "input-group-text btn-default btn-clipboard")
%span#created-token-help-block.form-text.text-muted.text-danger Make sure you save it - you won't be able to access it again. %span#created-token-help-block.form-text.text-muted.text-danger
= _("Make sure you save it - you won't be able to access it again.")
%hr %hr
- type = impersonation ? "impersonation" : "personal access" - type = impersonation ? s_('Profiles|impersonation') : s_('Profiles|personal access')
%h5.prepend-top-0 %h5.prepend-top-0
Add a #{type} token = _('Add a %{type} token') % { type: type }
%p.profile-settings-content %p.profile-settings-content
Pick a name for the application, and we'll give you a unique #{type} token. = _("Pick a name for the application, and we'll give you a unique %{type} token.") % { type: type }
= form_for token, url: path, method: :post, html: { class: 'js-requires-input' } do |f| = form_for token, url: path, method: :post, html: { class: 'js-requires-input' } do |f|
...@@ -11,19 +11,19 @@ ...@@ -11,19 +11,19 @@
.row .row
.form-group.col-md-6 .form-group.col-md-6
= f.label :name, class: 'label-bold' = f.label :name, _('Name'), class: 'label-bold'
= f.text_field :name, class: "form-control qa-personal-access-token-name-field", required: true = f.text_field :name, class: "form-control qa-personal-access-token-name-field", required: true
.row .row
.form-group.col-md-6 .form-group.col-md-6
= f.label :expires_at, class: 'label-bold' = f.label :expires_at, _('Expires at'), class: 'label-bold'
.input-icon-wrapper .input-icon-wrapper
= f.text_field :expires_at, class: "datepicker form-control", placeholder: 'YYYY-MM-DD' = f.text_field :expires_at, class: "datepicker form-control", placeholder: 'YYYY-MM-DD'
= icon('calendar', { class: 'input-icon-right' }) = icon('calendar', { class: 'input-icon-right' })
.form-group .form-group
= f.label :scopes, class: 'label-bold' = f.label :scopes, _('Scopes'), class: 'label-bold'
= render 'shared/tokens/scopes_form', prefix: 'personal_access_token', token: token, scopes: scopes = render 'shared/tokens/scopes_form', prefix: 'personal_access_token', token: token, scopes: scopes
.prepend-top-default .prepend-top-default
= f.submit "Create #{type} token", class: "btn btn-success qa-create-token-button" = f.submit _('Create %{type} token') % { type: type }, class: "btn btn-success qa-create-token-button"
- type = impersonation ? "Impersonation" : "Personal Access" - type = impersonation ? s_('Profiles|Impersonation') : s_('Profiles|Personal Access')
%hr %hr
%h5 Active #{type} Tokens (#{active_tokens.length}) %h5
= _('Active %{type} Tokens (%{token_length})') % { type: type, token_length: active_tokens.length }
- if impersonation - if impersonation
%p.profile-settings-content %p.profile-settings-content
To see all the user's personal access tokens you must impersonate them first. = _("To see all the user's personal access tokens you must impersonate them first.")
- if active_tokens.present? - if active_tokens.present?
.table-responsive .table-responsive
%table.table.active-tokens %table.table.active-tokens
%thead %thead
%tr %tr
%th Name %th= _('Name')
%th Created %th= s_('AccessTokens|Created')
%th Expires %th= _('Expires')
%th Scopes %th= _('Scopes')
%th %th
%tbody %tbody
- active_tokens.each do |token| - active_tokens.each do |token|
...@@ -26,10 +27,10 @@ ...@@ -26,10 +27,10 @@
%span{ class: ('text-warning' if token.expires_soon?) } %span{ class: ('text-warning' if token.expires_soon?) }
In #{distance_of_time_in_words_to_now(token.expires_at)} In #{distance_of_time_in_words_to_now(token.expires_at)}
- else - else
%span.token-never-expires-label Never %span.token-never-expires-label= _('Never')
%td= token.scopes.present? ? token.scopes.join(", ") : "<no scopes selected>" %td= token.scopes.present? ? token.scopes.join(", ") : _('<no scopes selected>')
- path = impersonation ? revoke_admin_user_impersonation_token_path(token.user, token) : revoke_profile_personal_access_token_path(token) - path = impersonation ? revoke_admin_user_impersonation_token_path(token.user, token) : revoke_profile_personal_access_token_path(token)
%td= link_to "Revoke", path, method: :put, class: "btn btn-danger float-right qa-revoke-button", data: { confirm: "Are you sure you want to revoke this #{type} Token? This action cannot be undone." } %td= link_to _('Revoke'), path, method: :put, class: "btn btn-danger float-right qa-revoke-button", data: { confirm: _('Are you sure you want to revoke this %{type} Token? This action cannot be undone.') % { type: type } }
- else - else
.settings-message.text-center .settings-message.text-center
This user has no active #{type} Tokens. = _('This user has no active %{type} Tokens.') % { type: type }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
%tr %tr
%td %td
Scopes = _('Scopes')
%td %td
%ul.scopes-list.append-bottom-0 %ul.scopes-list.append-bottom-0
- token.scopes.each do |scope| - token.scopes.each do |scope|
......
...@@ -396,6 +396,9 @@ msgstr "" ...@@ -396,6 +396,9 @@ msgstr ""
msgid "<no name set>" msgid "<no name set>"
msgstr "" msgstr ""
msgid "<no scopes selected>"
msgstr ""
msgid "<strong>%{changedFilesLength} unstaged</strong> and <strong>%{stagedFilesLength} staged</strong> changes" msgid "<strong>%{changedFilesLength} unstaged</strong> and <strong>%{stagedFilesLength} staged</strong> changes"
msgstr "" msgstr ""
...@@ -507,6 +510,54 @@ msgstr "" ...@@ -507,6 +510,54 @@ msgstr ""
msgid "Access to '%{classification_label}' not allowed" msgid "Access to '%{classification_label}' not allowed"
msgstr "" msgstr ""
msgid "AccessTokens|Access Tokens"
msgstr ""
msgid "AccessTokens|Are you sure? Any RSS or calendar URLs currently in use will stop working."
msgstr ""
msgid "AccessTokens|Are you sure? Any issue email addresses currently in use will stop working."
msgstr ""
msgid "AccessTokens|Created"
msgstr ""
msgid "AccessTokens|Feed token"
msgstr ""
msgid "AccessTokens|Incoming email token"
msgstr ""
msgid "AccessTokens|It cannot be used to access any other data."
msgstr ""
msgid "AccessTokens|Keep this token secret. Anyone who gets ahold of it can create issues as if they were you. You should %{link_reset_it} if that ever happens."
msgstr ""
msgid "AccessTokens|Keep this token secret. Anyone who gets ahold of it can read activity and issue RSS feeds or your calendar feed as if they were you. You should %{link_reset_it} if that ever happens."
msgstr ""
msgid "AccessTokens|Personal Access Tokens"
msgstr ""
msgid "AccessTokens|They are the only accepted password when you have Two-Factor Authentication (2FA) enabled."
msgstr ""
msgid "AccessTokens|You can also use personal access tokens to authenticate against Git over HTTP."
msgstr ""
msgid "AccessTokens|You can generate a personal access token for each application you use that needs access to the GitLab API."
msgstr ""
msgid "AccessTokens|Your feed token is used to authenticate you when your RSS reader loads a personalized RSS feed or when your calendar application loads a personalized calendar, and is included in those feed URLs."
msgstr ""
msgid "AccessTokens|Your incoming email token is used to authenticate you when you create a new issue by email, and is included in your personal project-specific email addresses."
msgstr ""
msgid "AccessTokens|reset it"
msgstr ""
msgid "Account" msgid "Account"
msgstr "" msgstr ""
...@@ -519,6 +570,9 @@ msgstr "" ...@@ -519,6 +570,9 @@ msgstr ""
msgid "Active" msgid "Active"
msgstr "" msgstr ""
msgid "Active %{type} Tokens (%{token_length})"
msgstr ""
msgid "Active Sessions" msgid "Active Sessions"
msgstr "" msgstr ""
...@@ -537,6 +591,9 @@ msgstr "" ...@@ -537,6 +591,9 @@ msgstr ""
msgid "Add README" msgid "Add README"
msgstr "" msgstr ""
msgid "Add a %{type} token"
msgstr ""
msgid "Add a GPG key" msgid "Add a GPG key"
msgstr "" msgstr ""
...@@ -1164,6 +1221,9 @@ msgstr "" ...@@ -1164,6 +1221,9 @@ msgstr ""
msgid "Are you sure you want to reset the health check token?" msgid "Are you sure you want to reset the health check token?"
msgstr "" msgstr ""
msgid "Are you sure you want to revoke this %{type} Token? This action cannot be undone."
msgstr ""
msgid "Are you sure you want to revoke this nickname?" msgid "Are you sure you want to revoke this nickname?"
msgstr "" msgstr ""
...@@ -2992,6 +3052,9 @@ msgstr "" ...@@ -2992,6 +3052,9 @@ msgstr ""
msgid "Copy link" msgid "Copy link"
msgstr "" msgstr ""
msgid "Copy personal access token to clipboard"
msgstr ""
msgid "Copy reference to clipboard" msgid "Copy reference to clipboard"
msgstr "" msgstr ""
...@@ -3040,6 +3103,9 @@ msgstr "" ...@@ -3040,6 +3103,9 @@ msgstr ""
msgid "Create" msgid "Create"
msgstr "" msgstr ""
msgid "Create %{type} token"
msgstr ""
msgid "Create New Directory" msgid "Create New Directory"
msgstr "" msgstr ""
...@@ -4245,6 +4311,12 @@ msgstr "" ...@@ -4245,6 +4311,12 @@ msgstr ""
msgid "Expired %{expiredOn}" msgid "Expired %{expiredOn}"
msgstr "" msgstr ""
msgid "Expires"
msgstr ""
msgid "Expires at"
msgstr ""
msgid "Expires in %{expires_at}" msgid "Expires in %{expires_at}"
msgstr "" msgstr ""
...@@ -5957,6 +6029,9 @@ msgstr "" ...@@ -5957,6 +6029,9 @@ msgstr ""
msgid "Make issue confidential." msgid "Make issue confidential."
msgstr "" msgstr ""
msgid "Make sure you save it - you won't be able to access it again."
msgstr ""
msgid "Make sure you're logged into the account that owns the projects you'd like to import." msgid "Make sure you're logged into the account that owns the projects you'd like to import."
msgstr "" msgstr ""
...@@ -7086,6 +7161,9 @@ msgstr "" ...@@ -7086,6 +7161,9 @@ msgstr ""
msgid "Pick a name" msgid "Pick a name"
msgstr "" msgstr ""
msgid "Pick a name for the application, and we'll give you a unique %{type} token."
msgstr ""
msgid "Pin code" msgid "Pin code"
msgstr "" msgstr ""
...@@ -7611,6 +7689,9 @@ msgstr "" ...@@ -7611,6 +7689,9 @@ msgstr ""
msgid "Profiles|Full name" msgid "Profiles|Full name"
msgstr "" msgstr ""
msgid "Profiles|Impersonation"
msgstr ""
msgid "Profiles|Include private contributions on my profile" msgid "Profiles|Include private contributions on my profile"
msgstr "" msgstr ""
...@@ -7653,6 +7734,9 @@ msgstr "" ...@@ -7653,6 +7734,9 @@ msgstr ""
msgid "Profiles|Path" msgid "Profiles|Path"
msgstr "" msgstr ""
msgid "Profiles|Personal Access"
msgstr ""
msgid "Profiles|Position and size your new avatar" msgid "Profiles|Position and size your new avatar"
msgstr "" msgstr ""
...@@ -7788,6 +7872,12 @@ msgstr "" ...@@ -7788,6 +7872,12 @@ msgstr ""
msgid "Profiles|e.g. My MacBook key" msgid "Profiles|e.g. My MacBook key"
msgstr "" msgstr ""
msgid "Profiles|impersonation"
msgstr ""
msgid "Profiles|personal access"
msgstr ""
msgid "Profiles|username" msgid "Profiles|username"
msgstr "" msgstr ""
...@@ -8821,6 +8911,9 @@ msgstr "" ...@@ -8821,6 +8911,9 @@ msgstr ""
msgid "Scoped label" msgid "Scoped label"
msgstr "" msgstr ""
msgid "Scopes"
msgstr ""
msgid "Scroll down to <strong>Google Code Project Hosting</strong> and enable the switch on the right." msgid "Scroll down to <strong>Google Code Project Hosting</strong> and enable the switch on the right."
msgstr "" msgstr ""
...@@ -10538,6 +10631,9 @@ msgstr "" ...@@ -10538,6 +10631,9 @@ msgstr ""
msgid "This user cannot be unlocked manually from GitLab" msgid "This user cannot be unlocked manually from GitLab"
msgstr "" msgstr ""
msgid "This user has no active %{type} Tokens."
msgstr ""
msgid "This user has no identities" msgid "This user has no identities"
msgstr "" msgstr ""
...@@ -10803,6 +10899,9 @@ msgstr "" ...@@ -10803,6 +10899,9 @@ msgstr ""
msgid "To preserve performance only <strong>%{display_size} of %{real_size}</strong> files are displayed." msgid "To preserve performance only <strong>%{display_size} of %{real_size}</strong> files are displayed."
msgstr "" msgstr ""
msgid "To see all the user's personal access tokens you must impersonate them first."
msgstr ""
msgid "To specify the notification level per project of a group you belong to, you need to visit project page and change notification level there." msgid "To specify the notification level per project of a group you belong to, you need to visit project page and change notification level there."
msgstr "" msgstr ""
...@@ -12026,6 +12125,9 @@ msgstr "" ...@@ -12026,6 +12125,9 @@ msgstr ""
msgid "Your Groups" msgid "Your Groups"
msgstr "" msgstr ""
msgid "Your New Personal Access Token"
msgstr ""
msgid "Your Primary Email will be used for avatar detection." msgid "Your Primary Email will be used for avatar detection."
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment