Skip to content

Commit 1aef8ce

Browse files
committed
MAGETWO-44043: Wording error in readiness check
- Fixes for all possible uses of readiness-check
1 parent 2110017 commit 1aef8ce

File tree

3 files changed

+35
-5
lines changed

3 files changed

+35
-5
lines changed

setup/pub/magento/setup/component-grid.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,12 @@ angular.module('component-grid', ['ngStorage'])
117117
if ($localStorage.titles['update'].indexOf(component.moduleName) < 0 ) {
118118
$localStorage.titles['update'] = 'Update ' + component.moduleName;
119119
}
120-
$localStorage.moduleName = component.moduleName;
120+
if (component.moduleName) {
121+
$localStorage.moduleName = component.moduleName;
122+
} else {
123+
$localStorage.moduleName = component.name;
124+
}
125+
121126
$scope.nextState();
122127
};
123128

@@ -131,7 +136,11 @@ angular.module('component-grid', ['ngStorage'])
131136
$localStorage.titles['uninstall'] = 'Uninstall ' + component.moduleName;
132137
}
133138
$localStorage.componentType = component.type;
134-
$localStorage.moduleName = component.moduleName;
139+
if (component.moduleName) {
140+
$localStorage.moduleName = component.moduleName;
141+
} else {
142+
$localStorage.moduleName = component.name;
143+
}
135144
$state.go('root.readiness-check-uninstall');
136145
};
137146

setup/pub/magento/setup/readiness-check.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,4 +334,27 @@ angular.module('readiness-check', [])
334334
$scope.progress();
335335
}
336336
});
337+
338+
$scope.wordingOfReadinessCheckAction = function() {
339+
var $actionString = 'We\'re making sure your server environment is ready for ';
340+
if ($localStorage.moduleName) {
341+
$actionString += $localStorage.moduleName;
342+
} else {
343+
if($state.current.type === 'install' || $state.current.type === 'upgrade') {
344+
$actionString += 'Magento';
345+
if ($state.current.type === 'upgrade' && $localStorage.packages.length > 1 ) {
346+
$actionString += ' and Selected Components';
347+
}
348+
} else {
349+
$actionString += $localStorage.titles[$state.current.type];
350+
}
351+
}
352+
$actionString += " to be " + $state.current.type;
353+
if ($scope.endsWith($state.current.type, 'e')) {
354+
$actionString += 'd';
355+
} else {
356+
$actionString +='ed';
357+
}
358+
return $actionString;
359+
}
337360
}]);

setup/view/magento/setup/readiness-check/progress.phtml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@
3030
<span></span><span></span><span></span><span></span>
3131
<span></span><span></span><span></span><span></span>
3232
</span>
33-
<span class="message-text">We're making sure your server environment is ready for
34-
{{moduleName ? moduleName : ($state.current.type === 'install'? 'Magento' : titles[$state.current.type])}}
35-
to be {{$state.current.type}}{{endsWith($state.current.type, 'e') ? 'd' : 'ed'}}.</span>
33+
<span class="message-text">{{wordingOfReadinessCheckAction()}}.</span>
3634
</div>
3735

3836
</div>

0 commit comments

Comments
 (0)