Fix missing string in modals.pug

Add escape to execute translate() server-side when handling error message for invalid filenames in project on copy.

Signed-off-by: Simon Detheridge <s@sd.ai>
This commit is contained in:
Simon Detheridge 2018-10-10 15:04:17 +01:00
parent ea2782ff22
commit e7506489d1

View file

@ -127,7 +127,7 @@ script(type='text/ng-template', id='cloneProjectModalTemplate')
) &times; ) &times;
h3 #{translate("copy_project")} h3 #{translate("copy_project")}
.modal-body .modal-body
.alert.alert-danger(ng-show="state.error.message") {{state.error.message === "invalid element name" ? translate("invalid_element_name") : state.error.message}} .alert.alert-danger(ng-show="state.error.message") {{state.error.message === "invalid element name" ? "#{translate("invalid_element_name")}" : state.error.message}}
.alert.alert-danger(ng-show="state.error && !state.error.message") #{translate("generic_something_went_wrong")} .alert.alert-danger(ng-show="state.error && !state.error.message") #{translate("generic_something_went_wrong")}
form(name="cloneProjectForm", novalidate) form(name="cloneProjectForm", novalidate)
.form-group .form-group
@ -271,7 +271,7 @@ script(type="text/ng-template", id="showErrorModalTemplate")
) &times; ) &times;
h3 #{translate("generic_something_went_wrong")} h3 #{translate("generic_something_went_wrong")}
.modal-body .modal-body
.alert.alert-danger(ng-show="error.message") {{error.message === "invalid element name" ? translate("invalid_element_name") : error.message}} .alert.alert-danger(ng-show="error.message") {{error.message === "invalid element name" ? "#{translate("invalid_element_name")}" : error.message}}
.alert.alert-danger(ng-show="error && !error.message") #{translate("generic_something_went_wrong")} .alert.alert-danger(ng-show="error && !error.message") #{translate("generic_something_went_wrong")}
.modal-footer .modal-footer
button.btn.btn-default(ng-click="cancel()") #{translate("cancel")} button.btn.btn-default(ng-click="cancel()") #{translate("cancel")}