Pluralize domain and path label in deep links panel (#9790)
* Pluralize domain label in deep links panel
* Fix pluralization Path notification
* Update release notes for deep links tool
Pluralized 'domain' and 'path' in validation summary notification titles.
* Update packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md
Co-authored-by: Kenzie Davisson <43759233+kenzieschmoll@users.noreply.github.com>
* Fix formatting
---------
Co-authored-by: Kenzie Davisson <43759233+kenzieschmoll@users.noreply.github.com>
diff --git a/packages/devtools_app/lib/src/screens/deep_link_validation/deep_link_list_view.dart b/packages/devtools_app/lib/src/screens/deep_link_validation/deep_link_list_view.dart
index 56308e8..75a9084 100644
--- a/packages/devtools_app/lib/src/screens/deep_link_validation/deep_link_list_view.dart
+++ b/packages/devtools_app/lib/src/screens/deep_link_validation/deep_link_list_view.dart
@@ -3,6 +3,7 @@
// found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd.
import 'package:devtools_app_shared/ui.dart';
+import 'package:devtools_app_shared/utils.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
@@ -439,7 +440,8 @@
children: [
if (domainErrorCount > 0)
NotificationCard(
- title: '$domainErrorCount domain not verified',
+ title:
+ '$domainErrorCount ${pluralize('domain', domainErrorCount)} not verified',
description:
'This affects all deep links. Fix issues to make users go directly to your app.',
actionButton: TextButton(
@@ -461,7 +463,8 @@
const SizedBox(width: defaultSpacing),
if (pathErrorCount > 0)
NotificationCard(
- title: '$pathErrorCount path not working',
+ title:
+ '$pathErrorCount ${pluralize('path', pathErrorCount)} not working',
description:
'Fix these path to make sure users are directed to your app',
actionButton: TextButton(
diff --git a/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md b/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md
index 323d3c1..9bbdfe3 100644
--- a/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md
+++ b/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md
@@ -58,7 +58,7 @@
## Deep links tool updates
-TODO: Remove this section if there are not any updates.
+- Pluralized "domain" and "path" in the validation summary notification titles when multiple errors are present. [#9790](https://github.com/flutter/devtools/pull/9790)
## VS Code sidebar updates