luci-base: Improve change application message
authorKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Thu, 14 Nov 2019 10:53:56 +0000 (10:53 +0000)
committerJo-Philipp Wich <jo@mein.io>
Thu, 7 May 2020 17:40:48 +0000 (19:40 +0200)
As a native English speaker the luci message displayed when clicking
'Save & Apply' has a somewhat uncomfortable English phrasing of "Waiting
for configuration to get applied".  It could be improved by replacing
'get' with 'be' but once you've got that far you might as well replace
this with the shorter & simpler "Applying configuration changes".  This
is also technically more correct since luci/openwrt should only be
updating/restarting processes that are related to the changed areas, not
changing the entire configuration.

As a result of that, change both the 'success' and 'rolled back'
messages to "Configuration changes have been applied" & "Configuration
changes have been rolled back"

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit 9b266d11c6b5082c733f101326160cef797f6edf)

modules/luci-base/htdocs/luci-static/resources/ui.js

index 2e295077fb18788549ede654c206a0fab352bdf5..52c1025bf84435d3053ad455e93490e17965ce4a 100644 (file)
@@ -3839,7 +3839,7 @@ return L.Class.extend(/** @lends LuCI.ui.prototype */ {
                                var call = function(r, data, duration) {
                                        if (r.status === 204) {
                                                L.ui.changes.displayStatus('warning', [
-                                                       E('h4', _('Configuration has been rolled back!')),
+                                                       E('h4', _('Configuration changes have been rolled back!')),
                                                        E('p', _('The device could not be reached within %d seconds after applying the pending changes, which caused the configuration to be rolled back for safety reasons. If you believe that the configuration changes are correct nonetheless, perform an unchecked configuration apply. Alternatively, you can dismiss this warning and edit changes before attempting to apply again, or revert all pending changes to keep the currently working configuration state.').format(L.env.apply_rollback)),
                                                        E('div', { 'class': 'right' }, [
                                                                E('button', {
@@ -3901,7 +3901,7 @@ return L.Class.extend(/** @lends LuCI.ui.prototype */ {
 
                                        L.ui.changes.setIndicator(0);
                                        L.ui.changes.displayStatus('notice',
-                                               E('p', _('Configuration has been applied.')));
+                                               E('p', _('Configuration changes applied.')));
 
                                        window.clearTimeout(tt);
                                        window.setTimeout(function() {
@@ -3926,7 +3926,7 @@ return L.Class.extend(/** @lends LuCI.ui.prototype */ {
                                var now = Date.now();
 
                                L.ui.changes.displayStatus('notice spinning',
-                                       E('p', _('Waiting for configuration to get applied… %ds')
+                                       E('p', _('Applying configuration changes… %ds')
                                                .format(Math.max(Math.floor((deadline - Date.now()) / 1000), 0))));
 
                                if (now >= deadline)