message: Translate pinned resources when labelPluralKey is available
diff: import * as React from 'react';
  +import { useTranslation } from 'react-i18next';
  import { NavItemSeparator, NavGroup, Button } from '@patternfly/react-core';
  import { MinusCircleIcon } from '@patternfly/react-icons';
  import {
  @@ -11,7 +12,7 @@ import {
  isSeparatorNavItem,
  } from '@console/plugin-sdk';
  import { useActivePerspective, usePinnedResources } from '@console/shared';
  -import { modelFor, referenceForModel } from '../../module/k8s';
  +import { K8sKind, modelFor, referenceForModel } from '../../module/k8s';
  import { getSortedNavItems } from './navSortUtils';
  import confirmNavUnpinModal from './confirmNavUnpinModal';
  import { NavSection } from './section';
  @@ -26,12 +27,8 @@ import {
  import './_perspective-nav.scss';
  -const getLabelForResource = (resource: string): string => {
  - const model = modelFor(resource);
  - return model ? model.labelPlural : '';
  -};
  -
  const PerspectiveNav: React.FC<{}> = () => {
  + const { t } = useTranslation();
  const [perspective] = useActivePerspective();
  const allItems = useExtensions<PluginNavSection | NavItem | SeparatorNavItem>(
  isNavSection,
  @@ -56,6 +53,17 @@ const PerspectiveNav: React.FC<{}> = () => {
  return <AdminNav />;
  }
  + const getLabelForResource = (resource: string): string => {
  + const model: K8sKind | undefined = modelFor(resource);
  + if (model) {
  + if (model.labelPluralKey) {
  + return t(model.labelPluralKey);
  + }
  + return model.labelPlural || model.plural;
  + }
  + return '';
  + };
  +
  const getPinnedItems = (rootNavLink: boolean = false): React.ReactElement[] =>
  pinnedResourcesLoaded
  ? pinnedResources
  @@ -64,14 +72,15 @@ const PerspectiveNav: React.FC<{}> = () => {
  if (!model) {
  return null;
  }
  - const { labelPlural, apiVersion, apiGroup, namespaced, crd, plural } = model;
  + const { apiVersion, apiGroup, namespaced, crd, plural } = model;
  + const label = getLabelForResource(resource);
  const duplicates =
  - pinnedResources.filter((res) => getLabelForResource(res) === labelPlural).length > 1;
  + pinnedResources.filter((res) => getLabelForResource(res) === label).length > 1;
  const props = {
  key: `pinned-${resource}`,
  - name: labelPlural,
  + name: label,
  resource: crd ? referenceForModel(model) : plural,
  - tipText: duplicates ? `${labelPlural}: ${apiGroup || 'core'}/${apiVersion}` : null,
  + tipText: duplicates ? `${label}: ${apiGroup || 'core'}/${apiVersion}` : null,
  id: resource,
  };
  const Component: NavLinkComponent = namespaced ? ResourceNSLink : ResourceClusterLink;
  