Skip to content
Snippets Groups Projects
Commit a1c9a8aa authored by Bob Van Landuyt :neckbeard:'s avatar Bob Van Landuyt :neckbeard: :sunglasses:
Browse files

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

Externalize strings of Two-Factor Authentication page in user profile

See merge request gitlab-org/gitlab-ce!28749
parents faf506ea eac284b1
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -17,7 +17,7 @@ class Profiles::AccountsController < Profiles::ApplicationController
if unlink_provider_allowed?(provider)
identity.destroy
else
flash[:alert] = "You are not allowed to unlink your primary login account"
flash[:alert] = _("You are not allowed to unlink your primary login account")
end
 
redirect_to profile_account_path
Loading
Loading
Loading
Loading
@@ -18,7 +18,7 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController
two_factor_authentication_reason(
global: lambda do
flash.now[:alert] =
s_('The global settings require you to enable Two-Factor Authentication for your account.')
_('The global settings require you to enable Two-Factor Authentication for your account.')
end,
group: lambda do |groups|
flash.now[:alert] = groups_notification(groups)
Loading
Loading
@@ -27,7 +27,7 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController
 
unless two_factor_grace_period_expired?
grace_period_deadline = current_user.otp_grace_period_started_at + two_factor_grace_period.hours
flash.now[:alert] = flash.now[:alert] + s_(" You need to do this before %{grace_period_deadline}.") % { grace_period_deadline: l(grace_period_deadline) }
flash.now[:alert] = flash.now[:alert] + _(" You need to do this before %{grace_period_deadline}.") % { grace_period_deadline: l(grace_period_deadline) }
end
end
 
Loading
Loading
@@ -44,7 +44,7 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController
 
render 'create'
else
@error = s_('Invalid pin code')
@error = _('Invalid pin code')
@qr_code = build_qr_code
setup_u2f_registration
render 'show'
Loading
Loading
%p.slead
Should you ever lose your phone or access to your one time password secret, each of these recovery codes can be used one
time each to regain access to your account. Please save them in a safe place, or you
%b will
lose access to your account.
- lose_2fa_message = _('Should you ever lose your phone or access to your one time password secret, each of these recovery codes can be used one time each to regain access to your account. Please save them in a safe place, or you %{b_start}will%{b_end} lose access to your account.') % { b_start:'<b>', b_end:'</b>' }
= lose_2fa_message.html_safe
 
.codes.card
%ul
Loading
Loading
@@ -11,5 +9,5 @@
%span.monospace= code
 
.d-flex
= link_to 'Proceed', profile_account_path, class: 'btn btn-success append-right-10'
= link_to 'Download codes', "data:text/plain;charset=utf-8,#{CGI.escape(@codes.join("\n"))}", download: "gitlab-recovery-codes.txt", class: 'btn btn-default'
= link_to _('Proceed'), profile_account_path, class: 'btn btn-success append-right-10'
= link_to _('Download codes'), "data:text/plain;charset=utf-8,#{CGI.escape(@codes.join("\n"))}", download: "gitlab-recovery-codes.txt", class: 'btn btn-default'
- page_title 'Recovery Codes', 'Two-factor Authentication'
- page_title _('Recovery Codes'), _('Two-factor Authentication')
 
%h3.page-title Two-factor Authentication Recovery codes
%h3.page-title
= _('Two-factor Authentication Recovery codes')
%hr
= render 'codes'
- page_title 'Two-factor Authentication', 'Account'
- page_title _('Two-factor Authentication'), _('Account')
 
.alert.alert-success
Congratulations! You have enabled Two-factor Authentication!
= _('Congratulations! You have enabled Two-factor Authentication!')
 
= render 'codes'
- page_title 'Two-Factor Authentication', 'Account'
- add_to_breadcrumbs("Two-Factor Authentication", profile_account_path)
- page_title _('Two-Factor Authentication'), _('Account')
- add_to_breadcrumbs(_('Two-Factor Authentication'), profile_account_path)
- @content_class = "limit-container-width" unless fluid_layout
 
.js-two-factor-auth{ 'data-two-factor-skippable' => "#{two_factor_skippable?}", 'data-two_factor_skip_url' => skip_profile_two_factor_auth_path }
.row.prepend-top-default
.col-lg-4
%h4.prepend-top-0
Register Two-Factor Authenticator
= _('Register Two-Factor Authenticator')
%p
Use an one time password authenticator on your mobile device or computer to enable two-factor authentication (2FA).
= _('Use an one time password authenticator on your mobile device or computer to enable two-factor authentication (2FA).')
.col-lg-8
- if current_user.two_factor_otp_enabled?
%p
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.
= _("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.")
%p
If you lose your recovery codes you can generate new ones, invalidating all previous codes.
= _('If you lose your recovery codes you can generate new ones, invalidating all previous codes.')
%div
= link_to 'Disable two-factor authentication', profile_two_factor_auth_path,
= link_to _('Disable two-factor authentication'), profile_two_factor_auth_path,
method: :delete,
data: { confirm: "Are you sure? This will invalidate your registered applications and U2F devices." },
data: { confirm: _('Are you sure? This will invalidate your registered applications and U2F devices.') },
class: 'btn btn-danger append-right-10'
= form_tag codes_profile_two_factor_auth_path, {style: 'display: inline-block', method: :post} do |f|
= submit_tag 'Regenerate recovery codes', class: 'btn'
= submit_tag _('Regenerate recovery codes'), class: 'btn'
 
- else
%p
Install a soft token authenticator like <a href="https://freeotp.github.io/">FreeOTP</a>
or Google Authenticator from your application repository and scan this QR code.
More information is available in the #{link_to('documentation', help_page_path('user/profile/account/two_factor_authentication'))}.
- help_link_start = '<a href="%{url}" target="_blank">' % { url: help_page_path('user/profile/account/two_factor_authentication') }
- register_2fa_token = _('Install a soft token authenticator like %{free_otp_link} or Google Authenticator from your application repository and scan this QR code. More information is available in the %{help_link_start}documentation%{help_link_end}.') % { free_otp_link:'<a href="https://freeotp.github.io/">FreeOTP</a>', help_link_start:help_link_start, help_link_end:'</a>' }
= register_2fa_token.html_safe
.row.append-bottom-10
.col-md-4
= raw @qr_code
.col-md-8
.account-well
%p.prepend-top-0.append-bottom-0
Can't scan the code?
= _("Can't scan the code?")
%p.prepend-top-0.append-bottom-0
To add the entry manually, provide the following details to the application on your phone.
= _('To add the entry manually, provide the following details to the application on your phone.')
%p.prepend-top-0.append-bottom-0
Account:
= @account_string
= _('Account: %{account}') % { account: @account_string }
%p.prepend-top-0.append-bottom-0
Key:
= current_user.otp_secret.scan(/.{4}/).join(' ')
= _('Key: %{key}') %{ key: current_user.otp_secret.scan(/.{4}/).join(' ') }
%p.two-factor-new-manual-content
Time based: Yes
= _('Time based: Yes')
= form_tag profile_two_factor_auth_path, method: :post do |f|
- if @error
.alert.alert-danger
= @error
.form-group
= label_tag :pin_code, nil, class: "label-bold"
= label_tag :pin_code, _('Pin code'), class: "label-bold"
= text_field_tag :pin_code, nil, class: "form-control", required: true
.prepend-top-default
= submit_tag 'Register with two-factor app', class: 'btn btn-success'
= submit_tag _('Register with two-factor app'), class: 'btn btn-success'
 
%hr
 
.row.prepend-top-default
.col-lg-4
%h4.prepend-top-0
Register Universal Two-Factor (U2F) Device
= _('Register Universal Two-Factor (U2F) Device')
%p
Use a hardware device to add the second factor of authentication.
= _('Use a hardware device to add the second factor of authentication.')
%p
As U2F devices are only supported by a few browsers, we require that you set up a
two-factor authentication app before a U2F device. That way you'll always be able to
log in - even when you're using an unsupported browser.
= _("As U2F devices are only supported by a few browsers, we require that you set up a two-factor authentication app before a U2F device. That way you'll always be able to log in - even when you're using an unsupported browser.")
.col-lg-8
- if @u2f_registration.errors.present?
= form_errors(@u2f_registration)
Loading
Loading
@@ -74,7 +70,8 @@
 
%hr
 
%h5 U2F Devices (#{@u2f_registrations.length})
%h5
= _('U2F Devices (%{length})') % { length: @u2f_registrations.length }
 
- if @u2f_registrations.present?
.table-responsive
Loading
Loading
@@ -85,16 +82,16 @@
%col{ width: "20%" }
%thead
%tr
%th Name
%th Registered On
%th= _('Name')
%th= s_('2FADevice|Registered On')
%th
%tbody
- @u2f_registrations.each do |registration|
%tr
%td= registration.name.presence || "<no name set>"
%td= registration.name.presence || _("<no name set>")
%td= registration.created_at.to_date.to_s(:medium)
%td= link_to "Delete", profile_u2f_registration_path(registration), method: :delete, class: "btn btn-danger float-right", data: { confirm: "Are you sure you want to delete this device? This action cannot be undone." }
%td= link_to _('Delete'), profile_u2f_registration_path(registration), method: :delete, class: "btn btn-danger float-right", data: { confirm: _('Are you sure you want to delete this device? This action cannot be undone.') }
 
- else
.settings-message.text-center
You don't have any U2F devices registered yet.
= _("You don't have any U2F devices registered yet.")
Loading
Loading
@@ -340,6 +340,9 @@ msgstr ""
msgid "2FA enabled"
msgstr ""
 
msgid "2FADevice|Registered On"
msgstr ""
msgid "3 days"
msgstr ""
 
Loading
Loading
@@ -382,6 +385,9 @@ msgstr ""
msgid "<code>\"johnsmith@example.com\": \"johnsmith@example.com\"</code> will add \"By <a href=\"#\">johnsmith@example.com</a>\" to all issues and comments originally created by johnsmith@example.com. By default, the email address or username is masked to ensure the user's privacy. Use this option if you want to show the full email address."
msgstr ""
 
msgid "<no name set>"
msgstr ""
msgid "<strong>%{changedFilesLength} unstaged</strong> and <strong>%{stagedFilesLength} staged</strong> changes"
msgstr ""
 
Loading
Loading
@@ -496,6 +502,9 @@ msgstr ""
msgid "Account and limit"
msgstr ""
 
msgid "Account: %{account}"
msgstr ""
msgid "Active"
msgstr ""
 
Loading
Loading
@@ -1102,6 +1111,9 @@ msgstr ""
msgid "Are you sure you want to cancel editing this comment?"
msgstr ""
 
msgid "Are you sure you want to delete this device? This action cannot be undone."
msgstr ""
msgid "Are you sure you want to delete this list?"
msgstr ""
 
Loading
Loading
@@ -1153,9 +1165,15 @@ msgstr ""
msgid "Are you sure? Removing this GPG key does not affect already signed commits."
msgstr ""
 
msgid "Are you sure? This will invalidate your registered applications and U2F devices."
msgstr ""
msgid "Artifacts"
msgstr ""
 
msgid "As U2F devices are only supported by a few browsers, we require that you set up a two-factor authentication app before a U2F device. That way you'll always be able to log in - even when you're using an unsupported browser."
msgstr ""
msgid "AsanaService|%{user} pushed to branch %{branch} of %{project_name} ( %{commit_url} ):"
msgstr ""
 
Loading
Loading
@@ -1737,6 +1755,9 @@ msgstr ""
msgid "Can't find variable: ZiteReader"
msgstr ""
 
msgid "Can't scan the code?"
msgstr ""
msgid "Cancel"
msgstr ""
 
Loading
Loading
@@ -2807,6 +2828,9 @@ msgstr ""
msgid "Confirmation required"
msgstr ""
 
msgid "Congratulations! You have enabled Two-factor Authentication!"
msgstr ""
msgid "Connect"
msgstr ""
 
Loading
Loading
@@ -3520,6 +3544,9 @@ msgstr ""
msgid "Disable shared Runners"
msgstr ""
 
msgid "Disable two-factor authentication"
msgstr ""
msgid "Disabled"
msgstr ""
 
Loading
Loading
@@ -3601,6 +3628,9 @@ msgstr ""
msgid "Download asset"
msgstr ""
 
msgid "Download codes"
msgstr ""
msgid "Download export"
msgstr ""
 
Loading
Loading
@@ -5108,6 +5138,9 @@ msgstr ""
msgid "If this was a mistake you can leave the %{source_type}."
msgstr ""
 
msgid "If you lose your recovery codes you can generate new ones, invalidating all previous codes."
msgstr ""
msgid "If your HTTP repository is not publicly accessible, add authentication information to the URL: <code>https://username:password@gitlab.company.com/group/project.git</code>."
msgstr ""
 
Loading
Loading
@@ -5288,6 +5321,9 @@ msgstr ""
msgid "Install Runner on Kubernetes"
msgstr ""
 
msgid "Install a soft token authenticator like %{free_otp_link} or Google Authenticator from your application repository and scan this QR code. More information is available in the %{help_link_start}documentation%{help_link_end}."
msgstr ""
msgid "Instance Statistics"
msgstr ""
 
Loading
Loading
@@ -5567,6 +5603,9 @@ msgstr ""
msgid "Key (PEM)"
msgstr ""
 
msgid "Key: %{key}"
msgstr ""
msgid "Kubernetes"
msgstr ""
 
Loading
Loading
@@ -6940,6 +6979,9 @@ msgstr ""
msgid "Pick a name"
msgstr ""
 
msgid "Pin code"
msgstr ""
msgid "Pipeline"
msgstr ""
 
Loading
Loading
@@ -7315,6 +7357,9 @@ msgstr ""
msgid "Private projects can be created in your personal namespace with:"
msgstr ""
 
msgid "Proceed"
msgstr ""
msgid "Profile"
msgstr ""
 
Loading
Loading
@@ -8119,6 +8164,9 @@ msgstr ""
msgid "Recent searches"
msgstr ""
 
msgid "Recovery Codes"
msgstr ""
msgid "Reference:"
msgstr ""
 
Loading
Loading
@@ -8130,6 +8178,9 @@ msgstr[1] ""
msgid "Regenerate key"
msgstr ""
 
msgid "Regenerate recovery codes"
msgstr ""
msgid "Regex pattern"
msgstr ""
 
Loading
Loading
@@ -8139,15 +8190,24 @@ msgstr ""
msgid "Register / Sign In"
msgstr ""
 
msgid "Register Two-Factor Authenticator"
msgstr ""
msgid "Register U2F device"
msgstr ""
 
msgid "Register Universal Two-Factor (U2F) Device"
msgstr ""
msgid "Register and see your runners for this group."
msgstr ""
 
msgid "Register and see your runners for this project."
msgstr ""
 
msgid "Register with two-factor app"
msgstr ""
msgid "Registry"
msgstr ""
 
Loading
Loading
@@ -8957,6 +9017,9 @@ msgstr ""
msgid "Sherlock Transactions"
msgstr ""
 
msgid "Should you ever lose your phone or access to your one time password secret, each of these recovery codes can be used one time each to regain access to your account. Please save them in a safe place, or you %{b_start}will%{b_end} lose access to your account."
msgstr ""
msgid "Show all activity"
msgstr ""
 
Loading
Loading
@@ -10302,6 +10365,9 @@ msgstr ""
msgid "Thursday"
msgstr ""
 
msgid "Time based: Yes"
msgstr ""
msgid "Time before an issue gets scheduled"
msgstr ""
 
Loading
Loading
@@ -10504,6 +10570,9 @@ msgstr ""
msgid "To add an SSH key you need to %{generate_link_start}generate one%{link_end} or use an %{existing_link_start}existing key%{link_end}."
msgstr ""
 
msgid "To add the entry manually, provide the following details to the application on your phone."
msgstr ""
msgid "To define internal users, first enable new users set to external"
msgstr ""
 
Loading
Loading
@@ -10717,6 +10786,15 @@ msgstr ""
msgid "Twitter"
msgstr ""
 
msgid "Two-Factor Authentication"
msgstr ""
msgid "Two-factor Authentication"
msgstr ""
msgid "Two-factor Authentication Recovery codes"
msgstr ""
msgid "Two-factor Authentication has been disabled for this user"
msgstr ""
 
Loading
Loading
@@ -10726,6 +10804,9 @@ msgstr ""
msgid "Type"
msgstr ""
 
msgid "U2F Devices (%{length})"
msgstr ""
msgid "U2F only works with HTTPS-enabled websites. Contact your administrator for more details."
msgstr ""
 
Loading
Loading
@@ -10906,6 +10987,12 @@ msgstr ""
msgid "Use <code>%{native_redirect_uri}</code> for local tests"
msgstr ""
 
msgid "Use a hardware device to add the second factor of authentication."
msgstr ""
msgid "Use an one time password authenticator on your mobile device or computer to enable two-factor authentication (2FA)."
msgstr ""
msgid "Use group milestones to manage issues from multiple projects in the same milestone."
msgstr ""
 
Loading
Loading
@@ -11466,6 +11553,9 @@ msgstr ""
msgid "You are going to transfer %{project_full_name} to another owner. Are you ABSOLUTELY sure?"
msgstr ""
 
msgid "You are not allowed to unlink your primary login account"
msgstr ""
msgid "You are now impersonating %{username}"
msgstr ""
 
Loading
Loading
@@ -11577,6 +11667,9 @@ msgstr ""
msgid "You do not have permission to leave this %{namespaceType}."
msgstr ""
 
msgid "You don't have any U2F devices registered yet."
msgstr ""
msgid "You don't have any active chat names."
msgstr ""
 
Loading
Loading
@@ -11706,6 +11799,9 @@ msgstr ""
msgid "You're receiving this email because of your account on %{host}. %{manage_notifications_link} &middot; %{help_link}"
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 ""
msgid "YouTube"
msgstr ""
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment