Closed gusevda closed 1 year ago
There are several places in the Happa project's code where we pluralize strings. We don't have a shared utility function to do that and we do it slightly differently everywhere. Here are some examples in the code, but there are probably more: src/components/MAPI/organizations/AccessControl/utils.ts#L737-L766 src/components/Cluster/ClusterDetail/NodesRunning.tsx#L28-L29 src/components/Cluster/ClusterDetail/ScaleClusterModal.js#L162-L170 src/components/Cluster/ClusterDetail/ScaleNodePoolModal.tsx#L182-L190 src/components/UI/Display/MAPI/clusters/ClusterDetail/ClusterDetailCounter/index.tsx#L7-L13 src/components/UI/Display/MAPI/clusters/ClusterList/ClusterListItemNodeInfo.tsx#L8-L14
We need to refactor Happa's code to have one shared way to pluralize strings.
closing
There are several places in the Happa project's code where we pluralize strings. We don't have a shared utility function to do that and we do it slightly differently everywhere. Here are some examples in the code, but there are probably more: src/components/MAPI/organizations/AccessControl/utils.ts#L737-L766 src/components/Cluster/ClusterDetail/NodesRunning.tsx#L28-L29 src/components/Cluster/ClusterDetail/ScaleClusterModal.js#L162-L170 src/components/Cluster/ClusterDetail/ScaleNodePoolModal.tsx#L182-L190 src/components/UI/Display/MAPI/clusters/ClusterDetail/ClusterDetailCounter/index.tsx#L7-L13 src/components/UI/Display/MAPI/clusters/ClusterList/ClusterListItemNodeInfo.tsx#L8-L14
We need to refactor Happa's code to have one shared way to pluralize strings.