From: rajat gupta <
rajat....@gmail.com>
1. Externalise user management and config backup messages
2. Remove string concatenation for Global Network configuration
3. Add on-off label for on-off switch for ipv4 and ipv6 to be
able to externalise it and increase data width to accomodate
long width characters.
Signed-off-by: rajat gupta <
rajat....@gmail.com>
---
ui/js/ginger-bootgrid.js | 2 +-
ui/js/host-network.js | 6 +++---
ui/pages/host-network-bond.html.tmpl | 6 +++---
ui/pages/host-network-settings.html.tmpl | 6 +++---
ui/pages/host-network-vlan.html.tmpl | 8 ++++----
ui/pages/i18n.json.tmpl | 4 +++-
6 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/ui/js/ginger-bootgrid.js b/ui/js/ginger-bootgrid.js
index 5e05cb7..7f1081d 100644
--- a/ui/js/ginger-bootgrid.js
+++ b/ui/js/ginger-bootgrid.js
@@ -343,7 +343,7 @@ ginger.createEditableBootgrid = function(gridInstance, opts, rowKey) {
if (!isValid) {
saveButton.css('pointer-events', 'none');
- return 'invalid field';
+ return i18n['GINBG00006M'];
}
}
}).on('shown', function(e, editable) {
diff --git a/ui/js/host-network.js b/ui/js/host-network.js
index 444e39d..3e94eb9 100644
--- a/ui/js/host-network.js
+++ b/ui/js/host-network.js
@@ -1147,15 +1147,15 @@ ginger.loadGlobalNetworkConfig = function() {
}
$('#network-global-configuration-content-area > .wok-mask').removeClass('hidden');
ginger.updateNetworkGlobals(global_info, function(result) {
- var message = i18n['GINNET0024M'] + " " + i18n['GINNET0020M'];
+ var message = i18n['GINNET0024M'];
globalNetworkConfigTable.destroy();
getNetworkGlobalConfiguration();
wok.message.success(message, '#message-nw-global-container-area');
$('#network-global-configuration-content-area > .wok-mask').addClass('hidden');
}, function(error) {
$('#network-global-configuration-content-area > .wok-mask').addClass('hidden');
- var message = i18n['GINNET0024M'] + " " + i18n['GINNET0021M'] + " " + error.responseJSON.reason;
- wok.message.error(error.responseJSON.reason, '#message-nw-global-container-area', true);
+ var message = i18n['GINNET0091M'] + " " + error.responseJSON.reason;
+ wok.message.error(message, '#message-nw-global-container-area', true);
});
}
diff --git a/ui/pages/host-network-bond.html.tmpl b/ui/pages/host-network-bond.html.tmpl
index 1c6285a..d0cb29a 100755
--- a/ui/pages/host-network-bond.html.tmpl
+++ b/ui/pages/host-network-bond.html.tmpl
@@ -46,7 +46,7 @@
<div class="form-group">
<label class="control-label col-sm-4" for="nw-bond-device-textbox">$_("Interface Name")</label>
<div class="col-sm-8 col-xs-3">
- <input id="nw-bond-device-textbox" class="form-control" name="DEVICE" type="text" required="true" />
+ <input id="nw-bond-device-textbox" class="form-control" name="DEVICE" type="text" required="true" title=" "/>
</div>
</div>
<label class="control-label" for="nw-general-bond-member">$_("Bond Members")</label>
@@ -75,7 +75,7 @@
<label class="control-label col-sm-8" for="nw-bond-ipv4-init">$_("IPv4")</label>
<div class="col-sm-4">
<div class="make-switch">
- <input type="checkbox" checked="true" class="ipv4-on-off" id="nw-bond-ipv4-init" />
+ <input type="checkbox" checked="true" class="ipv4-on-off" id="nw-bond-ipv4-init" data-on-text=$_("ON") data-off-text=$_("OFF") data-handle-width="90"/>
</div>
</div>
</div>
@@ -132,7 +132,7 @@
<label class="control-label col-sm-8" for="nw-bond-ipv6-init">$_("IPv6")</label>
<div class="col-sm-4">
<div class="make-switch">
- <input type="checkbox" checked="true" class="ipv6-on-off" id="nw-bond-ipv6-init" />
+ <input type="checkbox" checked="true" class="ipv6-on-off" id="nw-bond-ipv6-init" data-on-text=$_("ON") data-off-text=$_("OFF") data-handle-width="90"/>
</div>
</div>
</div>
diff --git a/ui/pages/host-network-settings.html.tmpl b/ui/pages/host-network-settings.html.tmpl
index 205dd85..c2be8d3 100644
--- a/ui/pages/host-network-settings.html.tmpl
+++ b/ui/pages/host-network-settings.html.tmpl
@@ -45,7 +45,7 @@
<div class="form-group">
<label class="control-label col-sm-4" for="nw-settings-device-textbox">$_("Device")</label>
<div class="col-sm-8 col-xs-3">
- <input id="nw-settings-device-textbox" class="form-control" name="DEVICE" type="text" required="true" disabled="disabled" />
+ <input id="nw-settings-device-textbox" class="form-control" name="DEVICE" type="text" required="true" disabled="disabled" title=" "/>
</div>
</div>
<div class="form-group">
@@ -79,7 +79,7 @@
<label class="control-label col-sm-8" for="nw-settings-ipv4-init">$_("IPv4")</label>
<div class="col-sm-4">
<div class="make-switch">
- <input type="checkbox" checked="true" class="ipv4-on-off" id="nw-settings-ipv4-init"/>
+ <input type="checkbox" checked="true" class="ipv4-on-off" id="nw-settings-ipv4-init" data-on-text=$_("ON") data-off-text=$_("OFF") data-handle-width="90"/>
</div>
</div>
</div>
@@ -138,7 +138,7 @@
<label class="control-label col-sm-8" for="nw-settings-ipv6-init">$_("IPv6")</label>
<div class="col-sm-4">
<div class="make-switch">
- <input type="checkbox" checked="true" class="ipv6-on-off" id="nw-settings-ipv6-init"/>
+ <input type="checkbox" checked="true" class="ipv6-on-off" id="nw-settings-ipv6-init" data-on-text=$_("ON") data-off-text=$_("OFF") data-handle-width="90"/>
</div>
</div>
</div>
diff --git a/ui/pages/host-network-vlan.html.tmpl b/ui/pages/host-network-vlan.html.tmpl
index 7ef140f..1c9fcaa 100644
--- a/ui/pages/host-network-vlan.html.tmpl
+++ b/ui/pages/host-network-vlan.html.tmpl
@@ -53,7 +53,7 @@
<div class="form-group">
<label class="control-label col-sm-4" for="nw-vlan-hwaddress">$_("VLAN Interface name")</label>
<div class="col-sm-8">
- <input id="nw-vlan-interface-textbox" class="form-control" name="NAME" type="text" required="true" />
+ <input id="nw-vlan-interface-textbox" class="form-control" name="NAME" type="text" required="true" title=" "/>
</div>
</div>
<div class="form-group">
@@ -62,7 +62,7 @@
<div class="form-group">
<label class="control-label col-sm-4" for="nw-vlan-vlanid-textbox">$_("VLAN Id")</label>
<div class="col-sm-8 col-xs-3">
- <input id="nw-vlan-vlanid-textbox" class="form-control" name="VLANID" type="text" required="true" />
+ <input id="nw-vlan-vlanid-textbox" class="form-control" name="VLANID" type="text" required="true" title=" "/>
</div>
</div>
@@ -78,7 +78,7 @@
<label class="control-label col-sm-8" for="nw-vlan-ipv4-init">$_("IPv4")</label>
<div class="col-sm-4">
<div class="make-switch">
- <input type="checkbox" checked="true" class="ipv4-on-off" id="nw-vlan-ipv4-init" />
+ <input type="checkbox" checked="true" class="ipv4-on-off" id="nw-vlan-ipv4-init" data-on-text=$_("ON") data-off-text=$_("OFF") data-handle-width="90"/>
</div>
</div>
</div>
@@ -136,7 +136,7 @@
<label class="control-label col-sm-8" for="nw-vlan-ipv6-init">$_("IPv6")</label>
<div class="col-sm-4">
<div class="make-switch">
- <input type="checkbox" checked="true" class="ipv6-on-off" id="nw-vlan-ipv6-init" />
+ <input type="checkbox" checked="true" class="ipv6-on-off" id="nw-vlan-ipv6-init" data-on-text=$_("ON") data-off-text=$_("OFF") data-handle-width="90"/>
</div>
</div>
</div>
diff --git a/ui/pages/i18n.json.tmpl b/ui/pages/i18n.json.tmpl
index dce9943..264dc9a 100644
--- a/ui/pages/i18n.json.tmpl
+++ b/ui/pages/i18n.json.tmpl
@@ -51,7 +51,7 @@
"GINNET0020M": "$_("successfully")",
"GINNET0021M": "$_("failed!")",
"GINNET0022M": "$_("Either no network interface or multiple network interfaces selected. Please select one.")",
- "GINNET0024M": "$_("Global DNS and Gateway applied ")",
+ "GINNET0024M": "$_("Global DNS and Gateway applied Successfully")",
"GINNET0025M": "$_("Please wait...")",
"GINNET0026M": "$_("Create")",
"GINNET0027M": "$_("Update")",
@@ -115,12 +115,14 @@
"GINNET0088M": "$_("Failed to create the interface %1.")",
"GINNET0089M": "$_("Successfully updated the interface %1.")",
"GINNET0090M": "$_("Failed to update the interface %1.")",
+ "GINNET0091M": "$_("Global DNS and Gateway failed to apply")",
"GINBG00001M": "$_("Loading...")",
"GINBG00002M": "$_("Filter")",
"GINBG00003M": "$_("Actions")",
"GINBG00004M": "$_("Add")",
"GINBG00005M": "$_("Showing {{ctx.start}} to {{ctx.end}} of {{ctx.total}} entries")",
+ "GINBG00006M": "$_("invalid field")",
"GINUM0002E": "$_("The two passwords entered do not match.")",
"GINUM0003E": "$_("not integer.")",
--
2.1.0