i18n and improvements

This commit is contained in:
Jamie Curnow 2018-07-18 16:59:45 +10:00
parent b6cff5a7d8
commit 50dd227a2e
3 changed files with 11 additions and 12 deletions

View File

@ -1,6 +1,6 @@
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title">Delete Proxy Host</h5> <h5 class="modal-title"><%- i18n('proxy-hosts', 'delete') %></h5>
<button type="button" class="close cancel" aria-label="Close" data-dismiss="modal">&nbsp;</button> <button type="button" class="close cancel" aria-label="Close" data-dismiss="modal">&nbsp;</button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
@ -17,7 +17,7 @@
</form> </form>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary cancel" data-dismiss="modal">Cancel</button> <button type="button" class="btn btn-secondary cancel" data-dismiss="modal"><%- i18n('str', 'cancel') %></button>
<button type="button" class="btn btn-danger save">Yes I'm Sure</button> <button type="button" class="btn btn-danger save"><%- i18n('str', 'sure') %></button>
</div> </div>
</div> </div>

View File

@ -1,10 +1,8 @@
'use strict'; 'use strict';
const Mn = require('backbone.marionette'); const Mn = require('backbone.marionette');
const template = require('./delete.ejs');
const Controller = require('../../controller');
const Api = require('../../api');
const App = require('../../main'); const App = require('../../main');
const template = require('./delete.ejs');
require('jquery-serializejson'); require('jquery-serializejson');
@ -24,9 +22,9 @@ module.exports = Mn.View.extend({
'click @ui.save': function (e) { 'click @ui.save': function (e) {
e.preventDefault(); e.preventDefault();
Api.Nginx.ProxyHosts.delete(this.model.get('id')) App.Api.Nginx.ProxyHosts.delete(this.model.get('id'))
.then(() => { .then(() => {
Controller.showNginxProxy(); App.Controller.showNginxProxy();
App.UI.closeModal(); App.UI.closeModal();
}) })
.catch(err => { .catch(err => {

View File

@ -56,7 +56,7 @@
"other-ssl": "Other", "other-ssl": "Other",
"letsencrypt": "Let's Encrypt", "letsencrypt": "Let's Encrypt",
"letsencrypt-email": "Email Address for Let's Encrypt", "letsencrypt-email": "Email Address for Let's Encrypt",
"letsencrypt-agreee": "I Agree to the <a href=\"{url}\" target=\"_blank\">Let's Encrypt Terms of Service</a>", "letsencrypt-agree": "I Agree to the <a href=\"{url}\" target=\"_blank\">Let's Encrypt Terms of Service</a>",
"other-certificate": "Certificate", "other-certificate": "Certificate",
"other-certificate-key": "Certificate Key" "other-certificate-key": "Certificate Key"
}, },
@ -66,7 +66,8 @@
"add": "Add Proxy Host", "add": "Add Proxy Host",
"form-title": "{id, select, undefined{New} other{Edit}} Proxy Host", "form-title": "{id, select, undefined{New} other{Edit}} Proxy Host",
"forward-ip": "Forward IP", "forward-ip": "Forward IP",
"forward-port": "Forward Port" "forward-port": "Forward Port",
"delete": "Delete Proxy Host"
}, },
"redirection-hosts": { "redirection-hosts": {
"title": "Redirection Hosts" "title": "Redirection Hosts"