Don
February 11, 2023, 8:51am
1
Hello,
I didn’t noticed until now that on the edit reasons the reverted to version
text is not translatable. Interesting, I seem to remember that this could be translated, but now I looked back at the file history and it seems that it was never translatable? Or I missed something…
if post.is_first_post?
changes[:title] = post_revision.modifications["title"][0] if post_revision.modifications[
"title"
].present? && post_revision.modifications["title"][0] != topic.title
changes[:category_id] = post_revision.modifications["category_id"][
0
] if post_revision.modifications["category_id"].present? &&
post_revision.modifications["category_id"][0] != topic.category.id
end
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}"
revisor = PostRevisor.new(post, topic)
revisor.revise!(current_user, changes)
return render_json_error(post) if post.errors.present?
return render_json_error(topic) if topic.errors.present?
post_serializer = PostSerializer.new(post, scope: guardian, root: false)
post_serializer.draft_sequence = DraftSequence.current(current_user, topic.draft_key)
Thank you
4 Likes
gerhard
(Gerhard Schlager)
February 11, 2023, 1:38pm
3
Thanks for reporting that issue. Here’s a fix:
discourse:main
← discourse:i18n/add-missing-string
opened 01:38PM - 11 Feb 23 UTC
3 Likes