From 0c1f028b430af72eca82674fa4b46e1105847fcc Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sun, 13 Feb 2022 18:54:26 +0100 Subject: [PATCH] Add translations for TOTP setup security view --- app/views/settings/security/_totp_setup.haml | 31 ++++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/app/views/settings/security/_totp_setup.haml b/app/views/settings/security/_totp_setup.haml index a32d0661..5b64f010 100644 --- a/app/views/settings/security/_totp_setup.haml +++ b/app/views/settings/security/_totp_setup.haml @@ -5,38 +5,37 @@ .totp-setup__qr = qr_svg %p.totp-setup__text - If you cannot scan the QR code, use the following key instead: - %code= current_user.otp_secret_key.scan(/.{4}/).flatten.join(' ') + = t(".setup_key") + %code= current_user.otp_secret_key.scan(/.{4}/).flatten.join(" ") .totp-setup__content.col = bootstrap_form_for(current_user, url: { action: :update_2fa, method: :post }) do |f| - %p - If you do not have an authenticator app already installed on your device, we suggest one of the following: + %p= t(".app.none") %ul.list-unstyled.pl-3 %li %i.fa.fa-android - Aegis Authenticator for Android + = t(".app.aegis") %ul.list-inline %li.list-inline-item - %a{ href: 'https://play.google.com/store/apps/details?id=com.beemdevelopment.aegis' } Google Play + %a{ href: "https://play.google.com/store/apps/details?id=com.beemdevelopment.aegis" }= t(".source.google_play") %li.list-inline-item - %a{ href: 'https://f-droid.org/app/com.beemdevelopment.aegis' } F-Droid + %a{ href: "https://f-droid.org/app/com.beemdevelopment.aegis" }= t(".source.fdroid") %li.list-inline-item - %a{ href: 'https://github.com/beemdevelopment/Aegis' } Source Code + %a{ href: "https://github.com/beemdevelopment/Aegis" }= t(".source.code") %li %i.fa.fa-apple - Strongbox Authenticator for iOS + = t(".app.strongbox") %ul.list-inline %li.list-inline-item - %a{ href: 'https://apps.apple.com/gb/app/strongbox-authenticator/id1023839880' } App Store + %a{ href: "https://apps.apple.com/gb/app/strongbox-authenticator/id1023839880" }= t(".source.app_store") %li %i.fa.fa-apple %i.fa.fa-android - Microsoft Authenticator + = t(".app.microsoft") %ul.list-inline %li.list-inline-item - %a{ href: 'https://apps.apple.com/gb/app/microsoft-authenticator/id983156458' } App Store + %a{ href: "https://apps.apple.com/gb/app/microsoft-authenticator/id983156458" }= t(".source.app_store") %li.list-inline-item - %a{ href: 'https://play.google.com/store/apps/details?id=com.azure.authenticator' } Google Play - %p Once you have downloaded an authenticator app, add your Retrospring account by scanning the QR code displayed on the left. - = f.text_field :otp_validation, class: 'totp-setup__code-field', label: 'Enter the code displayed in the app here:', autofocus: true - = f.submit t('views.actions.save'), class: 'btn btn-primary' + %a{ href: "https://play.google.com/store/apps/details?id=com.azure.authenticator" }= t(".source.google_play") + %p= t(".setup_qr", app_name: APP_CONFIG['site_name']) + = f.text_field :otp_validation, class: "totp-setup__code-field", label: t(".otp_validation"), autofocus: true + = f.primary