Skip to content

Commit

Permalink
fix(locale): ent-4251 graph string key restructure (#775)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera committed Sep 22, 2021
1 parent 92d38bb commit 940fd22
Show file tree
Hide file tree
Showing 11 changed files with 132 additions and 141 deletions.
55 changes: 27 additions & 28 deletions public/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"dataMismatchMessage_cloudigradeMismatch": "<0>View recommended actions</0> to take in order to improve {{appName}} reporting."
},
"curiosity-graph": {
"card-action-total": "{{total}} used",
"card-action-total_coreHours": "{{total}} core hours used",
"cardActionTotal": "{{total}} used",
"cardActionTotal_coreHours": "{{total}} core hours used",
"cardHeading": "CPU usage",
"cardHeading_cores": "CPU core usage",
"cardHeading_sockets": "CPU socket usage",
Expand All @@ -29,33 +29,32 @@
"cardHeadingDescription_OpenShift Container Platform": "A pre-paid subscription model that offers a designated maximum quota of units within a set time frame.",
"cardHeadingDescription_OpenShift-metrics": "A subscription model that offers purchasing options to match your usage patterns.",
"cardHeadingDescription_OpenShift-dedicated-metrics": "A subscription model that offers purchasing options to match your usage patterns.",
"infiniteThresholdLabel": "unlimited",
"noLabel": "Data",
"noDataLabel": "no data",
"noDataErrorLabel": "No data",
"dateLabel": "Date",
"coresLabel": "Cores",
"coresLegendTooltip": "{{product}} CPU usage, per CPU core.",
"coreHoursLabel": "Core hours",
"coreHoursLegendTooltip": "{{product}} core hours usage.",
"coreHoursLegendTooltip_OpenShift-dedicated-metrics": "OpenShift Dedicated core hours usage.",
"instanceHoursLabel": "Instance hours",
"instanceHoursLegendTooltip_OpenShift-dedicated-metrics": "OpenShift Dedicated instance hours usage.",
"socketsLabel": "Sockets",
"socketsLegendTooltip": "{{product}} CPU usage, per CPU socket pair.",
"cloudSocketsLabel": "Public cloud",
"cloudSocketsLegendTooltip": "Public cloud {{product}} CPU usage, 1 CPU socket per instance.",
"hypervisorCoresLabel": "Virtualized cores",
"hypervisorCoresLegendTooltip": "{{product}} CPU usage, per CPU core.",
"hypervisorSocketsLabel": "Virtualized {{product}}",
"hypervisorSocketsLegendTooltip": "{{product}} CPU socket usage, per socket pair.",
"hypervisorSocketsLegendTooltip_RHEL": "Virtualized {{product}} CPU usage, per socket. Hypervisor guest usage with known host-guest mappings (such as multi-guest VDC subscriptions), per socket pair of the hypervisor host, using the same method as physical {{product}}.",
"physicalCoresLabel": "Physical cores",
"physicalCoresLegendTooltip": "{{product}} CPU usage, per CPU core.",
"physicalSocketsLabel": "Physical {{product}}",
"physicalSocketsLegendTooltip": "{{product}} CPU socket usage, per socket pair.",
"physicalSocketsLegendTooltip_RHEL": "Physical {{product}} CPU usage, per socket pair. Each system's socket count is rounded upwards to the next even number.",
"label_cores": "Cores",
"label_coreHours": "Core hours",
"label_instanceHours": "Instance hours",
"label_sockets": "Sockets",
"label_cloudSockets": "Public cloud",
"label_hypervisorCores": "Virtualized cores",
"label_hypervisorSockets": "Virtualized {{product}}",
"label_physicalCores": "Physical cores",
"label_physicalSockets": "Physical {{product}}",
"label_no": "Data",
"label_noData": "no data",
"label_noData_error": "No data",
"label_threshold": "Subscription threshold",
"label_threshold_infinite": "unlimited",
"legendTooltip_cores": "{{product}} CPU usage, per CPU core.",
"legendTooltip_coreHours": "{{product}} core hours usage.",
"legendTooltip_coreHours_OpenShift-dedicated-metrics": "OpenShift Dedicated core hours usage.",
"legendTooltip_instanceHours_OpenShift-dedicated-metrics": "OpenShift Dedicated instance hours usage.",
"legendTooltip_cloudSockets": "Public cloud {{product}} CPU usage, 1 CPU socket per instance.",
"legendTooltip_hypervisorCores": "{{product}} CPU usage, per CPU core.",
"legendTooltip_hypervisorSockets": "{{product}} CPU socket usage, per socket pair.",
"legendTooltip_hypervisorSockets_RHEL": "Virtualized {{product}} CPU usage, per socket. Hypervisor guest usage with known host-guest mappings (such as multi-guest VDC subscriptions), per socket pair of the hypervisor host, using the same method as physical {{product}}.",
"legendTooltip_physicalCores": "{{product}} CPU usage, per CPU core.",
"legendTooltip_physicalSockets": "{{product}} CPU socket usage, per socket pair.",
"legendTooltip_physicalSockets_RHEL": "Physical {{product}} CPU usage, per socket pair. Each system's socket count is rounded upwards to the next even number.",
"legendTooltip_sockets": "{{product}} CPU usage, per CPU socket pair.",
"legendTooltip_threshold": "Maximum capacity, based on total {{product}} subscriptions in this account.",
"legendTooltip_threshold_thresholdSockets_RHEL": "Maximum capacity, as CPU sockets, based on total {{product}} subscriptions in this account.",
"legendTooltip_threshold_thresholdCores_OpenShift Container Platform": "Maximum capacity, as CPU cores, based on total {{product}} Annual subscriptions in this account.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ exports[`GraphCardChartLegend Component should handle a click event: click event
tabIndex={0}
variant="link"
>
t(curiosity-graph.loremIpsumLabel,curiosity-graph.noLabel, {"product":"test","context":"test"})
t(curiosity-graph.label_loremIpsum,curiosity-graph.label_no, {"product":"test","context":"test"})
</Button>
`;

Expand Down Expand Up @@ -52,7 +52,7 @@ exports[`GraphCardChartLegend Component should handle a click event: click event
tabIndex={0}
variant="link"
>
t(curiosity-graph.loremIpsumLabel,curiosity-graph.noLabel, {"product":"test","context":"test"})
t(curiosity-graph.label_loremIpsum,curiosity-graph.label_no, {"product":"test","context":"test"})
</Button>
`;

Expand All @@ -75,7 +75,7 @@ exports[`GraphCardChartLegend Component should handle a click event: click event
tabIndex={0}
variant="link"
>
t(curiosity-graph.loremIpsumLabel,curiosity-graph.noLabel, {"product":"test","context":"test"})
t(curiosity-graph.label_loremIpsum,curiosity-graph.label_no, {"product":"test","context":"test"})
</Button>
`;

Expand Down Expand Up @@ -171,7 +171,7 @@ exports[`GraphCardChartLegend Component should render a basic component: basic 1
<Tooltip
content={
<p>
t(curiosity-graph.loremIpsumLegendTooltip, {"product":"","context":""})
t(curiosity-graph.legendTooltip_loremIpsum, {"product":"","context":""})
</p>
}
distance={5}
Expand Down Expand Up @@ -202,7 +202,7 @@ exports[`GraphCardChartLegend Component should render a basic component: basic 1
tabIndex={0}
variant="link"
>
t(curiosity-graph.loremIpsumLabel,curiosity-graph.noLabel, {"product":"","context":""})
t(curiosity-graph.label_loremIpsum,curiosity-graph.label_no, {"product":"","context":""})
</Button>
</Tooltip>
</Fragment>
Expand All @@ -213,7 +213,7 @@ exports[`GraphCardChartLegend Component should render basic data: data 1`] = `
<Tooltip
content={
<p>
t(curiosity-graph.loremIpsumLegendTooltip, {"product":"test","context":"test"})
t(curiosity-graph.legendTooltip_loremIpsum, {"product":"test","context":"test"})
</p>
}
distance={5}
Expand Down Expand Up @@ -244,13 +244,13 @@ exports[`GraphCardChartLegend Component should render basic data: data 1`] = `
tabIndex={0}
variant="link"
>
t(curiosity-graph.loremIpsumLabel,curiosity-graph.noLabel, {"product":"test","context":"test"})
t(curiosity-graph.label_loremIpsum,curiosity-graph.label_no, {"product":"test","context":"test"})
</Button>
</Tooltip>
<Tooltip
content={
<p>
t(curiosity-graph.ametConsecteturLegendTooltip, {"product":"test","context":"test"})
t(curiosity-graph.legendTooltip_ametConsectetur, {"product":"test","context":"test"})
</p>
}
distance={5}
Expand All @@ -276,13 +276,13 @@ exports[`GraphCardChartLegend Component should render basic data: data 1`] = `
tabIndex={0}
variant="link"
>
t(curiosity-graph.ametConsecteturLabel,curiosity-graph.noLabel, {"product":"test","context":"test"})
t(curiosity-graph.label_ametConsectetur,curiosity-graph.label_no, {"product":"test","context":"test"})
</Button>
</Tooltip>
<Tooltip
content={
<p>
t(curiosity-graph.legendTooltip_threshold, {"product":"test","context":"dolorSit_test"})
t(curiosity-graph.legendTooltip_threshold_dolorSit, {"product":"test","context":"test"})
</p>
}
distance={5}
Expand Down Expand Up @@ -313,13 +313,13 @@ exports[`GraphCardChartLegend Component should render basic data: data 1`] = `
tabIndex={0}
variant="link"
>
t(curiosity-graph.label_threshold, {"product":"test","context":"dolorSit_test"})
t(curiosity-graph.label_threshold,curiosity-graph.label_no, {"product":"test","context":"test"})
</Button>
</Tooltip>
<Tooltip
content={
<p>
t(curiosity-graph.legendTooltip_threshold, {"product":"test","context":"nonCursus_test"})
t(curiosity-graph.legendTooltip_threshold_nonCursus, {"product":"test","context":"test"})
</p>
}
distance={5}
Expand Down Expand Up @@ -350,7 +350,7 @@ exports[`GraphCardChartLegend Component should render basic data: data 1`] = `
tabIndex={0}
variant="link"
>
t(curiosity-graph.label_threshold, {"product":"test","context":"nonCursus_test"})
t(curiosity-graph.label_threshold,curiosity-graph.label_no, {"product":"test","context":"test"})
</Button>
</Tooltip>
</Fragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports[`GraphCardChartTooltip Component should render a basic component: basic
<table
summary="t(curiosity-graph.tooltipSummary)"
/>
t(curiosity-graph.noDataErrorLabel)
t(curiosity-graph.label_noData, {"context":"error"})
</div>
`;

Expand All @@ -29,7 +29,7 @@ exports[`GraphCardChartTooltip Component should render basic data: data 1`] = `
</thead>
<tbody>
<tr
key="tooltip-t(curiosity-graph.dolorSitLabel, {\\"product\\":\\"\\"})"
key="tooltip-t(curiosity-graph.label, {\\"context\\":\\"dolorSit\\",\\"product\\":\\"\\"})"
>
<th>
<ChartIcon
Expand All @@ -39,14 +39,14 @@ exports[`GraphCardChartTooltip Component should render basic data: data 1`] = `
title={null}
/>
t(curiosity-graph.dolorSitLabel, {"product":""})
t(curiosity-graph.label, {"context":"dolorSit","product":""})
</th>
<td>
1
</td>
</tr>
<tr
key="tooltip-t(curiosity-graph.loremIpsumLabel, {\\"product\\":\\"\\"})"
key="tooltip-t(curiosity-graph.label, {\\"context\\":\\"loremIpsum\\",\\"product\\":\\"\\"})"
>
<th>
<ChartIcon
Expand All @@ -56,7 +56,7 @@ exports[`GraphCardChartTooltip Component should render basic data: data 1`] = `
title={null}
/>
t(curiosity-graph.loremIpsumLabel, {"product":""})
t(curiosity-graph.label, {"context":"loremIpsum","product":""})
</th>
<td>
0
Expand All @@ -70,16 +70,16 @@ exports[`GraphCardChartTooltip Component should render basic data: data 1`] = `
exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: data display > 0 and NOT hasData on report 1`] = `
Object {
"daily": <td>
t(curiosity-graph.noDataLabel)
t(curiosity-graph.label_noData)
</td>,
"monthly": <td>
t(curiosity-graph.noDataLabel)
t(curiosity-graph.label_noData)
</td>,
"quarterly": <td>
t(curiosity-graph.noDataLabel)
t(curiosity-graph.label_noData)
</td>,
"weekly": <td>
t(curiosity-graph.noDataLabel)
t(curiosity-graph.label_noData)
</td>,
}
`;
Expand Down Expand Up @@ -121,16 +121,16 @@ Object {
exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: data display for null and NOT hasData on report 1`] = `
Object {
"daily": <td>
t(curiosity-graph.noDataLabel)
t(curiosity-graph.label_noData)
</td>,
"monthly": <td>
t(curiosity-graph.noDataLabel)
t(curiosity-graph.label_noData)
</td>,
"quarterly": <td>
t(curiosity-graph.noDataLabel)
t(curiosity-graph.label_noData)
</td>,
"weekly": <td>
t(curiosity-graph.noDataLabel)
t(curiosity-graph.label_noData)
</td>,
}
`;
Expand Down Expand Up @@ -172,16 +172,16 @@ Object {
exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: data display for zero and NOT hasData on report 1`] = `
Object {
"daily": <td>
t(curiosity-graph.noDataLabel)
t(curiosity-graph.label_noData)
</td>,
"monthly": <td>
t(curiosity-graph.noDataLabel)
t(curiosity-graph.label_noData)
</td>,
"quarterly": <td>
t(curiosity-graph.noDataLabel)
t(curiosity-graph.label_noData)
</td>,
"weekly": <td>
t(curiosity-graph.noDataLabel)
t(curiosity-graph.label_noData)
</td>,
}
`;
Expand Down Expand Up @@ -266,67 +266,67 @@ Object {
exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: threshold display for > 0 and hasInfinite on threshold 1`] = `
Object {
"daily": <td>
t(curiosity-graph.infiniteThresholdLabel)
t(curiosity-graph.label_threshold, {"context":"infinite"})
</td>,
"monthly": <td>
t(curiosity-graph.infiniteThresholdLabel)
t(curiosity-graph.label_threshold, {"context":"infinite"})
</td>,
"quarterly": <td>
t(curiosity-graph.infiniteThresholdLabel)
t(curiosity-graph.label_threshold, {"context":"infinite"})
</td>,
"weekly": <td>
t(curiosity-graph.infiniteThresholdLabel)
t(curiosity-graph.label_threshold, {"context":"infinite"})
</td>,
}
`;

exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: threshold display for null and NOT hasInfinite on threshold 1`] = `
Object {
"daily": <td>
t(curiosity-graph.noDataLabel)
t(curiosity-graph.label_noData)
</td>,
"monthly": <td>
t(curiosity-graph.noDataLabel)
t(curiosity-graph.label_noData)
</td>,
"quarterly": <td>
t(curiosity-graph.noDataLabel)
t(curiosity-graph.label_noData)
</td>,
"weekly": <td>
t(curiosity-graph.noDataLabel)
t(curiosity-graph.label_noData)
</td>,
}
`;

exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: threshold display for null and UNDEFINED hasInfinite on threshold 1`] = `
Object {
"daily": <td>
t(curiosity-graph.noDataLabel)
t(curiosity-graph.label_noData)
</td>,
"monthly": <td>
t(curiosity-graph.noDataLabel)
t(curiosity-graph.label_noData)
</td>,
"quarterly": <td>
t(curiosity-graph.noDataLabel)
t(curiosity-graph.label_noData)
</td>,
"weekly": <td>
t(curiosity-graph.noDataLabel)
t(curiosity-graph.label_noData)
</td>,
}
`;

exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: threshold display for null and hasInfinite on threshold 1`] = `
Object {
"daily": <td>
t(curiosity-graph.infiniteThresholdLabel)
t(curiosity-graph.label_threshold, {"context":"infinite"})
</td>,
"monthly": <td>
t(curiosity-graph.infiniteThresholdLabel)
t(curiosity-graph.label_threshold, {"context":"infinite"})
</td>,
"quarterly": <td>
t(curiosity-graph.infiniteThresholdLabel)
t(curiosity-graph.label_threshold, {"context":"infinite"})
</td>,
"weekly": <td>
t(curiosity-graph.infiniteThresholdLabel)
t(curiosity-graph.label_threshold, {"context":"infinite"})
</td>,
}
`;
Expand Down Expand Up @@ -368,16 +368,16 @@ Object {
exports[`GraphCardChartTooltip Component should return a formatted tooltip based on data and granularity: threshold display for zero and hasInfinite on threshold 1`] = `
Object {
"daily": <td>
t(curiosity-graph.infiniteThresholdLabel)
t(curiosity-graph.label_threshold, {"context":"infinite"})
</td>,
"monthly": <td>
t(curiosity-graph.infiniteThresholdLabel)
t(curiosity-graph.label_threshold, {"context":"infinite"})
</td>,
"quarterly": <td>
t(curiosity-graph.infiniteThresholdLabel)
t(curiosity-graph.label_threshold, {"context":"infinite"})
</td>,
"weekly": <td>
t(curiosity-graph.infiniteThresholdLabel)
t(curiosity-graph.label_threshold, {"context":"infinite"})
</td>,
}
`;
Loading

0 comments on commit 940fd22

Please sign in to comment.