Skip to content

Commit

Permalink
Merge pull request #4345 from mzazrivec/add_missing_gettext_into_angu…
Browse files Browse the repository at this point in the history
…lar_controllers

Add missing gettext into angular controllers
  • Loading branch information
martinpovolny committed Jul 25, 2018
2 parents 0f8329d + d1d21c3 commit 46260de
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 24 deletions.
Expand Up @@ -70,7 +70,7 @@ function cloudSubnetFormController(API, miqService) {
vm.resetClicked = function(angularForm) {
vm.cloudSubnetModel = angular.copy( vm.modelCopy );
angularForm.$setPristine(true);
miqService.miqFlash("warn", _('All changes have been reset'));
miqService.miqFlash("warn", __('All changes have been reset'));
};

vm.filterNetworkManagerChanged = function(id) {
Expand Down
Expand Up @@ -464,7 +464,7 @@ ManageIQ.angular.app.controller('catalogItemFormController', ['$scope', 'catalog
$scope.angularForm.$setValidity('unchanged', true);

if (vm.dialogs.filter(function(e) { return e.label === vm.catalogItemModel.provisioning_dialog_name; }).length > 0) {
miqService.miqFlash('error', 'Dialog name already exists');
miqService.miqFlash('error', __('Dialog name already exists'));
$scope.angularForm.$setValidity('unchanged', false);
}
};
Expand Down
Expand Up @@ -53,6 +53,6 @@ ManageIQ.angular.app.controller('cloudTenantFormController', ['$http', '$scope',
vm.resetClicked = function() {
vm.cloudTenantModel = angular.copy( vm.modelCopy );
$scope.angularForm.$setPristine(true);
miqService.miqFlash("warn", "All changes have been reset");
miqService.miqFlash("warn", __('All changes have been reset'));
};
}]);
Expand Up @@ -110,7 +110,7 @@ ManageIQ.angular.app.controller('cloudVolumeFormController', ['miqService', 'API
vm.resetClicked = function(angularForm) {
vm.cloudVolumeModel = angular.copy(vm.modelCopy);
angularForm.$setPristine(true);
miqService.miqFlash('warn', 'All changes have been reset');
miqService.miqFlash('warn', __('All changes have been reset'));
};

vm.storageManagerChanged = function(id) {
Expand Down Expand Up @@ -196,18 +196,18 @@ ManageIQ.angular.app.controller('cloudVolumeFormController', ['miqService', 'API
var loadEBSVolumeTypes = function() {
// This ia a fixed list of available cloud volume types for Amazon EBS.
vm.awsVolumeTypes = [
{ type: 'gp2', name: 'General Purpose SSD (GP2)' },
{ type: 'io1', name: 'Provisioned IOPS SSD (IO1)' },
{ type: 'st1', name: 'Throughput Optimized HDD (ST1)' },
{ type: 'sc1', name: 'Cold HDD (SC1)' },
{ type: 'gp2', name: __('General Purpose SSD (GP2)') },
{ type: 'io1', name: __('Provisioned IOPS SSD (IO1)') },
{ type: 'st1', name: __('Throughput Optimized HDD (ST1)') },
{ type: 'sc1', name: __('Cold HDD (SC1)') },
];

// Standard volume type is available only when creating new volume or editing
// an existing standard volume. In the latter case, it is only available so
// that the "Magnetic (standard)" option can be picked in the select that is
// otherwise disabled.
if (vm.newRecord || vm.cloudVolumeModel.aws_volume_type === 'standard') {
vm.awsVolumeTypes.push({ type: 'standard', name: 'Magnetic' });
vm.awsVolumeTypes.push({ type: 'standard', name: __('Magnetic') });
}
};

Expand Down
Expand Up @@ -38,7 +38,7 @@ ManageIQ.angular.app.controller('cloudVolumeBackupFormController', ['miqService'
vm.resetClicked = function(angularForm) {
resetModel();
angularForm.$setPristine(true);
miqService.miqFlash("warn", "All changes have been reset");
miqService.miqFlash("warn", __("All changes have been reset"));
};

function getVolumeFormDataComplete(response) {
Expand Down
Expand Up @@ -69,7 +69,7 @@ miqHttpInject(angular.module('miq.containers.providersModule')).controller('cont
},
{
name: __('Remove VM(s)'),
title: 'Clear the selected items.',
title: __('Clear the selected items.'),
actionFn: removeItems
}
]
Expand Down
Expand Up @@ -236,13 +236,13 @@ miqHttpInject(angular.module('miq.containers.providersModule')).controller('cont
{
id: 'name',
title: __('Name'),
placeholder: 'Filter by Name...',
placeholder: __('Filter by Name...'),
filterType: 'text'
},
{
id: 'role',
title: __('Role'),
placeholder: 'Filter by Role...',
placeholder: __('Filter by Role...'),
filterType: 'select',
filterValues: ['Unset', 'Master', 'Node', 'Storage', 'Load Balancer', 'DNS', 'Etcd', 'Infrastructure']
}
Expand Down
Expand Up @@ -21,7 +21,7 @@ angular.module( 'patternfly.charts' ).controller('heatmapController', ['$q', 'pr
});

vm.dataAvailable = true;
vm.titleAlt = 'Utilization - Overriding Defaults';
vm.titleAlt = __('Utilization - Overriding Defaults');
vm.legendLabels = ['< 60%', '70%', '70-80%', '80-90%', '> 90%'];
vm.rangeTooltips = ['Memory Utilization < 70%<br\>40 Nodes', 'Memory Utilization 70-80%<br\>4 Nodes', 'Memory Utilization 80-90%<br\>4 Nodes', 'Memory Utilization > 90%<br\>4 Nodes'];
vm.thresholds = [0.6, 0.7, 0.8, 0.9];
Expand All @@ -30,8 +30,8 @@ angular.module( 'patternfly.charts' ).controller('heatmapController', ['$q', 'pr
};

var heatmapTitles = {
"clusterCpuUsage": "CPU",
"clusterMemoryUsage": "Memory",
"clusterCpuUsage": __("CPU"),
"clusterMemoryUsage": __("Memory"),
};

var processHeatmapData = function(heatmapsStruct, data) {
Expand Down
Expand Up @@ -18,7 +18,7 @@ angular.module( 'patternfly.charts' ).controller('utilizationTrendChartControlle
vm.loadingDone = true;
});

vm.title = "Global Utilization";
vm.title = __("Global Utilization");
vm.centerLabel = 'used';
vm.custShowXAxis = false;
vm.custShowYAxis = false;
Expand Down
Expand Up @@ -15,7 +15,7 @@ angular.module( 'patternfly.charts' ).controller( 'serverHealthPieChartControlle
})
.catch(miqService.handleFailure);

vm.title = "Servers Data";
vm.title = __("Servers Data");
vm.dataAvailable = false;
vm.timeframeLabel = __('Last 30 Days');

Expand Down
Expand Up @@ -76,7 +76,7 @@ ManageIQ.angular.app.controller('hostAggregateFormController', ['$http', '$scope
$scope.resetClicked = function() {
$scope.hostAggregateModel = angular.copy( $scope.modelCopy );
$scope.angularForm.$setPristine(true);
miqService.miqFlash("warn", "All changes have been reset");
miqService.miqFlash("warn", __("All changes have been reset"));
};

function getHostAggregateFormData(response) {
Expand Down
Expand Up @@ -113,7 +113,7 @@ ManageIQ.angular.app.controller('pglogicalReplicationFormController', ['$http',
$scope.pglogicalReplicationModel.user = subscription.user;
$scope.pglogicalReplicationModel.password = subscription.password;
$scope.pglogicalReplicationModel.port = subscription.port;
} else if (confirm("An updated subscription must point to the same database with which it was originally created. Failure to do so will result in undefined behavior. Do you want to continue?")) {
} else if (confirm(__("An updated subscription must point to the same database with which it was originally created. Failure to do so will result in undefined behavior. Do you want to continue?"))) {
$scope.pglogicalReplicationModel.s_index = idx;
$scope.pglogicalReplicationModel.updateEnabled = true;
$scope.pglogicalReplicationModel.dbname = subscription.dbname;
Expand Down Expand Up @@ -153,7 +153,7 @@ ManageIQ.angular.app.controller('pglogicalReplicationFormController', ['$http',
$scope.pglogicalReplicationModel.subscriptions.splice(idx, 1);
if (angular.equals($scope.pglogicalReplicationModel.subscriptions, $scope.modelCopy.subscriptions))
$scope.angularForm.$setPristine(true);
} else if (confirm("Deleting a subscription will remove all replicated data which originated in the selected region. Do you want to continue?"))
} else if (confirm(__("Deleting a subscription will remove all replicated data which originated in the selected region. Do you want to continue?")))
subscription.remove = true;
};

Expand Down
Expand Up @@ -106,7 +106,7 @@ ManageIQ.angular.app.controller('securityGroupFormController', ['securityGroupFo
}
}
angularForm.$setPristine(true);
miqService.miqFlash("warn", "All changes have been reset");
miqService.miqFlash("warn", __("All changes have been reset"));
};

vm.filterNetworkManagerChanged = miqService.getProviderTenants(function(data) {
Expand Down
Expand Up @@ -22,6 +22,6 @@ ManageIQ.angular.app.controller('vmCloudAttachFormController', ['$scope', 'vmClo

$scope.resetClicked = function() {
vm.vmCloudModel = angular.copy(vm.modelCopy);
miqService.miqFlash("warn", "All changes have been reset");
miqService.miqFlash("warn", __("All changes have been reset"));
};
}]);
Expand Up @@ -22,6 +22,6 @@ ManageIQ.angular.app.controller('vmCloudDetachFormController', ['$scope', 'vmClo

$scope.resetClicked = function() {
vm.vmCloudModel = angular.copy(vm.modelCopy);
miqService.miqFlash("warn", "All changes have been reset");
miqService.miqFlash("warn", __("All changes have been reset"));
};
}]);

0 comments on commit 46260de

Please sign in to comment.