Merge pull request #5499 from ryanpetrello/fix-5420

mark ON/OFF i18n for certain toggle switches
This commit is contained in:
Ryan Petrello 2017-02-21 16:53:32 -05:00 committed by GitHub
commit dc275b757e

View File

@ -449,8 +449,8 @@ angular.module('GeneratorHelpers', [systemStatus.name])
};
}])
.factory('Column', ['Attr', 'Icon', 'DropDown', 'Badge', 'BadgeCount', 'BuildLink', 'Template',
function (Attr, Icon, DropDown, Badge, BadgeCount, BuildLink, Template) {
.factory('Column', ['i18n', 'Attr', 'Icon', 'DropDown', 'Badge', 'BadgeCount', 'BuildLink', 'Template',
function (i18n, Attr, Icon, DropDown, Badge, BadgeCount, BuildLink, Template) {
return function (params) {
var list = params.list,
fld = params.fld,
@ -515,11 +515,11 @@ angular.module('GeneratorHelpers', [systemStatus.name])
html += (field.ngDisabled) ? `ng-disabled="${field.ngDisabled}" ` : "";
html += "ng-show='" + list.iterator + "." ;
html += (field.flag) ? field.flag : 'enabled';
html += "' class='ScheduleToggle-switch is-on' ng-click='" + field.ngClick + "'>ON</button><button ";
html += "' class='ScheduleToggle-switch is-on' ng-click='" + field.ngClick + "'>" + i18n._("ON") + "</button><button ";
html += (field.ngDisabled) ? `ng-disabled="${field.ngDisabled}" ` : "";
html += "ng-show='!" + list.iterator + "." ;
html += (field.flag) ? field.flag : "enabled";
html += "' class='ScheduleToggle-switch' ng-click='" + field.ngClick + "'>OFF</button></div></td>";
html += "' class='ScheduleToggle-switch' ng-click='" + field.ngClick + "'>" + i18n._("OFF") + "</button></div></td>";
} else {
html += "<td class=\"List-tableCell " + fld + "-column";
html += (field['class']) ? " " + field['class'] : "";