[Tab Group] Proper undo group snackbar plurals

Use proper "1 tab grouped" for the undo group snackbar.

Skip screenshot check for existing translation as it is unchanged.

Skip-Translation-Screenshots-Check: True
Bug: 328106360
Change-Id: I842007371e7a249bedaec6651feafb1628fae2cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5340152
Reviewed-by: Sky Malice <skym@chromium.org>
Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1268107}
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/UndoGroupSnackbarController.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/UndoGroupSnackbarController.java
index 04150a5..6793e67 100644
--- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/UndoGroupSnackbarController.java
+++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/UndoGroupSnackbarController.java
@@ -176,16 +176,21 @@
                         .getCurrentTabModelFilter()
                         .getRelatedTabIds(tabUndoInfo.get(0).tab.getId())
                         .size();
-        assert mergedGroupSize > 1;
 
         String content = String.format(Locale.getDefault(), "%d", mergedGroupSize);
+        String templateText;
+        if (mergedGroupSize == 1) {
+            templateText = mContext.getString(R.string.undo_bar_group_tab_message);
+        } else {
+            templateText = mContext.getString(R.string.undo_bar_group_tabs_message);
+        }
         mSnackbarManager.showSnackbar(
                 Snackbar.make(
                                 content,
                                 this,
                                 Snackbar.TYPE_ACTION,
                                 Snackbar.UMA_TAB_GROUP_MANUAL_CREATION_UNDO)
-                        .setTemplateText(mContext.getString(R.string.undo_bar_group_tabs_message))
+                        .setTemplateText(templateText)
                         .setAction(mContext.getString(R.string.undo), tabUndoInfo));
     }
 
diff --git a/chrome/android/features/tab_ui/java/strings/android_chrome_tab_ui_strings.grd b/chrome/android/features/tab_ui/java/strings/android_chrome_tab_ui_strings.grd
index da41dc4..feff443 100644
--- a/chrome/android/features/tab_ui/java/strings/android_chrome_tab_ui_strings.grd
+++ b/chrome/android/features/tab_ui/java/strings/android_chrome_tab_ui_strings.grd
@@ -187,8 +187,11 @@
       </message>
 
       <!-- Undo Bar -->
-      <message name="IDS_UNDO_BAR_GROUP_TABS_MESSAGE" desc="Message shown or announced when a group has been created.">
-        <ph name="TAB_COUNT">%1$s<ex>3</ex></ph> tabs grouped
+      <message name="IDS_UNDO_BAR_GROUP_TAB_MESSAGE" desc="Message shown or announced when a group has been created with a single tab.">
+        <ph name="TABS_COUNT_ONE">%1$s<ex>1</ex></ph> tab grouped
+      </message>
+      <message name="IDS_UNDO_BAR_GROUP_TABS_MESSAGE" desc="Message shown or announced when a group has been created with multiple tabs.">
+        <ph name="TABS_COUNT_MANY">%1$s<ex>3</ex></ph> tabs grouped
       </message>
 
       <!-- Bottom Tab Grid strings -->
diff --git a/chrome/android/features/tab_ui/java/strings/android_chrome_tab_ui_strings_grd/IDS_UNDO_BAR_GROUP_TAB_MESSAGE.png.sha1 b/chrome/android/features/tab_ui/java/strings/android_chrome_tab_ui_strings_grd/IDS_UNDO_BAR_GROUP_TAB_MESSAGE.png.sha1
new file mode 100644
index 0000000..391ca5f
--- /dev/null
+++ b/chrome/android/features/tab_ui/java/strings/android_chrome_tab_ui_strings_grd/IDS_UNDO_BAR_GROUP_TAB_MESSAGE.png.sha1
@@ -0,0 +1 @@
+06c923b1e0417cdd54251733b722a4c1e6248c54
\ No newline at end of file