From f87b51fda899a07c064c27de74bd56b974b5e3a5 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Sun, 16 Apr 2017 13:37:01 -0400 Subject: [PATCH] I18n health warnings (#1949) * Rename admin.domain_block to admin.domain_blocks in prep for i18n improvement * Use implicit controller/action path for i18n in admin/domain_blocks * Add DomainBlock#accounts has_many * Avoid i18n health warning for `en` locale by using symbol scope with :count * Remove unused i18n key: plaintext_secret_html * Remove unused i18n key two_factor_auth.warning * Remove final will_paginate i18n keys * Remove unused key two_factor_auth.recovery_codes * Remove unused key: admin.reports.comment.none * Remove unused reports. i18n namespace (moved to admin.reports) * Ignore keys from locales which override activemodel and activerecord errors * Revert "Remove unused key: admin.reports.comment.none" This reverts commit 350ef2685fadc069e619bb6d1066190de195d942. * Update i18n key reference to match moved location * Add missing `en` keys to i18n * Tell i18n-tasks to ignore missing attributes that dont need overwriting * Add i18n-tasks unused to travis --- .travis.yml | 1 + .../admin/domain_blocks_controller.rb | 4 ++-- app/mailers/notification_mailer.rb | 7 +++++- app/models/domain_block.rb | 3 +++ app/views/admin/domain_blocks/index.html.haml | 14 +++++------ app/views/admin/domain_blocks/new.html.haml | 14 +++++------ app/views/admin/domain_blocks/show.html.haml | 12 +++++++--- app/views/admin/reports/show.html.haml | 2 +- config/i18n-tasks.yml | 16 ++++++++++++- config/locales/bg.yml | 2 -- config/locales/en.yml | 24 +++---------------- config/locales/eo.yml | 2 -- config/locales/es.yml | 2 -- config/locales/fi.yml | 2 -- config/locales/fr.yml | 22 +---------------- config/locales/hr.yml | 2 -- config/locales/it.yml | 1 - config/locales/ja.yml | 22 +---------------- config/locales/nl.yml | 2 -- config/locales/no.yml | 2 -- config/locales/pl.yml | 4 ---- config/locales/pt.yml | 2 +- config/locales/ru.yml | 2 -- config/locales/zh-CN.yml | 2 -- config/locales/zh-HK.yml | 23 +----------------- config/locales/zh-TW.yml | 23 +----------------- config/navigation.rb | 2 +- 27 files changed, 60 insertions(+), 154 deletions(-) diff --git a/.travis.yml b/.travis.yml index a91d70cf5..564155c66 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,3 +38,4 @@ before_script: script: - bundle exec rspec - npm test + - i18n-tasks unused diff --git a/app/controllers/admin/domain_blocks_controller.rb b/app/controllers/admin/domain_blocks_controller.rb index 5d146d946..1932dc6a8 100644 --- a/app/controllers/admin/domain_blocks_controller.rb +++ b/app/controllers/admin/domain_blocks_controller.rb @@ -15,7 +15,7 @@ module Admin if @domain_block.save DomainBlockWorker.perform_async(@domain_block.id) - redirect_to admin_domain_blocks_path, notice: I18n.t('admin.domain_block.created_msg') + redirect_to admin_domain_blocks_path, notice: I18n.t('admin.domain_blocks.created_msg') else render action: :new end @@ -28,7 +28,7 @@ module Admin def destroy @domain_block = DomainBlock.find(params[:id]) UnblockDomainService.new.call(@domain_block, resource_params[:retroactive]) - redirect_to admin_domain_blocks_path, notice: I18n.t('admin.domain_block.destroyed_msg') + redirect_to admin_domain_blocks_path, notice: I18n.t('admin.domain_blocks.destroyed_msg') end private diff --git a/app/mailers/notification_mailer.rb b/app/mailers/notification_mailer.rb index bf4c16e43..a163edd3c 100644 --- a/app/mailers/notification_mailer.rb +++ b/app/mailers/notification_mailer.rb @@ -59,7 +59,12 @@ class NotificationMailer < ApplicationMailer return if @notifications.empty? I18n.with_locale(@me.user.locale || I18n.default_locale) do - mail to: @me.user.email, subject: I18n.t('notification_mailer.digest.subject', count: @notifications.size) + mail to: @me.user.email, + subject: I18n.t( + :subject, + scope: [:notification_mailer, :digest], + count: @notifications.size + ) end end end diff --git a/app/models/domain_block.rb b/app/models/domain_block.rb index 89c81f766..baf5c3973 100644 --- a/app/models/domain_block.rb +++ b/app/models/domain_block.rb @@ -7,6 +7,9 @@ class DomainBlock < ApplicationRecord validates :domain, presence: true, uniqueness: true + has_many :accounts, foreign_key: :domain, primary_key: :domain + delegate :count, to: :accounts, prefix: true + def self.blocked?(domain) where(domain: domain, severity: :suspend).exists? end diff --git a/app/views/admin/domain_blocks/index.html.haml b/app/views/admin/domain_blocks/index.html.haml index da9a07bbc..bdef4294e 100644 --- a/app/views/admin/domain_blocks/index.html.haml +++ b/app/views/admin/domain_blocks/index.html.haml @@ -1,24 +1,24 @@ - content_for :page_title do - = t('admin.domain_block.title') + = t('admin.domain_blocks.title') %table.table %thead %tr - %th= t('admin.domain_block.domain') - %th= t('admin.domain_block.severity') - %th= t('admin.domain_block.reject_media') + %th= t('admin.domain_blocks.domain') + %th= t('admin.domain_blocks.severity') + %th= t('admin.domain_blocks.reject_media') %th %tbody - @blocks.each do |block| %tr %td %samp= block.domain - %td= t("admin.domain_block.severities.#{block.severity}") + %td= t("admin.domain_blocks.severities.#{block.severity}") %td - if block.reject_media? || block.suspend? %i.fa.fa-check %td - = table_link_to 'undo', t('admin.domain_block.undo'), admin_domain_block_path(block) + = table_link_to 'undo', t('admin.domain_blocks.undo'), admin_domain_block_path(block) = paginate @blocks -= link_to t('admin.domain_block.add_new'), new_admin_domain_block_path, class: 'button' += link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path, class: 'button' diff --git a/app/views/admin/domain_blocks/new.html.haml b/app/views/admin/domain_blocks/new.html.haml index 603faeb55..38fa90169 100644 --- a/app/views/admin/domain_blocks/new.html.haml +++ b/app/views/admin/domain_blocks/new.html.haml @@ -1,17 +1,17 @@ - content_for :page_title do - = t('admin.domain_block.new.title') + = t('.title') = simple_form_for @domain_block, url: admin_domain_blocks_path do |f| = render 'shared/error_messages', object: @domain_block - %p.hint= t('admin.domain_block.new.hint') + %p.hint= t('.hint') - = f.input :domain, placeholder: t('admin.domain_block.domain') - = f.input :severity, collection: DomainBlock.severities.keys, wrapper: :with_label, include_blank: false, label_method: lambda { |type| I18n.t("admin.domain_block.new.severity.#{type}") } + = f.input :domain, placeholder: t('admin.domain_blocks.domain') + = f.input :severity, collection: DomainBlock.severities.keys, wrapper: :with_label, include_blank: false, label_method: lambda { |type| t(".severity.#{type}") } - %p.hint= t('admin.domain_block.new.severity.desc_html') + %p.hint= t('.severity.desc_html') - = f.input :reject_media, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_block.reject_media'), hint: I18n.t('admin.domain_block.reject_media_hint') + = f.input :reject_media, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_media'), hint: I18n.t('admin.domain_blocks.reject_media_hint') .actions - = f.button :button, t('admin.domain_block.new.create'), type: :submit + = f.button :button, t('.create'), type: :submit diff --git a/app/views/admin/domain_blocks/show.html.haml b/app/views/admin/domain_blocks/show.html.haml index bf9011c52..70dfef9b2 100644 --- a/app/views/admin/domain_blocks/show.html.haml +++ b/app/views/admin/domain_blocks/show.html.haml @@ -1,9 +1,15 @@ - content_for :page_title do - = t('admin.domain_block.show.title', domain: @domain_block.domain) + = t('admin.domain_blocks.show.title', domain: @domain_block.domain) = simple_form_for @domain_block, url: admin_domain_block_path(@domain_block), method: :delete do |f| - = f.input :retroactive, as: :boolean, wrapper: :with_label, label: I18n.t("admin.domain_block.show.retroactive.#{@domain_block.severity}"), hint: I18n.t('admin.domain_block.show.affected_accounts', count: Account.where(domain: @domain_block.domain).count) + = f.input :retroactive, + as: :boolean, + wrapper: :with_label, + label: t(".retroactive.#{@domain_block.severity}"), + hint: t(:affected_accounts, + scope: [:admin, :domain_blocks, :show], + count: @domain_block.accounts_count) .actions - = f.button :button, t('admin.domain_block.show.undo'), type: :submit + = f.button :button, t('.undo'), type: :submit diff --git a/app/views/admin/reports/show.html.haml b/app/views/admin/reports/show.html.haml index 5391d99a8..aa144170d 100644 --- a/app/views/admin/reports/show.html.haml +++ b/app/views/admin/reports/show.html.haml @@ -12,7 +12,7 @@ %p %strong= t('admin.reports.comment.label') \: - = @report.comment.presence || t('reports.comment.none') + = @report.comment.presence || t('admin.reports.comment.none') - unless @report.statuses.empty? %hr/ diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml index 7ae143f93..853d148b2 100644 --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@ -31,8 +31,22 @@ search: - app/assets/fonts - app/assets/videos -ignore_unused: +ignore_missing: + - 'activemodel.errors.*' - 'activerecord.attributes.*' + - 'activerecord.errors.*' + - '{devise,pagination,doorkeeper}.*' + - '{datetime,time}.*' + - 'simple_form.{yes,no}' + - 'simple_form.{placeholders,hints,labels}.*' + - 'simple_form.{error_notification,required}.:' + - 'errors.messages.*' + - 'activerecord.errors.models.doorkeeper/*' + +ignore_unused: + - 'activemodel.errors.*' + - 'activerecord.attributes.*' + - 'activerecord.errors.*' - '{devise,pagination,doorkeeper}.*' - '{datetime,time}.*' - 'simple_form.{yes,no}' diff --git a/config/locales/bg.yml b/config/locales/bg.yml index e0e60adf7..f751c81a5 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -160,8 +160,6 @@ bg: disable: Деактивирай enable: Активирай instructions_html: "Сканирай този QR код с Google Authenticator или подобно приложение от своя телефон. Oтсега нататък, това приложение ще генерира код, който ще трябва да въвеждаш при всяко влизане." - plaintext_secret_html: 'Тайна в обикновен текст: %{secret}' - warning: Ако не можеш да настроиш приложението за удостверяване сега, избери "Деактивирай". В противен случай, няма да можеш да влезеш в акаунта си. users: invalid_email: E-mail адресът е невалиден invalid_otp_token: Невалиден код diff --git a/config/locales/en.yml b/config/locales/en.yml index 325df5045..039dabf87 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -71,6 +71,7 @@ en: profile_url: Profile URL public: Public push_subscription_expires: PuSH subscription expires + reset_password: Reset password salmon_url: Salmon URL silence: Silence statuses: Statuses @@ -79,7 +80,7 @@ en: undo_suspension: Undo suspension username: Username web: Web - domain_block: + domain_blocks: add_new: Add new created_msg: Domain block is now being processed destroyed_msg: Domain block has been undone @@ -106,6 +107,7 @@ en: silence: Unsilence all existing accounts from this domain suspend: Unsuspend all existing accounts from this domain title: Undo domain block for %{domain} + undo: Undo title: Domain Blocks undo: Undo pubsubhubbub: @@ -258,24 +260,6 @@ en: missing_resource: Could not find the required redirect URL for your account proceed: Proceed to follow prompt: 'You are going to follow:' - reports: - comment: - label: Comment - none: None - delete: Delete - id: ID - mark_as_resolved: Mark as resolved - report: 'Report #%{id}' - reported_account: Reported account - reported_by: Reported by - reports: Reports - resolved: Resolved - silence_account: Silence account - status: Status - suspend_account: Suspend account - target: Target - unresolved: Unresolved - view: View settings: authorized_apps: Authorized apps back: Back to Mastodon @@ -310,11 +294,9 @@ en: instructions_html: "Scan this QR code into Google Authenticator or a similiar TOTP app on your phone. From now on, that app will generate tokens that you will have to enter when logging in." lost_recovery_codes: Recovery codes allow you to regain access to your account if you lose your phone. If you've lost your recovery codes, you can regenerate them here. Your old recovery codes will be invalidated. manual_instructions: 'If you can''t scan the QR code and need to enter it manually, here is the plain-text secret:' - recovery_codes: Recovery Codes recovery_codes_regenerated: Recovery codes successfully regenerated recovery_instructions: If you ever lose access to your phone, you can use one of the recovery codes below to regain access to your account. Keep the recovery codes safe, for example by printing them and storing them with other important documents. setup: Set up - warning: If you cannot configure an authenticator app right now, you should click "disable" or you won't be able to login. wrong_code: The entered code was invalid! Are server time and device time correct? users: invalid_email: The e-mail address is invalid diff --git a/config/locales/eo.yml b/config/locales/eo.yml index bfcb13fc2..692fcc43a 100644 --- a/config/locales/eo.yml +++ b/config/locales/eo.yml @@ -155,8 +155,6 @@ eo: disable: Malebligi enable: Ebligi instructions_html: "Skanu tiun QR-kodon per Google Authenticator aŭ per simila aplikaĵo de via poŝtelefono. De tiam, la aplikaĵo kreos nombrojn, kiujn vi devos entajpi." - plaintext_secret_html: 'Rekte legebla sekreta kodo: %{secret}' - warning: Se vi ne povas agordi aŭtentigan aplikaĵon nun, elektu "malebligi" aŭ vi ne plu povos ensaluti. users: invalid_email: La retpoŝt-adreso ne estas valida invalid_otp_token: La dufaktora aŭtentigila kodo ne estas valida diff --git a/config/locales/es.yml b/config/locales/es.yml index a29fe17fd..e99c592ff 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -160,8 +160,6 @@ es: disable: Deshabilitar enable: Habilitar instructions_html: "Escanea este código QR desde Google Authenticator o una aplicación similar en su teléfono. Desde ahora, esta aplicación va a generar tokens que tienes que ingresar cuando quieras iniciar sesión." - plaintext_secret_html: 'Código en texto plano: %{secret}' - warning: Sí no puedes configurar una aplicación de autenticación ahora, deberás deshabilitar la autenticación de dos factores o no podrás iniciar sesión. users: invalid_email: La dirección de correo es incorrecta invalid_otp_token: Código de dos factores incorrecto diff --git a/config/locales/fi.yml b/config/locales/fi.yml index db8194ff2..3d5e240af 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -155,8 +155,6 @@ fi: disable: Poista käytöstä enable: Ota käyttöön instructions_html: "Skannaa tämä QR-koodi Google Authenticator- tai vastaavaan sovellukseen puhelimellasi. Tästä hetkestä lähtien ohjelma luo koodin, mikä sinun tarvitsee syöttää sisäänkirjautuessa." - plaintext_secret_html: 'Plain-text secret: %{secret}' - warning: Jos et juuri nyt voi konfiguroida authenticator-applikaatiota juuri nyt, sinun pitäisi klikata "Poista käytöstä" tai et voi kirjautua sisään. users: invalid_email: Virheellinen sähköposti invalid_otp_token: Virheellinen kaksivaihetunnistuskoodi diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 754eabb95..ec38b411a 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -79,7 +79,7 @@ fr: undo_suspension: Annuler la suspension username: Nom d'utilisateur web: Web - domain_block: + domain_blocks: add_new: Ajouter domain: Domaine new: @@ -241,24 +241,6 @@ fr: missing_resource: L'URL de redirection n'a pas pu être trouvée proceed: Continuez pour suivre prompt: 'Vous allez suivre :' - reports: - comment: - label: Commentaire - none: Aucun - delete: Supprimer - id: ID - mark_as_resolved: Marqué comme résolu - report: 'Signalement #%{id}' - reported_account: Compte signalé - reported_by: Signalé par - reports: Signalements - resolved: Résolus - silence_account: Rendre le compte muet - status: Statut - suspend_account: Suspendre le compte - target: Cible - unresolved: Non résolus - view: Voir settings: authorized_apps: Applications autorisées back: Retour vers Mastodon @@ -288,8 +270,6 @@ fr: disable: Désactiver enable: Activer instructions_html: "Scannez ce QR code grâce à Google Authenticator, Authy ou une application similaire sur votre téléphone. Désormais, cette application générera des jetons que vous devrez saisir à chaque connexion." - plaintext_secret_html: 'Code secret en clair : %{secret}' - warning: Si vous ne pouvez pas configurer une application d'authentification maintenant, vous devriez cliquer sur "Désactiver" pour ne pas bloquer l'accès à votre compte. users: invalid_email: L'adresse courriel est invalide invalid_otp_token: Le code d'authentification à deux facteurs est invalide diff --git a/config/locales/hr.yml b/config/locales/hr.yml index f6e6ed446..fed8ea9e7 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -156,8 +156,6 @@ hr: disable: Onemogući enable: Omogući instructions_html: "Skeniraj ovaj QR kod into Google Authenticator or a similiar app on your phone. Od sada, ta aplikacija će generirati tokene koje ćeš unijeti pri prijavljivanju." - plaintext_secret_html: 'Plain-text secret: %{secret}' - warning: Ako trenuno ne možeš konfigurirati authenticator app, trebaš kliknuti "onemogući" ili se nećeš moći prijaviti. users: invalid_email: E-mail adresa nije valjana invalid_otp_token: Nevaljani dvo-faktorski kod diff --git a/config/locales/it.yml b/config/locales/it.yml index 453de87a5..0ace8a76a 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -165,7 +165,6 @@ it: instructions_html: "Scannerizza questo QR code con Google Authenticator o un'app TOTP simile sul tuo telefono. Da ora in poi, quell'applicazione genererà codici da inserire necessariamente per eseguire l'accesso." manual_instructions: 'Se non puoi scannerizzare il QR code e hai bisogno di inserirlo manualmente, questo è il codice segreto in chiaro:' setup: Configura - warning: Se non puoi convalidare immediatamente la tua app di autenticazione, dovresti selezionare "disabilita" o non sarai più in grado di eseguire l'accesso. wrong_code: Il codice inserito non è corretto! Assicurati che l'orario del server e l'orario del telefono siano corretti. users: invalid_email: L'indirizzo e-mail inserito non è valido diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 5483e63b5..c9885b5f6 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -80,7 +80,7 @@ ja: undo_suspension: 停止から戻す username: ユーザー名 web: Web - domain_block: + domain_blocks: add_new: 新規追加 created_msg: ドメインブロック処理を完了しました destroyed_msg: ドメインブロックを外しました @@ -258,24 +258,6 @@ ja: missing_resource: リダイレクト先が見つかりませんでした proceed: フォローする prompt: 'フォローしようとしています:' - reports: - comment: - label: コメント - none: なし - delete: 削除 - id: ID - mark_as_resolved: 解決する - report: '通報 #%{id}' - reported_account: 通報されているユーザー - reported_by: 通報者 - reports: 通報 - resolved: 解決済み - silence_account: ユーザーをサイレンスする - status: 現状 - suspend_account: ユーザーを停止する - target: 通報されているユーザー - unresolved: 未決 - view: 見る settings: authorized_apps: 認証済みアプリ back: 戻る @@ -310,11 +292,9 @@ ja: instructions_html: "Google Authenticatorか、もしくはほかのTOTPアプリでこのQRコードをスキャンしてください。これ以降、ログインするときはそのアプリで生成されるコードが必要になります。" lost_recovery_codes: リカバリコードを使用すると携帯電話を紛失した場合でもアカウントにアクセスできるようになります。 リカバリーコードを紛失した場合もここで再生成することができますが、古いリカバリコードは無効になります。 manual_instructions: 'QRコードがスキャンできず、手動での登録を希望の場合はこのシークレットコードを利用してください。:' - recovery_codes: リカバリーコード recovery_codes_regenerated: リカバリーコードが再生成されました。 recovery_instructions: 携帯電話を紛失した場合、以下の内どれかのリカバリコードを使用してアカウントへアクセスすることができます。 リカバリコードは印刷して安全に保管してください。 setup: 初期設定 - warning: 現在認証アプリを設定できない場合、無効に設定して、有効にしないでください。 wrong_code: コードが間違っています。サーバー上の時間とデバイス上の時間が一致していることを確認してください。 users: invalid_email: メールアドレスが無効です diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 0af0a99e4..577b32454 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -156,8 +156,6 @@ nl: disable: Uitschakelen enable: Inschakelen instructions_html: "Scan deze QR-code in Google Authenticator of een soortgelijke app op je mobiele telefoon. Van nu af aan creëert deze app tokens die je bij aanmelden moet invoeren." - plaintext_secret_html: 'Gewone-tekst geheim: %{secret}' - warning: Als je nu geen authenticator-app kunt installeren, moet je "Uitschakelen" kiezen of je kunt niet meer aanmelden. users: invalid_email: Het e-mailadres is ongeldig invalid_otp_token: Ongeldige twee-factorcode diff --git a/config/locales/no.yml b/config/locales/no.yml index d382db926..41a55c6e6 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -155,8 +155,6 @@ disable: Skru av enable: Skru på instructions_html: "Scan denne QR-koden i Google Authenticator eller en lignende app på telefonen din. Fra nå av vil denne applikasjonen generere koder for deg som skal brukes under innlogging" - plaintext_secret_html: 'Plain-text secret: %{secret}' - warning: Hvis du ikke kan konfigurere en autentiseringsapp nå bør du trykke "Skru av"; ellers vil du ikke kunne logge inn. users: invalid_email: E-postaddressen er ugyldig invalid_otp_token: Ugyldig tofaktorkode diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 3c4c98bc8..f213f3249 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -155,10 +155,6 @@ pl: disable: Wyłącz enable: Włącz instructions_html: "Zeskanuj ten kod QR na swoim urządzeniu za pomocą Google Authenticator, FreeOTP lub podobnej aplikacji. Od teraz będzie ona generowała kody wymagane przy logowaniu." - plaintext_secret_html: 'Sekret: %{secret}' - warning: Jeśli nie jesteś w stanie skonfigurować aplikacji uwierzytelniania dwustopniowego w tej chwili, wyłącz uwierzytelnianie dwustopniowe. W przeciwnym wypadku nie będziesz się w stanie zalogować! users: invalid_email: Adres e-mail jest niepoprawny invalid_otp_token: Kod uwierzytelniający jest niepoprawny - will_paginate: - page_gap: "…" diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 5e86f8b66..5ca18f929 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -77,7 +77,7 @@ pt: undo_suspension: Desfazer supensão username: Usuário web: Web - domain_block: + domain_blocks: add_new: Adicionar nova created_msg: Bloqueio do domínio está sendo processado destroyed_msg: Bloqueio de domínio está sendo desfeito diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 4c8cb6a4c..8e6a813bb 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -158,9 +158,7 @@ ru: enable: Включить instructions_html: "Отсканируйте этот QR-код с помощью Google Authenticator или другого подобного приложения на Вашем телефоне. С этого момента приложение будет генерировать токены, которые будет необходимо ввести для входа." manual_instructions: 'Если Вы не можете отсканировать QR-код и хотите ввести его вручную, секрет представлен здесь открытым текстом:' - plaintext_secret_html: 'Секрет открытым текстом: %{secret}' setup: Настроить - warning: Если сейчас у Вас не получается настроить аутентификатор, нажмите "отключить", иначе Вы не сможете войти! users: invalid_email: Введенный e-mail неверен invalid_otp_token: Введен неверный код diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index 48028d00c..667cfe943 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -145,8 +145,6 @@ zh-CN: disable: 禁用 enable: 启用 instructions_html: "使用 Google Authenticator 或类似 APP 扫描二维码。现在起,APP 将会生成登陆时必须的两步验证码。" - plaintext_secret_html: 密钥: %{secret} - warning: 如果你现在没有 Google Authenticator 或类似授权 APP,你应该先「禁用」本功能,否则你将不能正常登陆。 users: invalid_email: 无效的邮箱 invalid_otp_token: 无效的两步验证码 diff --git a/config/locales/zh-HK.yml b/config/locales/zh-HK.yml index 595e8ffc1..6fe02376b 100644 --- a/config/locales/zh-HK.yml +++ b/config/locales/zh-HK.yml @@ -79,7 +79,7 @@ zh-HK: undo_suspension: 解除停權 username: 用戶名稱 web: 用戶頁面 - domain_block: + domain_blocks: add_new: 新增 domain: 域名阻隔 new: @@ -246,24 +246,6 @@ zh-HK: missing_resource: 無法找到你用戶的轉接網址 proceed: 下一步 prompt: 你希望關注︰ - reports: - comment: - label: 詳細解釋 - none: 沒有 - delete: 刪除 - id: ID - mark_as_resolved: 標示為「已處理」 - report: '舉報 #%{id}' - reported_account: 舉報 account - reported_by: 舉報者 - reports: 舉報 - resolved: 已處埋 - silence_account: 將用戶靜音 - status: 狀態 - suspend_account: 將用戶停權 - target: 對像 - unresolved: 未處埋 - view: 檢視 settings: authorized_apps: 授權應用程式 back: 回到 Mastodon @@ -297,10 +279,7 @@ zh-HK: instructions_html: "請用你手機的認證器應用程式(如 Google Authenticator、Authy),掃描這裏的QR 圖形碼。在雙重認證啟用後,你登入時將須要使用此應用程式產生的認證碼。" manual_instructions: 如果你無法掃描 QR 圖形碼,請手動輸入這個文字密碼︰ setup: 設定 - warning: 如果你現在無法正確設定你的應用程式,請即「停用」雙重認證,否則日後可能無法登入本站。 wrong_code: 你輸入的認證碼並不正確!可能伺服器時間和你手機不一致,請檢查你手機的時鐘,或與本站管理員聯絡。 users: invalid_email: 電郵地址格式不正確 invalid_otp_token: 雙重認證確認碼不正確 - will_paginate: - page_gap: "…" diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index ba5e8d6f5..c29f2e231 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -79,7 +79,7 @@ zh-TW: undo_suspension: 取消停權 username: 使用者名稱 web: Web - domain_block: + domain_blocks: add_new: 新增 domain: 網域 new: @@ -240,24 +240,6 @@ zh-TW: missing_resource: 無法找到資源 proceed: 下一步 prompt: '您希望關注︰' - reports: - comment: - label: 留言 - none: 無 - delete: 刪除 - id: ID - mark_as_resolved: 標記為已解決 - report: '檢舉 #%{id}' - reported_account: 被檢舉帳號 - reported_by: 檢舉人 - reports: 檢舉 - resolved: 已解決 - silence_account: 靜音帳號 - status: 狀態 - suspend_account: 停權帳號 - target: 目標 - unresolved: 未解決 - view: 檢視 settings: authorized_apps: 已授權應用程式 back: 回到 Mastodon @@ -291,10 +273,7 @@ zh-TW: instructions_html: 請用您手機的認證器應用程式(如 Google Authenticator、Authy),掃描這裡的 QR 圖形碼。在雙因子認證啟用後,您登入時將須要使用此應用程式產生的認證碼。 manual_instructions: 如果您無法掃描 QR 圖形碼,請手動輸入︰ setup: 設定 - warning: 如果您現在無法正確設定您的應用程式,請立刻「停用」雙因子認證,否則日後可能無法登入本站。 wrong_code: 您輸入的認證碼並不正確!可能伺服器時間和您手機不一致,請檢查您手機的時間,或與本站管理員聯絡。 users: invalid_email: 信箱地址格式不正確 invalid_otp_token: 雙因子認證碼不正確 - will_paginate: - page_gap: "…" diff --git a/config/navigation.rb b/config/navigation.rb index 3d5ba1741..6e2bcd001 100644 --- a/config/navigation.rb +++ b/config/navigation.rb @@ -18,7 +18,7 @@ SimpleNavigation::Configuration.run do |navigation| admin.item :reports, safe_join([fa_icon('flag fw'), t('admin.reports.title')]), admin_reports_url, highlights_on: %r{/admin/reports} admin.item :accounts, safe_join([fa_icon('users fw'), t('admin.accounts.title')]), admin_accounts_url, highlights_on: %r{/admin/accounts} admin.item :pubsubhubbubs, safe_join([fa_icon('paper-plane-o fw'), t('admin.pubsubhubbub.title')]), admin_pubsubhubbub_index_url - admin.item :domain_blocks, safe_join([fa_icon('lock fw'), t('admin.domain_block.title')]), admin_domain_blocks_url, highlights_on: %r{/admin/domain_blocks} + admin.item :domain_blocks, safe_join([fa_icon('lock fw'), t('admin.domain_blocks.title')]), admin_domain_blocks_url, highlights_on: %r{/admin/domain_blocks} admin.item :sidekiq, safe_join([fa_icon('diamond fw'), 'Sidekiq']), sidekiq_url admin.item :pghero, safe_join([fa_icon('database fw'), 'PgHero']), pghero_url admin.item :settings, safe_join([fa_icon('cogs fw'), t('admin.settings.title')]), admin_settings_url