Skip to content

Commit

Permalink
fix(locales): align keys to rhsm types
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera committed Dec 16, 2019
1 parent e4430bb commit 287972c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions public/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"dropdownPlaceholder": "Select date range",
"noDataLabel": "No data",
"dateLabel": "Date",
"productHypervisorLabel": "Virtualized {{product}}",
"productSocketsLabel": "Physical {{product}}",
"hypervisorSocketsLabel": "Virtualized {{product}}",
"physicalSocketsLabel": "Physical {{product}}",
"thresholdLabel": "Subscription threshold"
},
"curiosity-tour": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ exports[`RhelGraphCard Component should render a non-connected component: non-co
"fill": "#8bc1f7",
"id": "physicalSockets",
"isStacked": true,
"legendLabel": "t(curiosity-graph.productSocketsLabel, [object Object])",
"legendLabel": "t(curiosity-graph.physicalSocketsLabel, [object Object])",
"stroke": "#06c",
},
Object {
Expand All @@ -75,7 +75,7 @@ exports[`RhelGraphCard Component should render a non-connected component: non-co
"fill": "#a2d9d9",
"id": "hypervisorSockets",
"isStacked": true,
"legendLabel": "t(curiosity-graph.productHypervisorLabel, [object Object])",
"legendLabel": "t(curiosity-graph.hypervisorSocketsLabel, [object Object])",
"stroke": "#009596",
},
Object {
Expand Down Expand Up @@ -145,7 +145,7 @@ Object {
"fill": "#8bc1f7",
"id": "physicalSockets",
"isStacked": true,
"legendLabel": "t(curiosity-graph.productSocketsLabel, [object Object])",
"legendLabel": "t(curiosity-graph.physicalSocketsLabel, [object Object])",
"stroke": "#06c",
},
Object {
Expand All @@ -159,7 +159,7 @@ Object {
"fill": "#a2d9d9",
"id": "hypervisorSockets",
"isStacked": true,
"legendLabel": "t(curiosity-graph.productHypervisorLabel, [object Object])",
"legendLabel": "t(curiosity-graph.hypervisorSocketsLabel, [object Object])",
"stroke": "#009596",
},
Object {
Expand Down Expand Up @@ -268,7 +268,7 @@ exports[`RhelGraphCard Component should render multiple states: fulfilled 1`] =
"fill": "#8bc1f7",
"id": "physicalSockets",
"isStacked": true,
"legendLabel": "t(curiosity-graph.productSocketsLabel, [object Object])",
"legendLabel": "t(curiosity-graph.physicalSocketsLabel, [object Object])",
"stroke": "#06c",
},
Object {
Expand All @@ -282,7 +282,7 @@ exports[`RhelGraphCard Component should render multiple states: fulfilled 1`] =
"fill": "#a2d9d9",
"id": "hypervisorSockets",
"isStacked": true,
"legendLabel": "t(curiosity-graph.productHypervisorLabel, [object Object])",
"legendLabel": "t(curiosity-graph.hypervisorSocketsLabel, [object Object])",
"stroke": "#009596",
},
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ Object {
exports[`RhelGraphCardHelpers getTooltips should return a formatted tooltip based on data and granularity: granularity data display 1`] = `
Object {
"daily": "t(curiosity-graph.thresholdLabel): 100
t(curiosity-graph.productSocketsLabel, [object Object]): 50
t(curiosity-graph.productHypervisorLabel, [object Object]): 50
t(curiosity-graph.physicalSocketsLabel, [object Object]): 50
t(curiosity-graph.hypervisorSocketsLabel, [object Object]): 50
t(curiosity-graph.dateLabel): June 1",
"monthly": "t(curiosity-graph.thresholdLabel): 100
t(curiosity-graph.productSocketsLabel, [object Object]): 50
t(curiosity-graph.productHypervisorLabel, [object Object]): 50
t(curiosity-graph.physicalSocketsLabel, [object Object]): 50
t(curiosity-graph.hypervisorSocketsLabel, [object Object]): 50
t(curiosity-graph.dateLabel): June 2019",
"quarterly": "t(curiosity-graph.thresholdLabel): 100
t(curiosity-graph.productSocketsLabel, [object Object]): 50
t(curiosity-graph.productHypervisorLabel, [object Object]): 50
t(curiosity-graph.physicalSocketsLabel, [object Object]): 50
t(curiosity-graph.hypervisorSocketsLabel, [object Object]): 50
t(curiosity-graph.dateLabel): June 2019",
"weekly": "t(curiosity-graph.thresholdLabel): 100
t(curiosity-graph.productSocketsLabel, [object Object]): 50
t(curiosity-graph.productHypervisorLabel, [object Object]): 50
t(curiosity-graph.physicalSocketsLabel, [object Object]): 50
t(curiosity-graph.hypervisorSocketsLabel, [object Object]): 50
t(curiosity-graph.dateLabel): June 1",
}
`;
Expand Down
4 changes: 2 additions & 2 deletions src/components/rhelGraphCard/rhelGraphCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class RhelGraphCard extends React.Component {
},
fill: chartColorBlueLight.value,
stroke: chartColorBlueDark.value,
legendLabel: t('curiosity-graph.productSocketsLabel', { product: 'RHEL' }),
legendLabel: t('curiosity-graph.physicalSocketsLabel', { product: 'RHEL' }),
isStacked: true
},
{
Expand All @@ -107,7 +107,7 @@ class RhelGraphCard extends React.Component {
},
fill: chartColorCyanLight.value,
stroke: chartColorCyanDark.value,
legendLabel: t('curiosity-graph.productHypervisorLabel', { product: 'RHEL' }),
legendLabel: t('curiosity-graph.hypervisorSocketsLabel', { product: 'RHEL' }),
isStacked: true
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/components/rhelGraphCard/rhelGraphCardHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ const getTooltips = ({ itemsByKey, granularity }) => {
let threshold = itemsByKey.threshold && itemsByKey.threshold.y;

hypervisor =
(hypervisor && `${translate('curiosity-graph.productHypervisorLabel', { product: 'RHEL' })}: ${hypervisor}`) || '';
(hypervisor && `${translate('curiosity-graph.hypervisorSocketsLabel', { product: 'RHEL' })}: ${hypervisor}`) || '';

sockets = (sockets && `${translate('curiosity-graph.productSocketsLabel', { product: 'RHEL' })}: ${sockets}`) || '';
sockets = (sockets && `${translate('curiosity-graph.physicalSocketsLabel', { product: 'RHEL' })}: ${sockets}`) || '';
threshold = (threshold && `${translate('curiosity-graph.thresholdLabel')}: ${threshold}`) || '';

const date =
Expand Down

0 comments on commit 287972c

Please sign in to comment.