From 67bf884f45a598c6c03fb8a80b32db561a36a880 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sat, 30 Jul 2022 15:11:26 +0200 Subject: [PATCH 1/8] Re-word noauth message --- config/locales/voc.en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/voc.en.yml b/config/locales/voc.en.yml index e56533ed..cd83390b 100644 --- a/config/locales/voc.en.yml +++ b/config/locales/voc.en.yml @@ -15,7 +15,7 @@ en: update: "Update" view_in_rails_admin: "View in Rails Admin" messages: - noauth: "You must be signed in to do this." + noauth: "You need to be logged in to perform this action." time: distance_ago: "%{time} ago" hours: "hours" From 6564ef5efbd37748236bdc20f7afb209be41bef3 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sat, 30 Jul 2022 15:15:18 +0200 Subject: [PATCH 2/8] Re-word frontend strings - Re-word confirmation dialogs - Reused translations - Merged duplicated list key - Replaced ellipsis with ellipsis character --- config/locales/frontend.en.yml | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/config/locales/frontend.en.yml b/config/locales/frontend.en.yml index 7cea9da1..9b5cd55d 100644 --- a/config/locales/frontend.en.yml +++ b/config/locales/frontend.en.yml @@ -4,7 +4,7 @@ en: success: title: "Success!" error: - title: "Uh-oh..." + title: "Uh-oh…" message: "An error occurred, a developer should check the console for details" subscription: subscribe: "Successfully subscribed." @@ -14,40 +14,39 @@ en: unsubscribe: "Failed to unsubscribe from answer." list: confirm: - title: "Really delete this list?" + title: :voc.confirm text: "You will not be able to recover this list." + item: + members: + zero: "No members" + one: "1 member" + other: "%{count} members" destroy_question: confirm: - title: "Are you sure?" + title: :voc.confirm text: "The question will be moved back to your inbox, but it won't delete any posts to social media." destroy_comment: confirm: - title: "Really delete?" + title: :voc.confirm text: "You will not be able to recover this comment." destroy_report: confirm: - title: "Really delete?" + title: :voc.confirm text: "You will not be able to recover this report." destroy_own: confirm: - title: "Are you sure?" + title: :voc.confirm text: "The question will be removed." inbox: empty: "Nothing to see here." confirm_all: - title: "Really delete %{count} questions?" + title: "Are you sure you want to delete %{count} questions?" text: "They will be gone forever." confirm: - title: "Really delete?" + title: :voc.confirm text: "This question will be gone forever." report: confirm: - title: "Really report this %{type}?" - text: "A moderator will review your report and decide what happens.\nIf you'd like, you can also specify a reason." - input: "Specify a reason..." - list: - item: - members: - zero: "0 members" - one: "1 member" - other: "%{count} members" + title: "Are you sure you want to report this %{type}?" + text: "A moderator will review your report and decide what happens.\nYou can optionally specify a reason." + input: "Specify a reason…" From 3f2cdbb9115d9099ccba82e8e2da26c8126b6ccb Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sat, 30 Jul 2022 15:17:31 +0200 Subject: [PATCH 3/8] Re-word strings used in views --- app/views/announcement/index.haml | 2 +- app/views/settings/_account.haml | 2 +- config/locales/views.en.yml | 29 +++++++++++++++-------------- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/app/views/announcement/index.haml b/app/views/announcement/index.haml index e7c1ae42..f6ce2be5 100644 --- a/app/views/announcement/index.haml +++ b/app/views/announcement/index.haml @@ -13,7 +13,7 @@ announcement_destroy_path(id: announcement.id), method: :delete, class: "btn btn-link text-danger", - confirm: t(".confirm") + confirm: t(".confirm_delete") .row .col-md-12 diff --git a/app/views/settings/_account.haml b/app/views/settings/_account.haml index bdc928bc..c234b9d5 100644 --- a/app/views/settings/_account.haml +++ b/app/views/settings/_account.haml @@ -19,6 +19,6 @@ %hr/ %p = t(".delete.heading") - = button_to t(".delete.action"), "/settings/account", data: { confirm: t("voc.confirm") }, method: :delete, class: "btn btn-danger btn-xs" + = button_to t(".delete.action"), "/settings/account", data: { confirm: t(".delete.confirm") }, method: :delete, class: "btn btn-danger btn-xs" .visible-xs= render "shared/links" diff --git a/config/locales/views.en.yml b/config/locales/views.en.yml index 5e31e844..037460f3 100644 --- a/config/locales/views.en.yml +++ b/config/locales/views.en.yml @@ -71,7 +71,7 @@ en: announcement: index: title: :activerecord.models.announcement.other - confirm: "Are you sure you want to delete this announcement?" + confirm_delete: "Are you sure you want to delete this announcement?" new: "Add Announcement" new: title: "Create Announcement" @@ -102,7 +102,7 @@ en: title: "Account Settings" new: title: "Sign up" - info: "With signing up you accept our %{terms}" + info: "By signing up you accept our %{terms}" sessions: new: title: "Sign in" @@ -150,7 +150,7 @@ en: one: "1 answer" other: "%{count} answers" options: "Options" - placeholder: "Write your answer here..." + placeholder: "Write your answer here…" sharing: heading: "Sharing" post_to: "Post to %{service}" @@ -184,7 +184,7 @@ en: title: "Ask your followers" placeholder: "Type your question here…" action: "Ask" - loading: "Asking..." + loading: "Asking…" comment_smiles: title: "People who smiled this comment" none: "No one has smiled this comment yet." @@ -270,7 +270,8 @@ en: help: password: "Leave this blank if you don't want to change it" delete: - action: "Delete my account" + action: "Permanently delete account" + confirm: "Are you sure? This deleting your account is IRREVERSIBLE." heading: "Unsatisfied?" blocks: index: @@ -279,7 +280,7 @@ en: none: "You are not blocking anyone." section: blocks: - heading: "Blocks" + heading: "Blocked Users" body: "Each user you've blocked is listed here, along with a way to unblock them. To block someone, use the 'Actions' dropdown on their profile page." anon_blocks: heading: "Anonymous Blocks" @@ -331,14 +332,14 @@ en: present: "Here's your export from %{time}" mutes: index: - title: "Muted Words" - heading: "Muted words" + title: "Muted Terms" + heading: "Muted Terms" 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..." + placeholder: "Add a new muted term…" actions: add: "Add" - remove: "Remove" + remove: "Remove" privacy: edit: title: "Privacy Settings" @@ -370,7 +371,7 @@ en: confirm: "Are you sure? This will disable your previous set of recovery codes." totp_setup: setup_key: "If you cannot scan the QR code, use the following key instead:" - setup_qr: "Once you have downloaded an authenticator app, add your %{app_name} account by scanning the QR code displayed on the left." + setup_qr: "Once you have downloaded an authenticator app, add your %{app_name} account by scanning the QR code displayed on this page." otp_validation: "Enter the code displayed in the app here:" app: none: "If you do not have an authenticator app already installed on your device, we suggest one of the following:" @@ -426,10 +427,10 @@ en: example: "Some muted text" forms: heading: "Forms and Inputs" - body: "Styles for form inputs, like text fields." + body: "Styles for form inputs, such as text fields." raised: heading: "Raised Content" - body: "Raised content basically describes all the different boxes and panels you can see across the site." + body: "Raised content includes all the different boxes and panels you can see across the site." accent: example: "Some text on top of a accented area on a raised element!" shared: @@ -459,7 +460,7 @@ en: privacy: "Privacy" sharing: "Sharing" security: "Security" - mutes: "Muted words" + mutes: "Muted Terms" theme: "Theme" data: "Your Data" export: "Export" From 808556c5c6de1be95391458210bbbc2252c82910 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sat, 30 Jul 2022 15:17:50 +0200 Subject: [PATCH 4/8] Re-word email help text --- config/locales/activerecord.en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/activerecord.en.yml b/config/locales/activerecord.en.yml index 4de24bd8..afc8f48e 100644 --- a/config/locales/activerecord.en.yml +++ b/config/locales/activerecord.en.yml @@ -78,7 +78,7 @@ en: updated_at: "Account updated at" help: user: - email: "Don't forget to check your spam folder in case our mail might have landed there!" + email: "Don't forget to check your spam folder in case our email might have landed there!" current_password: "We need your current password to confirm your changes" profile: anon_display_name: "This name will be used for questions asked to you by anonymous users." From a9482c188d334c55b8e44b88c3faf3ecec017a70 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sat, 30 Jul 2022 15:18:10 +0200 Subject: [PATCH 5/8] Re-word self-action error message --- config/locales/errors.en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/errors.en.yml b/config/locales/errors.en.yml index 90e4a2d1..c00de3cd 100644 --- a/config/locales/errors.en.yml +++ b/config/locales/errors.en.yml @@ -17,7 +17,7 @@ en: answering_other_blocked_self: "You cannot answer this question as you have been blocked its author" commenting_self_blocked_other: "You cannot comment on this answer as you have blocked its author" commenting_other_blocked_self: "You cannot comment on this answer as you have been blocked by its author" - self_action: "You cannot do this to yourself" + self_action: "You cannot perform this action on yourself" following_self: "You cannot follow yourself" blocking_self: "You cannot block yourself" From a03fe85b3371abd24e8579e4c1e10a6aa96a222b Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sat, 30 Jul 2022 15:18:56 +0200 Subject: [PATCH 6/8] Re-word strings used in `ServicesController` --- app/controllers/services_controller.rb | 10 ++++++---- config/locales/controllers.en.yml | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/controllers/services_controller.rb b/app/controllers/services_controller.rb index 5e3cf5a2..bcf5aae2 100644 --- a/app/controllers/services_controller.rb +++ b/app/controllers/services_controller.rb @@ -10,14 +10,15 @@ class ServicesController < ApplicationController def create service = Service.initialize_from_omniauth(omniauth_hash) service.user = current_user + service_name = service.type.split("::").last.titleize if service.save - flash[:success] = t(".success") + flash[:success] = t(".success", service: service_name) else flash[:error] = if service.errors.details[:uid]&.any? { |err| err[:error] == :taken } - t(".duplicate", service: service.type.split("::").last.titleize, app: APP_CONFIG["site_name"]) + t(".duplicate", service: service_name, app: APP_CONFIG["site_name"]) else - t(".error") + t(".error", service: service_name) end end @@ -43,8 +44,9 @@ class ServicesController < ApplicationController def destroy @service = current_user.services.find(params[:id]) + service_name = @service.type.split("::").last.titleize @service.destroy - flash[:success] = t(".success") + flash[:success] = t(".success", service: service_name) redirect_to services_path end diff --git a/config/locales/controllers.en.yml b/config/locales/controllers.en.yml index e1cf05b1..a899a50e 100644 --- a/config/locales/controllers.en.yml +++ b/config/locales/controllers.en.yml @@ -138,16 +138,16 @@ en: error: "No user with the name @%{author} found, showing entries from all users instead!" services: create: - success: "Service connected successfully." + success: "%{service} connected successfully." duplicate: "The %{service} account you are trying to connect is already connected to another %{app} account. If you are unable to disconnect the account yourself, please send us a Direct Message on Twitter: @retrospring." - error: "Unable to connect service." + error: "Unable to connect to %{service}." update: success: "Service updated successfully." error: "Unable to update service." failure: error: :errors.base destroy: - success: "Service removed successfully." + success: "%{service} disconnected successfully." settings: export: index: From c9bc92e60e46fac344c813b2402755c2c3bb2c21 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sat, 30 Jul 2022 15:19:19 +0200 Subject: [PATCH 7/8] Re-word strings used in controllers --- config/locales/controllers.en.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/config/locales/controllers.en.yml b/config/locales/controllers.en.yml index a899a50e..203b2185 100644 --- a/config/locales/controllers.en.yml +++ b/config/locales/controllers.en.yml @@ -1,6 +1,6 @@ en: ajax: - noauth: "You need to be logged in to perform this action." + noauth: :messages.noauth anonymous_block: create: success: :ajax.relationship.create.block.success @@ -9,18 +9,18 @@ en: success: :ajax.relationship.destroy.block.success answer: create: - privacy: "This user does not want other users to answer their question." + privacy: "This user does not want other users to answer their questions." success: "Successfully answered question." error: "Question is not in your inbox." destroy: - nopriv: "Can't delete other people's answers." + nopriv: "You cannot delete other people's answers." success: "Successfully deleted answer." comment: create: invalid: "Your comment is too long." success: "Comment posted successfully." destroy: - nopriv: "Can't delete other people's comments." + nopriv: "You cannot delete other people's comments." success: "Successfully deleted comment." inbox: create: @@ -36,7 +36,7 @@ en: list: create: noauth: :ajax.noauth - noname: "Please give that list a name." + noname: "List must have a name." toolong: "List name too long (30 characters max.)" notfound: "Could not find user." exists: "List already exists." @@ -67,7 +67,7 @@ en: success: "Successfully adjusted this users %{privilege} role." error: "Something went wrong while adjusting this role." mute_rule: - nopriv: "Can't edit other people's rules" + nopriv: "You cannot edit other people's rules." create: noauth: :ajax.noauth success: "Rule added successfully." @@ -186,7 +186,9 @@ en: banned: "I'm sorry, %{name}, I'm afraid I can't do that." reason: "Ban reason: %{reason}" until: "Banned until: %{time}" - info: "You have %{count} recovery codes remaining." + info: + one: "You have only one recovery code remaining. Please regenerate your recovery codes from the security settings to avoid being locked out!" + other: "You have %{count} recovery codes remaining." error: :errors.invalid_otp registrations: destroy: From d026020ef6b6c29eb7b9d8ab2ec7fff80aef4bb9 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek <6197148+raccube@users.noreply.github.com> Date: Sat, 30 Jul 2022 18:24:22 +0000 Subject: [PATCH 8/8] Remove leftover "This" Co-authored-by: Georg Gadinger --- config/locales/views.en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/views.en.yml b/config/locales/views.en.yml index 037460f3..5304ebfa 100644 --- a/config/locales/views.en.yml +++ b/config/locales/views.en.yml @@ -271,7 +271,7 @@ en: password: "Leave this blank if you don't want to change it" delete: action: "Permanently delete account" - confirm: "Are you sure? This deleting your account is IRREVERSIBLE." + confirm: "Are you sure? Deleting your account is IRREVERSIBLE." heading: "Unsatisfied?" blocks: index: