mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-04 11:43:57 +08:00
fix(i18n): replace hardcoded Chinese strings in Session Manager
- Add i18n keys for relative time (justNow, minutesAgo, hoursAgo, daysAgo) - Add i18n keys for role labels (roleUser, roleSystem, roleTool) - Add i18n keys for UI elements (tocTitle, searchSessions, clickToCopyPath) - Update formatRelativeTime and getRoleLabel to accept t function - Add useTranslation hook to SessionToc component
This commit is contained in:
@@ -59,7 +59,7 @@ export function SessionMessageItem({
|
||||
</Tooltip>
|
||||
<div className="flex items-center justify-between text-xs mb-1.5 pr-6">
|
||||
<span className={cn("font-semibold", getRoleTone(message.role))}>
|
||||
{getRoleLabel(message.role)}
|
||||
{getRoleLabel(message.role, t)}
|
||||
</span>
|
||||
{message.ts && (
|
||||
<span className="text-muted-foreground">
|
||||
|
||||
Reference in New Issue
Block a user