-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Added 'no results' and '1 result' to search dialog #4853
Conversation
@@ -112,6 +112,8 @@ define({ | |||
// Find, Replace, Find in Files | |||
"SEARCH_REGEXP_INFO" : "Use /re/ syntax for regexp search", | |||
"FIND_RESULT_COUNT" : "{0} results", | |||
"FIND_RESULT_COUNT_SINGLE" : "1 result", | |||
"FIND_NO_RESULTS" : "No results", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation is wrong here. Make sure you're using spaces everywhere and not tab characters.
@cornedor Looks good except for that one formatting glitch |
if (resultCount === 0) { | ||
$("#find-counter").text(StringUtils.format(Strings.FIND_NO_RESULTS)); | ||
} else if (resultCount === 1) { | ||
$("#find-counter").text(StringUtils.format(Strings.FIND_RESULT_COUNT_SINGLE)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't really need to use StringUtils.format
on this 2 if.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch @TomMalbran! Sorry I missed that in the original review...
Must have missed the tab button, also removed the useless StringUtils.format. |
Good to go now -- thanks! |
Add 'no results' and '1 result' strings for Find bar
Fixed #4784. A "No results" message will appear when there are no results and a "1 result" message when there is only 1 result.