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

This commit is contained in:
Samuel Carvalho Santos
2020-06-16 12:31:25 -03:00
committed by GitHub
parent 06e5fd5627
commit ce37561e10
4 changed files with 8 additions and 3 deletions

View File

@@ -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);

View File

@@ -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}}