Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(783)

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/AdvancedSearchView.js

Issue 2558173004: DevTools: [Search] fix search results text (Closed)
Patch Set: nit Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sources/AdvancedSearchView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/AdvancedSearchView.js b/third_party/WebKit/Source/devtools/front_end/sources/AdvancedSearchView.js
index 180f0f9518ca27a0523ef32e848f7b306ad85687..38adfd2c04bd8d9623273f348708e6f972c73e45 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/AdvancedSearchView.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/AdvancedSearchView.js
@@ -236,8 +236,15 @@ Sources.AdvancedSearchView = class extends UI.VBox {
_updateSearchResultsMessage() {
if (this._searchMatchesCount && this._searchResultsCount) {
- this._searchResultsMessageElement.textContent =
- Common.UIString('Found %d matches in %d files.', this._searchMatchesCount, this._nonEmptySearchResultsCount);
+ if (this._searchMatchesCount === 1 && this._nonEmptySearchResultsCount === 1) {
+ this._searchResultsMessageElement.textContent = Common.UIString('Found 1 matching line in 1 file.');
+ } else if (this._searchMatchesCount > 1 && this._nonEmptySearchResultsCount === 1) {
+ this._searchResultsMessageElement.textContent =
+ Common.UIString('Found %d matching lines in 1 file.', this._searchMatchesCount);
+ } else {
+ this._searchResultsMessageElement.textContent = Common.UIString(
+ 'Found %d matching lines in %d files.', this._searchMatchesCount, this._nonEmptySearchResultsCount);
+ }
} else {
this._searchResultsMessageElement.textContent = '';
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698