Add translations for smile ajax controller
This commit is contained in:
parent
34de119bb1
commit
7381a685ac
|
@ -13,12 +13,12 @@ class Ajax::SmileController < AjaxController
|
||||||
rescue => e
|
rescue => e
|
||||||
Sentry.capture_exception(e)
|
Sentry.capture_exception(e)
|
||||||
@response[:status] = :fail
|
@response[:status] = :fail
|
||||||
@response[:message] = I18n.t('messages.smile.create.fail')
|
@response[:message] = t(".error")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@response[:status] = :okay
|
@response[:status] = :okay
|
||||||
@response[:message] = I18n.t('messages.smile.create.okay')
|
@response[:message] = t(".success")
|
||||||
@response[:success] = true
|
@response[:success] = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -32,12 +32,12 @@ class Ajax::SmileController < AjaxController
|
||||||
rescue => e
|
rescue => e
|
||||||
Sentry.capture_exception(e)
|
Sentry.capture_exception(e)
|
||||||
@response[:status] = :fail
|
@response[:status] = :fail
|
||||||
@response[:message] = I18n.t('messages.smile.destroy.fail')
|
@response[:message] = t(".error")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@response[:status] = :okay
|
@response[:status] = :okay
|
||||||
@response[:message] = I18n.t('messages.smile.destroy.okay')
|
@response[:message] = t(".success")
|
||||||
@response[:success] = true
|
@response[:success] = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -55,12 +55,12 @@ class Ajax::SmileController < AjaxController
|
||||||
rescue => e
|
rescue => e
|
||||||
Sentry.capture_exception(e)
|
Sentry.capture_exception(e)
|
||||||
@response[:status] = :fail
|
@response[:status] = :fail
|
||||||
@response[:message] = I18n.t('messages.smile.create_comment.fail')
|
@response[:message] = t(".error")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@response[:status] = :okay
|
@response[:status] = :okay
|
||||||
@response[:message] = I18n.t('messages.smile.create_comment.okay')
|
@response[:message] = t(".success")
|
||||||
@response[:success] = true
|
@response[:success] = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -74,12 +74,12 @@ class Ajax::SmileController < AjaxController
|
||||||
rescue => e
|
rescue => e
|
||||||
Sentry.capture_exception(e)
|
Sentry.capture_exception(e)
|
||||||
@response[:status] = :fail
|
@response[:status] = :fail
|
||||||
@response[:message] = I18n.t('messages.smile.destroy_comment.fail')
|
@response[:message] = t(".error")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@response[:status] = :okay
|
@response[:status] = :okay
|
||||||
@response[:message] = I18n.t('messages.smile.destroy_comment.okay')
|
@response[:message] = t(".success")
|
||||||
@response[:success] = true
|
@response[:success] = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -34,6 +34,19 @@ en:
|
||||||
follow:
|
follow:
|
||||||
success: "Successfully unfollowed user."
|
success: "Successfully unfollowed user."
|
||||||
error: "You are not following that user."
|
error: "You are not following that user."
|
||||||
|
smile:
|
||||||
|
create:
|
||||||
|
success: "Successfully smiled answer."
|
||||||
|
error: "You have already smiled that answer."
|
||||||
|
create_comment:
|
||||||
|
success: "Successfully smiled comment."
|
||||||
|
error: "You have already smiled that comment."
|
||||||
|
destroy:
|
||||||
|
success: "Successfully unsmiled answer."
|
||||||
|
error: "You have not smiled that answer."
|
||||||
|
destroy_comment:
|
||||||
|
success: "Successfully unsmiled comment."
|
||||||
|
error: "You have not smiled that comment."
|
||||||
announcement:
|
announcement:
|
||||||
create:
|
create:
|
||||||
success: "Announcement created successfully."
|
success: "Announcement created successfully."
|
||||||
|
|
|
@ -135,19 +135,6 @@ en:
|
||||||
unknown: "unknown type"
|
unknown: "unknown type"
|
||||||
not_found: "Could not find %{parameter}"
|
not_found: "Could not find %{parameter}"
|
||||||
okay: "%{parameter} reported. A moderator will decide what happens with the %{parameter}."
|
okay: "%{parameter} reported. A moderator will decide what happens with the %{parameter}."
|
||||||
smile:
|
|
||||||
create:
|
|
||||||
fail: "You have already smiled that answer."
|
|
||||||
okay: "Successfully smiled answer."
|
|
||||||
destroy:
|
|
||||||
fail: "You have not smiled that answer."
|
|
||||||
okay: "Successfully unsmiled answer."
|
|
||||||
create_comment:
|
|
||||||
fail: "You have already smiled that comment."
|
|
||||||
okay: "Successfully smiled comment."
|
|
||||||
destroy_comment:
|
|
||||||
fail: "You have not smiled that comment."
|
|
||||||
okay: "Successfully unsmiled comment."
|
|
||||||
subscription:
|
subscription:
|
||||||
torpedo: "418 I'm a torpedo"
|
torpedo: "418 I'm a torpedo"
|
||||||
views:
|
views:
|
||||||
|
|
Loading…
Reference in New Issue