-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Highlight the search term on no results #28644
Conversation
core/src/views/UnifiedSearch.vue
Outdated
@@ -76,7 +76,7 @@ | |||
<SearchResultPlaceholders v-if="isLoading" /> | |||
|
|||
<EmptyContent v-else-if="isValidQuery" icon="icon-search"> | |||
{{ t('core', 'No results for {query}', {query}) }} | |||
{{ t('core', 'No results for') }} <strong>{{ t('query', query) }}</strong> |
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.
This approach might not work with all languages. The query parameter should stay part of the translate t()
function so it can be embedded into the translated sentence as needed in the target language. Also the content in your strong tag would always just print "query" instead of the actual search term.
In order to highlight something within a full text string, you can use the Highlight
component from our shared components library. https://nextcloud-vue-components.netlify.app/#/Components/Highlight
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.
@juliushaertl I have done the changes as you mentioned in the comment. Please check it.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Please also make sure here to only include the required commit in the branch without the unrelated s3 changes |
Signed-off-by: Kavita Sonawane <kavita.sonawane@t-systems.com>
6e448c8
to
6d83632
Compare
I wanted to push a fix, but you disabled users from editing your pull request @TSI-kavitasonawane Feel free to close this one |
Signed-off-by: Kavita Sonawane <kavita.sonawane@t-systems.com>
Done in #28682 |
NMC-464: We applied a strong tag for user input on the "no results" screen within the search function.