Skip to content

Commit

Permalink
all update to lower case
Browse files Browse the repository at this point in the history
  • Loading branch information
erinz2020 committed Feb 3, 2025
1 parent 8c061c3 commit d8c900a
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 9 deletions.
8 changes: 6 additions & 2 deletions frontend/src/components/header/HeaderQuickSearch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,14 @@ export default function HeaderQuickSearch() {
>
<FormattedMessage
id={
result?.id?.includes(search)
result?.id
?.toLowerCase()
.includes(search.toLowerCase())
? "SYSTEM_ID"
: result?.names?.some((name) =>
name.includes(search),
name
.toLowerCase()
.includes(search.toLowerCase()),
)
? "FILTER_NAME"
: "UNKNOWN"
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/locale/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -332,5 +332,6 @@
"NO_MATCHING_RESULTS": "Keine passenden Ergebnisse",
"SYSTEM_ID": "System-ID",
"SEARCH_INDIVIDUALS": "Individuen suchen",
"SEARCH_RESULT_DISPLAY" : "Ihre Suchergebnisse werden hier angezeigt."
"SEARCH_RESULT_DISPLAY" : "Ihre Suchergebnisse werden hier angezeigt.",
"UNKNOWN" : "Unbekannt"
}
3 changes: 2 additions & 1 deletion frontend/src/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@
"NO_MATCHING_RESULTS": "No matching results",
"SYSTEM_ID": "System ID",
"SEARCH_INDIVIDUALS": "Search Individuals",
"SEARCH_RESULT_DISPLAY" : "Your search results will appear here"
"SEARCH_RESULT_DISPLAY" : "Your search results will appear here",
"UNKNOWN" : "Unknown"

}
3 changes: 2 additions & 1 deletion frontend/src/locale/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,5 +331,6 @@
"NO_MATCHING_RESULTS": "No hay resultados coincidentes",
"SYSTEM_ID": "ID del Sistema",
"SEARCH_INDIVIDUALS": "Buscar Individuos",
"SEARCH_RESULT_DISPLAY": "Tus resultados de búsqueda aparecerán aquí."
"SEARCH_RESULT_DISPLAY": "Tus resultados de búsqueda aparecerán aquí.",
"UNKNOWN" : "Desconocido"
}
3 changes: 2 additions & 1 deletion frontend/src/locale/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,5 +331,6 @@
"NO_MATCHING_RESULTS": "Aucun résultat correspondant",
"SYSTEM_ID": "ID du Système",
"SEARCH_INDIVIDUALS": "Rechercher des Individus",
"SEARCH_RESULT_DISPLAY": "Vos résultats de recherche apparaîtront ici"
"SEARCH_RESULT_DISPLAY": "Vos résultats de recherche apparaîtront ici",
"UNKNOWN" : "Inconnu"
}
3 changes: 2 additions & 1 deletion frontend/src/locale/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,5 +331,6 @@
"NO_MATCHING_RESULTS": "Nessun risultato corrispondente",
"SYSTEM_ID": "ID di sistema",
"SEARCH_INDIVIDUALS": "Cerca individui",
"SEARCH_RESULT_DISPLAY": "I tuoi risultati di ricerca appariranno qui"
"SEARCH_RESULT_DISPLAY": "I tuoi risultati di ricerca appariranno qui",
"UNKNOWN" : "Sconosciuto"
}
4 changes: 2 additions & 2 deletions src/main/webapp/header.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,9 @@ if(request.getUserPrincipal()!=null){
resultsDropdown.innerHTML = searchResults.map(data => {
const taxonomy = data.taxonomy ? data.taxonomy : " ";
let context = Unknown;
if (data.id.includes(query)) {
if (data.id.toLowerCase().includes(query.toLowerCase())) {
context = SystemId;
} else if (data.names.some(name => name.includes(query))) {
} else if (data.names.some(name => name.toLowerCase().includes(query.toLowerCase()))) {
context = Name;
} else {
context = Unknown;
Expand Down

0 comments on commit d8c900a

Please sign in to comment.