Skip to content

Commit

Permalink
feat(Assistant): Add secondary text to assistant result
Browse files Browse the repository at this point in the history
  • Loading branch information
JF-Cozy committed Oct 9, 2024
1 parent 77ddb63 commit a90573d
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/assistant/ResultMenu/ResultMenuContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Circle from 'cozy-ui/transpiled/react/Circle'
import ArrowUpIcon from 'cozy-ui/transpiled/react/Icons/ArrowUp'
import Icon from 'cozy-ui/transpiled/react/Icon'
import ListItemSkeleton from 'cozy-ui/transpiled/react/Skeletons/ListItemSkeleton'
import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'

import { useSearch } from '../SearchProvider'
import ResultMenuItem from './ResultMenuItem'
Expand Down Expand Up @@ -34,6 +35,7 @@ const SearchResult = () => {
}

const ResultMenuContent = ({ hasArrowDown, onClick }) => {
const { t } = useI18n()
const { searchValue } = useSearch()

return (
Expand All @@ -49,6 +51,7 @@ const ResultMenuContent = ({ hasArrowDown, onClick }) => {
</Circle>
}
primaryText={searchValue}
secondaryText={t('assistant.search.result')}
onClick={onClick}
/>
{flag('cozy.assistant.withSearchResult') && <SearchResult />}
Expand Down
3 changes: 2 additions & 1 deletion src/locales/de.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"assistant": {
"search": {
"placeholder": "Eine Frage?"
"placeholder": "Eine Frage?",
"result": "Den Assistenten fragen"
},
"dialog": {
"close": "Schließen"
Expand Down
3 changes: 2 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"assistant": {
"search": {
"placeholder": "Any question?"
"placeholder": "Any question?",
"result": "Ask the assistant"
},
"dialog": {
"close": "Close"
Expand Down
3 changes: 2 additions & 1 deletion src/locales/es.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"assistant": {
"search": {
"placeholder": "¿Tiene alguna pregunta?"
"placeholder": "¿Tiene alguna pregunta?",
"result": "Pregunte al asistente"
},
"dialog": {
"close": "Cerrar"
Expand Down
3 changes: 2 additions & 1 deletion src/locales/fr.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"assistant": {
"search": {
"placeholder": "Une question ?"
"placeholder": "Une question ?",
"result": "Demander à l'assistant"
},
"dialog": {
"close": "Fermer"
Expand Down
3 changes: 2 additions & 1 deletion src/locales/it.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"assistant": {
"search": {
"placeholder": "Avete una domanda?"
"placeholder": "Avete una domanda?",
"result": "Chiedete all'assistente"
},
"dialog": {
"close": "Chiudere"
Expand Down
3 changes: 2 additions & 1 deletion src/locales/ja.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"assistant": {
"search": {
"placeholder": "質問はありますか?"
"placeholder": "質問はありますか?",
"result": "アシスタントに聞く"
},
"dialog": {
"close": "閉じる"
Expand Down
3 changes: 2 additions & 1 deletion src/locales/nl_NL.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"assistant": {
"search": {
"placeholder": "Heb je een vraag?"
"placeholder": "Heb je een vraag?",
"result": "Vraag het de assistent"
},
"dialog": {
"close": "Sluit"
Expand Down

0 comments on commit a90573d

Please sign in to comment.