Merge pull request #591 from Retrospring/translation-cleanup

Translation cleanup
This commit is contained in:
Karina Kwiatek 2022-07-30 20:37:04 +02:00 committed by GitHub
commit abaa33a664
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 54 additions and 50 deletions

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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."

View file

@ -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."
@ -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:
@ -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:

View file

@ -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"

View file

@ -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…"

View file

@ -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? 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"

View file

@ -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"