diff --git a/src/main/js/wiki/components/SearchResult.js b/src/main/js/wiki/components/SearchResult.js index 3b4a2d9b..5fac6ca0 100644 --- a/src/main/js/wiki/components/SearchResult.js +++ b/src/main/js/wiki/components/SearchResult.js @@ -1,20 +1,22 @@ //@flow import React from 'react'; import {Link} from "react-router-dom"; +import {translate} from 'react-i18next'; type Props = { result: any, - createPageLink: (path: string) => string + createPageLink: (path: string) => string, + t: any }; class SearchResult extends React.Component { render() { - const { result } = this.props; + const { result, t } = this.props; const pageLink = this.props.createPageLink(result.path); return ( - { result.score.toFixed(2) } + { result.score.toFixed(2) }

{ result.path }

@@ -23,4 +25,4 @@ class SearchResult extends React.Component { } -export default SearchResult; +export default translate()(SearchResult); diff --git a/src/main/public/locales/de/translations.json b/src/main/public/locales/de/translations.json index 7f223a38..e61be6b4 100644 --- a/src/main/public/locales/de/translations.json +++ b/src/main/public/locales/de/translations.json @@ -32,5 +32,6 @@ "back-to-repositories-button_text": "Zurück zur Repository-Übersicht", "search-bar_placeholder": "Suchen nach ...", "search-result-header_title": "Suchergebnisse für", - "search_failed_to_fetch": "Die Suchergebnisse konnten nicht geladen werden" + "search_failed_to_fetch": "Die Suchergebnisse konnten nicht geladen werden", + "search-scoring_tooltip": "Relevanz für Deine Anfrage" } \ No newline at end of file diff --git a/src/main/public/locales/en/translations.json b/src/main/public/locales/en/translations.json index 46c7088f..84846660 100644 --- a/src/main/public/locales/en/translations.json +++ b/src/main/public/locales/en/translations.json @@ -32,5 +32,6 @@ "back-to-repositories-button_text": "Back to Repository Overview", "search-bar_placeholder": "Search for ...", "search-result-header_title": "Search Results for", - "search_failed_to_fetch": "Failed to fetch search results" + "search_failed_to_fetch": "Failed to fetch search results", + "search-scoring_tooltip": "Relevance for your search" } \ No newline at end of file