FIX: Replace hard-coded string with translation (#20245)
This commit is contained in:
parent
8bc9acc414
commit
d84d38cbe7
|
@ -542,7 +542,9 @@ class PostsController < ApplicationController
|
||||||
post_revision.modifications["category_id"][0] != topic.category.id
|
post_revision.modifications["category_id"][0] != topic.category.id
|
||||||
end
|
end
|
||||||
return render_json_error(I18n.t("revert_version_same")) unless changes.length > 0
|
return render_json_error(I18n.t("revert_version_same")) unless changes.length > 0
|
||||||
changes[:edit_reason] = "reverted to version ##{post_revision.number.to_i - 1}"
|
changes[:edit_reason] = I18n.with_locale(SiteSetting.default_locale) do
|
||||||
|
I18n.t("reverted_to_version", version: post_revision.number.to_i - 1)
|
||||||
|
end
|
||||||
|
|
||||||
revisor = PostRevisor.new(post, topic)
|
revisor = PostRevisor.new(post, topic)
|
||||||
revisor.revise!(current_user, changes)
|
revisor.revise!(current_user, changes)
|
||||||
|
|
|
@ -432,6 +432,7 @@ en:
|
||||||
too_late_to_edit: "That post was created too long ago. It can no longer be edited or deleted."
|
too_late_to_edit: "That post was created too long ago. It can no longer be edited or deleted."
|
||||||
edit_conflict: "That post was edited by another user and your changes can no longer be saved."
|
edit_conflict: "That post was edited by another user and your changes can no longer be saved."
|
||||||
revert_version_same: "The current version is same as the version you are trying to revert to."
|
revert_version_same: "The current version is same as the version you are trying to revert to."
|
||||||
|
reverted_to_version: "reverted to version #%{version}"
|
||||||
cannot_edit_on_slow_mode: "This topic is in slow mode. To encourage thoughtful, considered discussion, editing old posts in this topic is not currently allowed during slow mode."
|
cannot_edit_on_slow_mode: "This topic is in slow mode. To encourage thoughtful, considered discussion, editing old posts in this topic is not currently allowed during slow mode."
|
||||||
|
|
||||||
excerpt_image: "image"
|
excerpt_image: "image"
|
||||||
|
|
Loading…
Reference in New Issue