Skip to content

Commit

Permalink
Merge pull request #4359 from mzazrivec/add_missing_gettext_into_pf_c…
Browse files Browse the repository at this point in the history
…harts

Add missing gettext into patternfly charts
  • Loading branch information
martinpovolny committed Jul 27, 2018
2 parents ca578d7 + 1dd7f42 commit 178f11f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Expand Up @@ -88,8 +88,8 @@ function donutPctChartController(pfUtils) {
vm.getDonutData = function() {
return {
columns: [
['Used', vm.data.used],
['Available', vm.data.available],
[__('Used'), vm.data.used],
[__('Available'), vm.data.available],
],
type: 'donut',
donut: {
Expand All @@ -109,7 +109,7 @@ function donutPctChartController(pfUtils) {

// default to 'used' info.
centerLabelText = { bigText: vm.data.used,
smText: vm.config.units + ' Used' };
smText: vm.config.units + __(' Used') };

if (vm.config.centerLabelFn) {
centerLabelText.bigText = vm.config.centerLabelFn();
Expand All @@ -119,10 +119,10 @@ function donutPctChartController(pfUtils) {
centerLabelText.smText = '';
} else if (vm.centerLabel === 'available') {
centerLabelText.bigText = vm.data.available;
centerLabelText.smText = vm.config.units + ' Available';
centerLabelText.smText = vm.config.units + __(' Available');
} else if (vm.centerLabel === 'percent') {
centerLabelText.bigText = Math.round(vm.data.used / vm.data.total * 100.0) + '%';
centerLabelText.smText = 'of ' + vm.data.total + ' ' + vm.config.units;
centerLabelText.smText = __('of ') + vm.data.total + ' ' + vm.config.units;
}

return centerLabelText;
Expand Down
Expand Up @@ -41,10 +41,10 @@ function utilizationTrendChartController() {

if (vm.centerLabel === 'available') {
vm.currentValue = vm.chartData.used;
vm.currentText = 'Used';
vm.currentText = __('Used');
} else {
vm.currentValue = vm.chartData.total - vm.chartData.used;
vm.currentText = 'Available';
vm.currentText = __('Available');
}
};

Expand Down

0 comments on commit 178f11f

Please sign in to comment.