Don
11 Febrero, 2023 08:51
1
Hola,
No me di cuenta hasta ahora de que en las razones de edición el texto reverted to version no es traducible. Interesante, parece que recuerdo que esto se podía traducir, pero ahora miré de nuevo el historial del archivo y parece que nunca fue traducible? O me perdí algo…
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)
Gracias
4 Me gusta
gerhard
(Gerhard Schlager)
11 Febrero, 2023 13:38
3
Gracias por informar sobre ese problema. Aquí tienes una solución:
main ← i18n/add-missing-string
opened 01:38PM - 11 Feb 23 UTC
3 Me gusta