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-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>
</div>
<div class="modal-body">
@ -17,7 +17,7 @@
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary cancel" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-danger save">Yes I'm Sure</button>
<button type="button" class="btn btn-secondary cancel" data-dismiss="modal"><%- i18n('str', 'cancel') %></button>
<button type="button" class="btn btn-danger save"><%- i18n('str', 'sure') %></button>
</div>
</div>

View File

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

View File

@ -56,7 +56,7 @@
"other-ssl": "Other",
"letsencrypt": "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-key": "Certificate Key"
},
@ -66,7 +66,8 @@
"add": "Add Proxy Host",
"form-title": "{id, select, undefined{New} other{Edit}} Proxy Host",
"forward-ip": "Forward IP",
"forward-port": "Forward Port"
"forward-port": "Forward Port",
"delete": "Delete Proxy Host"
},
"redirection-hosts": {
"title": "Redirection Hosts"