Update singular/plural l10n code in Issues tab

new localised string defination moved to UIStrings,return type of getResourceName changed to `LocalizedString`

Bug: 1183249
Change-Id: I0c8124e421227045992e8ed9b5dd92746c00ef6e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2763359
Reviewed-by: Wolfgang Beyer <[email protected]>
Commit-Queue: Wolfgang Beyer <[email protected]>
diff --git a/front_end/issues/AffectedCookiesView.ts b/front_end/issues/AffectedCookiesView.ts
index 26dd8cc..117c065 100644
--- a/front_end/issues/AffectedCookiesView.ts
+++ b/front_end/issues/AffectedCookiesView.ts
@@ -5,6 +5,7 @@
 import * as Host from '../host/host.js';
 import * as i18n from '../i18n/i18n.js';
 import * as Network from '../network/network.js';
+import * as Platform from '../platform/platform.js';
 import * as UI from '../ui/ui.js';
 
 import {AffectedItem, AffectedResourcesView} from './AffectedResourcesView.js';
@@ -13,6 +14,10 @@
 
 const UIStrings = {
   /**
+  *@description Noun, singular or plural. Label for the kind and number of affected resources associated with a DevTools issue. A cookie is a small piece of data that a server sends to the user's web browser. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies.
+  */
+  nCookies: '{n, plural, =1 { cookie} other { cookies}}',
+  /**
   *@description Noun, singular. Label for the kind and number of affected resources associated with a DevTools issue. A cookie is a small piece of data that a server sends to the user's web browser. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies.
   */
   cookie: 'cookie',
@@ -43,6 +48,10 @@
     this.issue = issue;
   }
 
+  protected getResourceName(count: number): Platform.UIString.LocalizedString {
+    return i18nString(UIStrings.nCookies, {n: count});
+  }
+
   private appendAffectedCookies(cookies: Iterable<{cookie: Protocol.Audits.AffectedCookie, hasRequest: boolean}>):
       void {
     const header = document.createElement('tr');