Don
Février 11, 2023, 8:51
1
Bonjour,
Je n’avais pas remarqué jusqu’à présent que le texte reverted to version dans les raisons de modification n’était pas traduisible. C’est intéressant, il me semble me souvenir que cela pouvait être traduit, mais maintenant j’ai regardé l’historique des fichiers et il semble que cela n’ait jamais été traduisible ? Ou ai-je manqué quelque chose…
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)
Merci
4 « J'aime »
gerhard
(Gerhard Schlager)
Février 11, 2023, 1:38
3
Merci d’avoir signalé ce problème. Voici un correctif :
main ← i18n/add-missing-string
opened 01:38PM - 11 Feb 23 UTC
3 « J'aime »