mirror of https://github.com/tootsuite/mastodon
Make Reporting admin section translatable (#1549)
* Make Reporting admin section translatable And translate it into english and french Signed-off-by: Thomas Citharel <tcit@tcit.fr> * Make subject of emails translatable and improve french translation Signed-off-by: Thomas Citharel <tcit@tcit.fr> * Make error pages translatable and translate them in english and french Signed-off-by: Thomas Citharel <tcit@tcit.fr> * Translate site setting section * Insert instance in registration emails and improve them a bit Signed-off-by: Thomas Citharel <tcit@tcit.fr>pull/1612/head
parent
1f5ff46fd9
commit
d90d23699c
|
@ -7,9 +7,10 @@ class UserMailer < Devise::Mailer
|
|||
def confirmation_instructions(user, token, _opts = {})
|
||||
@resource = user
|
||||
@token = token
|
||||
@instance = Rails.configuration.x.local_domain
|
||||
|
||||
I18n.with_locale(@resource.locale || I18n.default_locale) do
|
||||
mail to: @resource.unconfirmed_email.blank? ? @resource.email : @resource.unconfirmed_email
|
||||
mail to: @resource.unconfirmed_email.blank? ? @resource.email : @resource.unconfirmed_email, subject: I18n.t('devise.mailer.confirmation_instructions.subject', instance: @instance)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -18,7 +19,7 @@ class UserMailer < Devise::Mailer
|
|||
@token = token
|
||||
|
||||
I18n.with_locale(@resource.locale || I18n.default_locale) do
|
||||
mail to: @resource.email
|
||||
mail to: @resource.email, subject: I18n.t('devise.mailer.reset_password_instructions.subject')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -26,7 +27,7 @@ class UserMailer < Devise::Mailer
|
|||
@resource = user
|
||||
|
||||
I18n.with_locale(@resource.locale || I18n.default_locale) do
|
||||
mail to: @resource.email
|
||||
mail to: @resource.email, subject: I18n.t('devise.mailer.password_change.subject')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
- content_for :page_title do
|
||||
Reports
|
||||
= t('reports.reports')
|
||||
|
||||
.filters
|
||||
.filter-subset
|
||||
%strong Status
|
||||
%strong= t('reports.status')
|
||||
%ul
|
||||
%li= filter_link_to 'Unresolved', action_taken: nil
|
||||
%li= filter_link_to 'Resolved', action_taken: '1'
|
||||
%li= filter_link_to t('reports.unresolved'), action_taken: nil
|
||||
%li= filter_link_to t('reports.resolved'), action_taken: '1'
|
||||
|
||||
= form_tag do
|
||||
|
||||
|
@ -14,10 +14,10 @@
|
|||
%thead
|
||||
%tr
|
||||
%th
|
||||
%th ID
|
||||
%th Target
|
||||
%th Reported by
|
||||
%th Comment
|
||||
%th= t('reports.id')
|
||||
%th= t('reports.target')
|
||||
%th= t('reports.reported_by')
|
||||
%th= t('reports.comment.label')
|
||||
%th
|
||||
%tbody
|
||||
- @reports.each do |report|
|
||||
|
@ -27,6 +27,6 @@
|
|||
%td= link_to report.target_account.acct, admin_account_path(report.target_account.id)
|
||||
%td= link_to report.account.acct, admin_account_path(report.account.id)
|
||||
%td= truncate(report.comment, length: 30, separator: ' ')
|
||||
%td= table_link_to 'circle', 'View', admin_report_path(report)
|
||||
%td= table_link_to 'circle', t('reports.view'), admin_report_path(report)
|
||||
|
||||
= paginate @reports
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
- content_for :page_title do
|
||||
= "Report ##{@report.id}"
|
||||
= t('reports.report', id: @report.id)
|
||||
|
||||
.report-accounts
|
||||
.report-accounts__item
|
||||
%strong Reported account:
|
||||
%strong= t('reports.reported_account')
|
||||
= render partial: 'authorize_follow/card', locals: { account: @report.target_account }
|
||||
.report-accounts__item
|
||||
%strong Reported by:
|
||||
%strong= t('reports.reported_by')
|
||||
= render partial: 'authorize_follow/card', locals: { account: @report.account }
|
||||
|
||||
%p
|
||||
%strong Comment:
|
||||
%strong= t('reports.comment.label')
|
||||
\:
|
||||
- if @report.comment.blank?
|
||||
None
|
||||
= t('reports.comment.none')
|
||||
- else
|
||||
= @report.comment
|
||||
|
||||
|
@ -24,7 +25,7 @@
|
|||
.activity-stream.activity-stream-headless
|
||||
.entry= render partial: 'stream_entries/simple_status', locals: { status: status }
|
||||
.report-status__actions
|
||||
= link_to remove_admin_report_path(@report, status_id: status.id), method: :post, class: 'icon-button', style: 'font-size: 24px; width: 24px; height: 24px', title: 'Delete' do
|
||||
= link_to remove_admin_report_path(@report, status_id: status.id), method: :post, class: 'icon-button', style: 'font-size: 24px; width: 24px; height: 24px', title: t('reports.delete') do
|
||||
= fa_icon 'trash'
|
||||
|
||||
- if !@report.action_taken?
|
||||
|
@ -32,10 +33,10 @@
|
|||
|
||||
%div{ style: 'overflow: hidden' }
|
||||
%div{ style: 'float: right' }
|
||||
= link_to 'Silence account', silence_admin_report_path(@report), method: :post, class: 'button'
|
||||
= link_to 'Suspend account', suspend_admin_report_path(@report), method: :post, class: 'button'
|
||||
= link_to t('reports.silence_account'), silence_admin_report_path(@report), method: :post, class: 'button'
|
||||
= link_to t('reports.suspend_account'), suspend_admin_report_path(@report), method: :post, class: 'button'
|
||||
%div{ style: 'float: left' }
|
||||
= link_to 'Mark as resolved', resolve_admin_report_path(@report), method: :post, class: 'button'
|
||||
= link_to t('reports.mark_as_resolved'), resolve_admin_report_path(@report), method: :post, class: 'button'
|
||||
- elsif !@report.action_taken_by_account.nil?
|
||||
%hr/
|
||||
|
||||
|
|
|
@ -1,52 +1,40 @@
|
|||
- content_for :page_title do
|
||||
Site Settings
|
||||
= t('admin.settings.title')
|
||||
|
||||
%table.table
|
||||
%colgroup
|
||||
%col{ width: '35%' }/
|
||||
%thead
|
||||
%tr
|
||||
%th Setting
|
||||
%th Click to edit
|
||||
%th= t('admin.settings.setting')
|
||||
%th= t('admin.settings.click_to_edit')
|
||||
%tbody
|
||||
%tr
|
||||
%td{ rowspan: 2 }
|
||||
%strong Contact information
|
||||
%td= best_in_place @settings['site_contact_username'], :value, url: admin_setting_path(@settings['site_contact_username']), place_holder: 'Enter a username'
|
||||
%strong= t('admin.settings.contact_information.label')
|
||||
%td= best_in_place @settings['site_contact_username'], :value, url: admin_setting_path(@settings['site_contact_username']), place_holder: t('admin.settings.contact_information.username')
|
||||
%tr
|
||||
%td= best_in_place @settings['site_contact_email'], :value, url: admin_setting_path(@settings['site_contact_email']), place_holder: 'Enter a public e-mail address'
|
||||
%td= best_in_place @settings['site_contact_email'], :value, url: admin_setting_path(@settings['site_contact_email']), place_holder: t('admin.settings.contact_information.email')
|
||||
%tr
|
||||
%td
|
||||
%strong Site title
|
||||
%strong= t('admin.settings.site_title')
|
||||
%td= best_in_place @settings['site_title'], :value, url: admin_setting_path(@settings['site_title'])
|
||||
%tr
|
||||
%td
|
||||
%strong Site description
|
||||
%br/
|
||||
Displayed as a paragraph on the frontpage and used as a meta tag.
|
||||
%br/
|
||||
You can use HTML tags, in particular
|
||||
%code= '<a>'
|
||||
and
|
||||
%code= '<em>'
|
||||
%strong= t('admin.settings.site_description.title')
|
||||
%p= t('admin.settings.site_description.desc_html')
|
||||
%td= best_in_place @settings['site_description'], :value, as: :textarea, url: admin_setting_path(@settings['site_description'])
|
||||
%tr
|
||||
%td
|
||||
%strong Extended site description
|
||||
%br/
|
||||
Displayed on extended information page
|
||||
%br/
|
||||
You can use HTML tags
|
||||
%strong= t('admin.settings.site_description_extended.title')
|
||||
%p= t('admin.settings.site_description_extended.desc_html')
|
||||
%td= best_in_place @settings['site_extended_description'], :value, as: :textarea, url: admin_setting_path(@settings['site_extended_description'])
|
||||
%tr
|
||||
%td
|
||||
%strong Open registration
|
||||
%td= best_in_place @settings['open_registrations'], :value, as: :checkbox, collection: { false: 'Disabled', true: 'Enabled'}, url: admin_setting_path(@settings['open_registrations'])
|
||||
%strong= t('admin.settings.registrations.open.title')
|
||||
%td= best_in_place @settings['open_registrations'], :value, as: :checkbox, collection: { false: t('admin.settings.registrations.open.disabled'), true: t('admin.settings.registrations.open.enabled')}, url: admin_setting_path(@settings['open_registrations'])
|
||||
%tr
|
||||
%td
|
||||
%strong Closed registration message
|
||||
%br/
|
||||
Displayed on frontpage when registrations are closed
|
||||
%br/
|
||||
You can use HTML tags
|
||||
%strong= t('admin.settings.registrations.closed_message.title')
|
||||
%p= t('admin.settings.registrations.closed_message.desc_html')
|
||||
%td= best_in_place @settings['closed_registrations_message'], :value, as: :textarea, url: admin_setting_path(@settings['closed_registrations_message'])
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- content_for :page_title do
|
||||
The page you were looking for doesn't exist
|
||||
= t('errors.404')
|
||||
|
||||
- content_for :content do
|
||||
The page you were looking for doesn't exist
|
||||
= t('errors.404')
|
|
@ -1,5 +1,5 @@
|
|||
- content_for :page_title do
|
||||
The page you were looking for doesn't exist anymore
|
||||
= t('errors.410')
|
||||
|
||||
- content_for :content do
|
||||
The page you were looking for doesn't exist anymore
|
||||
= t('errors.410')
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
- content_for :page_title do
|
||||
Security verification failed
|
||||
= t('errors.422.title')
|
||||
|
||||
- content_for :content do
|
||||
Security verification failed. Are you blocking cookies?
|
||||
= t('errors.422.content')
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
<p>Welcome <%= @resource.email %> !</p>
|
||||
|
||||
<p>You can confirm your Mastodon account email through the link below:</p>
|
||||
<p>You just created an account on <%= @instance %>.</p>
|
||||
|
||||
<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
|
||||
<p>To confirm your inscription, please click on the following link : <br>
|
||||
<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>
|
||||
|
||||
<p>Please also check out our <%= link_to 'terms and conditions', terms_url %>.</p>
|
||||
|
||||
<p>Sincerely,<p>
|
||||
|
||||
<p>The <%= @instance %> team</p>
|
|
@ -1,5 +1,12 @@
|
|||
Welcome <%= @resource.email %> !
|
||||
|
||||
You can confirm your Mastodon account email through the link below:
|
||||
You just created an account on <%= @instance %>.
|
||||
|
||||
To confirm your inscription, please click on the following link :
|
||||
<%= confirmation_url(@resource, confirmation_token: @token) %>
|
||||
|
||||
Please also check out our terms and conditions <%= terms_url %>
|
||||
|
||||
Sincerely,
|
||||
|
||||
The <%= @instance %> team
|
|
@ -1,5 +1,14 @@
|
|||
<p>Bienvenue <%= @resource.email %> !</p>
|
||||
<p>Bonjour <%= @resource.email %> !<p>
|
||||
|
||||
<p>Vous pouvez confirmer le courriel de votre compte Mastodon en cliquant sur le lien ci-dessous :</p>
|
||||
<p>Vous venez de vous créer un compte sur <%= @instance %> et nous vous en remercions :)</p>
|
||||
|
||||
<p><%= link_to 'Confirmer mon compte', confirmation_url(@resource, confirmation_token: @token) %></p>
|
||||
<p>Pour confirmer votre inscription, merci de cliquer sur le lien suivant : <br>
|
||||
<%= link_to 'Confirmer mon compte', confirmation_url(@resource, confirmation_token: @token) %></p>
|
||||
|
||||
<p>Après votre première connexion, vous pourrez accéder à la documentation de l'outil.</p>
|
||||
|
||||
<p>Pensez également à jeter un œil à nos <%= link_to 'conditions d\'utilisation', terms_url %>.</p>
|
||||
|
||||
<p>Amicalement,</p>
|
||||
|
||||
<p>L'équipe <%= @instance %></p>
|
|
@ -1,5 +1,14 @@
|
|||
Bienvenue <%= @resource.email %> !
|
||||
Bonjour <%= @resource.email %> !
|
||||
|
||||
Vous pouvez confirmer le courriel de votre compte Mastodon en cliquant sur le lien ci-dessous :
|
||||
Vous venez de vous créer un compte sur <%= @instance %> et nous vous en remercions.
|
||||
|
||||
Pour confirmer votre inscription, merci de cliquer sur le lien suivant :
|
||||
<%= confirmation_url(@resource, confirmation_token: @token) %>
|
||||
|
||||
Après votre première connexion, vous pourrez accéder à la documentation de l'outil.
|
||||
|
||||
Pour rappel, nos conditions d'utilisation sont indiquées ici <%= terms_url %>
|
||||
|
||||
Amicalement,
|
||||
|
||||
L'équipe <%= @instance %>
|
|
@ -17,7 +17,7 @@ en:
|
|||
unconfirmed: You have to confirm your email address before continuing.
|
||||
mailer:
|
||||
confirmation_instructions:
|
||||
subject: 'Mastodon: Confirmation instructions'
|
||||
subject: 'Mastodon: Confirmation instructions for %{instance}'
|
||||
password_change:
|
||||
subject: 'Mastodon: Password changed'
|
||||
reset_password_instructions:
|
||||
|
|
|
@ -17,13 +17,13 @@ fr:
|
|||
unconfirmed: Vous devez valider votre compte pour continuer.
|
||||
mailer:
|
||||
confirmation_instructions:
|
||||
subject: Instructions de confirmation
|
||||
subject: "Merci de confirmer votre inscription sur %{instance}"
|
||||
password_change:
|
||||
subject: Votre mot de passe a été modifié avec succés.
|
||||
reset_password_instructions:
|
||||
subject: Instructions pour modifier le mot de passe
|
||||
subject: Instructions pour changer votre mot de passe
|
||||
unlock_instructions:
|
||||
subject: Instructions pour déverrouiller le compte
|
||||
subject: Instructions pour déverrouiller votre compte
|
||||
omniauth_callbacks:
|
||||
failure: 'Nous n''avons pas pu vous authentifier via %{kind} : ''%{reason}''.'
|
||||
success: Authentifié avec succès via %{kind}.
|
||||
|
|
|
@ -170,3 +170,54 @@ en:
|
|||
users:
|
||||
invalid_email: The e-mail address is invalid
|
||||
invalid_otp_token: Invalid two-factor code
|
||||
will_paginate:
|
||||
page_gap: "…"
|
||||
errors:
|
||||
404: The page you were looking for doesn't exist.
|
||||
410: The page you were looking for doesn't exist anymore.
|
||||
422:
|
||||
title: Security verification failed
|
||||
content: Security verification failed. Are you blocking cookies?
|
||||
reports:
|
||||
reports: Reports
|
||||
status: Status
|
||||
unresolved: Unresolved
|
||||
resolved: Resolved
|
||||
id: ID
|
||||
target: Target
|
||||
reported_by: Reported by
|
||||
comment:
|
||||
label: Comment
|
||||
none: None
|
||||
view: View
|
||||
report: "Report #%{id}"
|
||||
delete: Delete
|
||||
reported_account: Reported account
|
||||
reported_by: Signalé par
|
||||
silence_account: Silence account
|
||||
suspend_account: Suspend account
|
||||
mark_as_resolved: Mark as resolved
|
||||
admin:
|
||||
settings:
|
||||
title: Site Settings
|
||||
setting: Setting
|
||||
click_to_edit: Click to edit
|
||||
contact_information:
|
||||
label: Contact information
|
||||
username: Enter a username
|
||||
email: Enter a public e-mail address
|
||||
site_title: Site title
|
||||
site_description:
|
||||
title: Site description
|
||||
desc_html: "Displayed as a paragraph on the frontpage and used as a meta tag.<br>You can use HTML tags, in particular <code><a></code> and <code><em></code>."
|
||||
site_description_extended:
|
||||
title: Extended site description
|
||||
desc_html: "Displayed on extended information page<br>You can use HTML tags"
|
||||
registrations:
|
||||
open:
|
||||
title: Open registration
|
||||
enabled: Enabled
|
||||
disabled: Disabled
|
||||
closed_message:
|
||||
title: Closed registration message
|
||||
desc_html: "Displayed on frontpage when registrations are closed<br>You can use HTML tags"
|
||||
|
|
|
@ -167,3 +167,54 @@ fr:
|
|||
users:
|
||||
invalid_email: L'adresse courriel est invalide
|
||||
invalid_otp_token: Le code d'authentification à deux facteurs est invalide
|
||||
will_paginate:
|
||||
page_gap: "…"
|
||||
errors:
|
||||
404: La page que vous recherchez n'existe pas.
|
||||
410: La page que vous recherchez n'existe plus.
|
||||
422:
|
||||
title: Vérification de sécurité échouée
|
||||
content: Vérification de sécurité échouée. Bloquez-vous les cookies ?
|
||||
reports:
|
||||
reports: Signalements
|
||||
status: Statut
|
||||
unresolved: Non résolus
|
||||
resolved: Résolus
|
||||
id: ID
|
||||
target: Cible
|
||||
reported_by: Signalé par
|
||||
comment:
|
||||
label: Commentaire
|
||||
none: Aucun
|
||||
view: Voir
|
||||
report: "Signalement #%{id}"
|
||||
delete: Supprimer
|
||||
reported_account: Compte signalé
|
||||
reported_by: Signalé par
|
||||
silence_account: Rendre le compte muet
|
||||
suspend_account: Suspendre le compte
|
||||
mark_as_resolved: Marqué comme résolu
|
||||
admin:
|
||||
settings:
|
||||
title: Paramètres du site
|
||||
setting: Paramètre
|
||||
click_to_edit: Cliquez pour éditer
|
||||
contact_information:
|
||||
label: Informations de contact
|
||||
username: Entrez un nom d'utilisateur
|
||||
email: Entrez une adresse courriel publique
|
||||
site_title: Titre du site
|
||||
site_description:
|
||||
title: Description du site
|
||||
desc_html: "Affichée sous la forme d'un paragraphe sur la page d'accueil et utilisée comme balise meta.<br>Vous pouvez utiliser des balises HTML, en particulier <code><a></code> et <code><em></code>."
|
||||
site_description_extended:
|
||||
title: Description étendue du site
|
||||
desc_html: "Affichée sur la page d'informations complémentaires du site<br>Vous pouvez utiliser des balises HTML"
|
||||
registrations:
|
||||
open:
|
||||
title: Inscriptions
|
||||
enabled: Activées
|
||||
disabled: Désactivées
|
||||
closed_message:
|
||||
title: Message de fermeture des inscriptions
|
||||
desc_html: "Affiché sur la page d'accueil lorsque les inscriptions sont fermées<br>Vous pouvez utiliser des balises HTML"
|
||||
|
|
Loading…
Reference in New Issue