feat: update email list messages for improved clarity and localization support
This commit is contained in:
@@ -4,7 +4,7 @@ import { Email, ThreadGroup } from "@/lib/jmap/types";
|
||||
import { ThreadListItem } from "./thread-list-item";
|
||||
import { EmailContextMenu } from "./email-context-menu";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { Inbox, Trash2, Mail, MailOpen, Loader2 } from "lucide-react";
|
||||
import { Trash2, Mail, MailX, MailOpen, Loader2, SearchX } from "lucide-react";
|
||||
import { useState, useEffect, useRef, useCallback, useMemo } from "react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { ConfirmDialog } from "@/components/ui/confirm-dialog";
|
||||
@@ -83,6 +83,7 @@ export function EmailList({
|
||||
setSearchFilters,
|
||||
clearSearchFilters,
|
||||
advancedSearch,
|
||||
searchQuery,
|
||||
} = useEmailStore();
|
||||
|
||||
const threadGroups = useMemo(() => {
|
||||
@@ -325,9 +326,19 @@ export function EmailList({
|
||||
<LoadingSkeleton />
|
||||
) : emails.length === 0 && !isLoading ? (
|
||||
<div className="flex flex-col items-center justify-center h-full py-12">
|
||||
<Inbox className="w-16 h-16 mb-4 text-muted-foreground/50" />
|
||||
<p className="text-base font-medium text-foreground">{t('no_emails')}</p>
|
||||
<p className="text-sm mt-1 text-muted-foreground">{t('no_emails_description')}</p>
|
||||
<div className="w-20 h-20 mx-auto mb-6 rounded-full bg-muted shadow-lg flex items-center justify-center">
|
||||
{searchQuery || !isFilterEmpty(searchFilters) ? (
|
||||
<SearchX className="w-10 h-10 text-muted-foreground" />
|
||||
) : (
|
||||
<MailX className="w-10 h-10 text-muted-foreground" />
|
||||
)}
|
||||
</div>
|
||||
<p className="text-base font-medium text-foreground">
|
||||
{searchQuery || !isFilterEmpty(searchFilters) ? t('no_search_results') : t('no_emails')}
|
||||
</p>
|
||||
<p className="text-sm mt-1 text-muted-foreground">
|
||||
{searchQuery || !isFilterEmpty(searchFilters) ? t('no_search_results_description') : t('no_emails_description')}
|
||||
</p>
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
|
||||
@@ -99,8 +99,10 @@
|
||||
"nav_label": "Navigation"
|
||||
},
|
||||
"email_list": {
|
||||
"no_emails": "Keine E-Mails",
|
||||
"no_emails_description": "Beginnen Sie, indem Sie eine neue E-Mail verfassen",
|
||||
"no_emails": "Keine Nachrichten gefunden",
|
||||
"no_emails_description": "Dieses Postfach ist leer",
|
||||
"no_search_results": "Keine Ergebnisse gefunden",
|
||||
"no_search_results_description": "Passen Sie Ihre Suche oder Filter an",
|
||||
"loading": "E-Mails werden geladen...",
|
||||
"unread": "ungelesen",
|
||||
"to_me": "An mich",
|
||||
|
||||
@@ -99,8 +99,10 @@
|
||||
"nav_label": "Navigation"
|
||||
},
|
||||
"email_list": {
|
||||
"no_emails": "No emails",
|
||||
"no_emails_description": "Start by composing a new email",
|
||||
"no_emails": "No messages found",
|
||||
"no_emails_description": "This mailbox is empty",
|
||||
"no_search_results": "No results found",
|
||||
"no_search_results_description": "Try adjusting your search or filters",
|
||||
"loading": "Loading emails...",
|
||||
"unread": "unread",
|
||||
"to_me": "To me",
|
||||
|
||||
@@ -99,8 +99,10 @@
|
||||
"nav_label": "Navegación"
|
||||
},
|
||||
"email_list": {
|
||||
"no_emails": "Sin correos",
|
||||
"no_emails_description": "Comience redactando un nuevo correo",
|
||||
"no_emails": "No se encontraron mensajes",
|
||||
"no_emails_description": "Este buzón está vacío",
|
||||
"no_search_results": "No se encontraron resultados",
|
||||
"no_search_results_description": "Intente ajustar su búsqueda o filtros",
|
||||
"loading": "Cargando correos...",
|
||||
"unread": "no leído",
|
||||
"to_me": "Para mí",
|
||||
|
||||
@@ -99,8 +99,10 @@
|
||||
"nav_label": "Navigation"
|
||||
},
|
||||
"email_list": {
|
||||
"no_emails": "Aucun email",
|
||||
"no_emails_description": "Commencez par composer un nouvel email",
|
||||
"no_emails": "Aucun message trouvé",
|
||||
"no_emails_description": "Cette boîte est vide",
|
||||
"no_search_results": "Aucun résultat trouvé",
|
||||
"no_search_results_description": "Essayez de modifier votre recherche ou vos filtres",
|
||||
"loading": "Chargement des emails...",
|
||||
"unread": "non lu",
|
||||
"to_me": "À moi",
|
||||
|
||||
@@ -99,8 +99,10 @@
|
||||
"nav_label": "Navigazione"
|
||||
},
|
||||
"email_list": {
|
||||
"no_emails": "Nessun messaggio",
|
||||
"no_emails_description": "Inizia scrivendo un nuovo messaggio",
|
||||
"no_emails": "Nessun messaggio trovato",
|
||||
"no_emails_description": "Questa casella è vuota",
|
||||
"no_search_results": "Nessun risultato trovato",
|
||||
"no_search_results_description": "Prova a modificare la ricerca o i filtri",
|
||||
"loading": "Caricamento messaggi...",
|
||||
"unread": "non letto",
|
||||
"to_me": "A me",
|
||||
|
||||
@@ -99,8 +99,10 @@
|
||||
"nav_label": "ナビゲーション"
|
||||
},
|
||||
"email_list": {
|
||||
"no_emails": "メールがありません",
|
||||
"no_emails_description": "新しいメールを作成してください",
|
||||
"no_emails": "メッセージが見つかりません",
|
||||
"no_emails_description": "このメールボックスは空です",
|
||||
"no_search_results": "結果が見つかりません",
|
||||
"no_search_results_description": "検索やフィルターを調整してください",
|
||||
"loading": "メールを読み込み中...",
|
||||
"unread": "未読",
|
||||
"to_me": "宛先: 自分",
|
||||
|
||||
@@ -99,8 +99,10 @@
|
||||
"nav_label": "Navigatie"
|
||||
},
|
||||
"email_list": {
|
||||
"no_emails": "Geen e-mails",
|
||||
"no_emails_description": "Begin met het opstellen van een nieuw bericht",
|
||||
"no_emails": "Geen berichten gevonden",
|
||||
"no_emails_description": "Deze mailbox is leeg",
|
||||
"no_search_results": "Geen resultaten gevonden",
|
||||
"no_search_results_description": "Pas je zoekopdracht of filters aan",
|
||||
"loading": "E-mails laden...",
|
||||
"unread": "ongelezen",
|
||||
"to_me": "Aan mij",
|
||||
|
||||
@@ -99,8 +99,10 @@
|
||||
"nav_label": "Navegação"
|
||||
},
|
||||
"email_list": {
|
||||
"no_emails": "Nenhum e-mail",
|
||||
"no_emails_description": "Comece escrevendo um novo e-mail",
|
||||
"no_emails": "Nenhuma mensagem encontrada",
|
||||
"no_emails_description": "Esta caixa de correio está vazia",
|
||||
"no_search_results": "Nenhum resultado encontrado",
|
||||
"no_search_results_description": "Tente ajustar sua pesquisa ou filtros",
|
||||
"loading": "Carregando e-mails...",
|
||||
"unread": "não lido",
|
||||
"to_me": "Para mim",
|
||||
|
||||
Reference in New Issue
Block a user