DevTools: Parse localizable strings created by Common.UIStringFormat

Modify the presubit script to automatically parse localizable strings
created by new Common.UIStringFormat(). Add existing strings to the grdp
files.

Bug: 941561
Change-Id: I5b4538d1f4df37b4dc3b1796df069c6eaad6f2bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1666484
Reviewed-by: Joel Einbinder <einbinder@chromium.org>
Commit-Queue: Mandy Chen <mandy.chen@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#672286}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 43fedcf2a61b98e024c7417f986769d5b99709dd
diff --git a/scripts/localization_utils/localization_utils.js b/scripts/localization_utils/localization_utils.js
index 3ca2a5a..031d562 100644
--- a/scripts/localization_utils/localization_utils.js
+++ b/scripts/localization_utils/localization_utils.js
@@ -17,6 +17,7 @@
   IDENTIFIER: 'Identifier',
   LITERAL: 'Literal',
   MEMBER_EXPR: 'MemberExpression',
+  NEW_EXPR: 'NewExpression',
   TAGGED_TEMP_EXPR: 'TaggedTemplateExpression',
   TEMP_LITERAL: 'TemplateLiteral'
 };
@@ -66,6 +67,11 @@
   return isNodeCallOnObject(node, 'Common', 'UIString');
 }
 
+function isNodeCommonUIStringFormat(node) {
+  return node && node.type === esprimaTypes.NEW_EXPR &&
+      verifyCallExpressionCallee(node.callee, 'Common', 'UIStringFormat');
+}
+
 function isNodeUIformatLocalized(node) {
   return isNodeCallOnObject(node, 'UI', 'formatLocalized');
 }
@@ -90,6 +96,8 @@
 function getLocalizationCase(node) {
   if (isNodeCommonUIStringCall(node))
     return 'Common.UIString';
+  else if (isNodeCommonUIStringFormat(node))
+    return 'Common.UIStringFormat';
   else if (isNodelsTaggedTemplateExpression(node))
     return 'Tagged Template';
   else if (isNodeUIformatLocalized(node))