From cc50219d059421a7b201b9c7cbec9f2ee39ccbfd Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Thu, 17 Feb 2022 00:55:13 +0100 Subject: [PATCH] Add translations for mute rules view --- app/views/settings/_muted.haml | 14 +++++++------- config/locales/views.en.yml | 10 ++++++++++ config/locales/voc.en.yml | 4 +++- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/app/views/settings/_muted.haml b/app/views/settings/_muted.haml index 2fea6e29..b27c0846 100644 --- a/app/views/settings/_muted.haml +++ b/app/views/settings/_muted.haml @@ -1,24 +1,24 @@ .card .card-body - %h2 Muted words - %p Muting words (or longer phrases) will prevent questions containing those to appear in your inbox. - %p Note: Filtered questions are discarded completely from your inbox, and won't reappear if you remove a filter later on. + %h2= t(".heading") + %p= t(".body") + %p= t(".note") .js-rules-list - @rules.each do |rule| .form-group .input-group %input.form-control{ disabled: true, value: rule.muted_phrase } .input-group-append - %button.btn.btn-danger{ type: 'button', data: { id: rule.id } } Remove + %button.btn.btn-danger{ type: "button", data: { id: rule.id } }= t(".actions.remove") .form-group %form .input-group - %input.form-control#new-rule-text{ placeholder: 'Add a new muted word...' } + %input.form-control#new-rule-text{ placeholder: t(".placeholder") } .input-group-append - %button.btn.btn-primary#new-rule-submit{ type: 'submit' } Add + %button.btn.btn-primary#new-rule-submit{ type: "submit" }= t(".actions.add") %template#rule-template .form-group .input-group %input.form-control{ disabled: true } .input-group-append - %button.btn.btn-danger{ type: 'button' } Remove + %button.btn.btn-danger{ type: "button" }= t(".actions.remove") \ No newline at end of file diff --git a/config/locales/views.en.yml b/config/locales/views.en.yml index 08fb69ea..ec5d32bb 100644 --- a/config/locales/views.en.yml +++ b/config/locales/views.en.yml @@ -55,6 +55,14 @@ en: export_url: none: "Once exporting your account is done, a download link will appear here." present: "Here's your export from %{time}" + muted: + heading: "Muted words" + body: "Muting words (or longer phrases) will prevent questions containing those to appear in your inbox." + note: "Note: Filtered questions are discarded completely from your inbox, and won't reappear if you remove a filter later on." + placeholder: "Add a new muted word..." + actions: + add: "Add" + remove: "Remove" profile: adjust: profile_picture: "Adjust your new profile picture" @@ -141,6 +149,8 @@ en: user: edit: title: "Profile Settings" + edit_mute: + title: "Muted Words" edit_security: title: "Security Settings" edit_theme: diff --git a/config/locales/voc.en.yml b/config/locales/voc.en.yml index 3c50ff5a..5d7ac143 100644 --- a/config/locales/voc.en.yml +++ b/config/locales/voc.en.yml @@ -9,4 +9,6 @@ en: save: "Save changes" register: "Sign up" terms: "Terms of Service" - update: "Update" \ No newline at end of file + update: "Update" + messages: + noauth: "requires authentication" \ No newline at end of file