UX: Improve revert label in post history modal (#10038)

UX: Improve revert label in post history modal (#10038)

diff --git a/app/assets/javascripts/discourse/app/controllers/history.js b/app/assets/javascripts/discourse/app/controllers/history.js
index 4ed3da9..b2bbe94 100644
--- a/app/assets/javascripts/discourse/app/controllers/history.js
+++ b/app/assets/javascripts/discourse/app/controllers/history.js
@@ -60,6 +60,11 @@ export default Controller.extend(ModalFunctionality, {
     );
   },
 
+  @discourseComputed("previousVersion")
+  revertToRevisionText(revision) {
+    return I18n.t("post.revisions.controls.revert", { revision });
+  },
+
   refresh(postId, postVersion) {
     this.set("loading", true);
 
diff --git a/app/assets/javascripts/discourse/app/templates/modal/history.hbs b/app/assets/javascripts/discourse/app/templates/modal/history.hbs
index 528f5a8..f86f98a 100644
--- a/app/assets/javascripts/discourse/app/templates/modal/history.hbs
+++ b/app/assets/javascripts/discourse/app/templates/modal/history.hbs
@@ -128,7 +128,7 @@
       {{/if}}
 
       {{#if displayRevert}}
-        {{d-button action=(action "revertToVersion") icon="undo" label="post.revisions.controls.revert" class="btn-danger" disabled=loading}}
+        {{d-button action=(action "revertToVersion") icon="undo" translatedLabel=revertToRevisionText class="btn-danger" disabled=loading}}
       {{/if}}
 
       {{#if displayHide}}
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 56088fe..2f3a8b0 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -2745,7 +2745,7 @@ en:
           last: "Last revision"
           hide: "Hide revision"
           show: "Show revision"
-          revert: "Revert to this revision"
+          revert: "Revert to revision %{revision}"
           edit_wiki: "Edit Wiki"
           edit_post: "Edit Post"
           comparing_previous_to_current_out_of_total: "<strong>%{previous}</strong> %{icon} <strong>%{current}</strong> / %{total}"
diff --git a/config/locales/client.pt_BR.yml b/config/locales/client.pt_BR.yml
index 7f6419e..4db38a1 100644
--- a/config/locales/client.pt_BR.yml
+++ b/config/locales/client.pt_BR.yml
@@ -2476,7 +2476,7 @@ pt_BR:
           last: "Última revisão"
           hide: "Esconder revisão"
           show: "Exibir revisão"
-          revert: "Reverter para esta revisão"
+          revert: "Reverter para a revisão %{revision}"
           edit_wiki: "Editar Wiki"
           edit_post: "Editar Postagem"
           comparing_previous_to_current_out_of_total: "<strong>%{previous}</strong> %{icon} <strong>%{current}</strong> / %{total}"

GitHub sha: ce37561e

This commit appears in #10038 which was approved by eviltrout. It was merged by eviltrout.