From 451e426e4cb1ea7b7b3931bf86b1d2bc12c74047 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Thu, 26 Jun 2025 22:44:15 -0400 Subject: [PATCH] chore: update localization for agent detail component and clean up imports --- .../SidePanel/Agents/AgentDetail.tsx | 14 +++--- client/src/locales/en/translation.json | 47 ------------------- 2 files changed, 7 insertions(+), 54 deletions(-) diff --git a/client/src/components/SidePanel/Agents/AgentDetail.tsx b/client/src/components/SidePanel/Agents/AgentDetail.tsx index a4bd683776..1a7ee91e9b 100644 --- a/client/src/components/SidePanel/Agents/AgentDetail.tsx +++ b/client/src/components/SidePanel/Agents/AgentDetail.tsx @@ -12,12 +12,12 @@ interface AgentWithSupport extends t.Agent { support_contact?: SupportContact; } -import useLocalize from '~/hooks/useLocalize'; -import { useToast } from '~/hooks'; -import { Dialog, DialogContent, Button } from '~/components/ui'; -import { DotsIcon } from '~/components/svg'; -import { renderAgentAvatar } from '~/utils/agents'; import { useQueryClient } from '@tanstack/react-query'; +import { Dialog, DialogContent, Button } from '~/components/ui'; +import { renderAgentAvatar } from '~/utils/agents'; +import useLocalize from '~/hooks/useLocalize'; +import { DotsIcon } from '~/components/svg'; +import { useToast } from '~/hooks'; interface AgentDetailProps { agent: AgentWithSupport; // The agent data to display @@ -81,7 +81,7 @@ const AgentDetail: React.FC = ({ agent, isOpen, onClose }) => .writeText(chatUrl) .then(() => { showToast({ - message: 'Link copied', + message: localize('com_agents_link_copied'), }); }) .catch(() => { @@ -131,7 +131,7 @@ const AgentDetail: React.FC = ({ agent, isOpen, onClose }) => variant="ghost" size="icon" className="h-8 w-8 rounded-lg text-text-secondary hover:bg-surface-hover hover:text-text-primary dark:hover:bg-surface-hover" - aria-label="More options" + aria-label={localize('com_agents_more_options')} aria-expanded={dropdownOpen} aria-haspopup="menu" onClick={(e) => { diff --git a/client/src/locales/en/translation.json b/client/src/locales/en/translation.json index cb52c9a2df..cce6835370 100644 --- a/client/src/locales/en/translation.json +++ b/client/src/locales/en/translation.json @@ -1132,9 +1132,7 @@ "com_agents_link_copied": "Link copied", "com_agents_link_copy_failed": "Failed to copy link", "com_agents_more_options": "More options", - "com_agents_close": "Close", "com_agents_loading": "Loading...", - "com_agents_loading_description": "Loading agent description...", "com_agents_error_loading": "Error loading agents", "com_agents_error_searching": "Error searching agents", "com_agents_error_title": "Something went wrong", @@ -1174,51 +1172,6 @@ "com_agents_results_for": "Results for '{{query}}'", "com_nav_agents_marketplace": "Agent Marketplace", "com_agents_marketplace_subtitle": "Discover and use powerful AI agents to enhance your workflows and productivity", - "com_ui_copy_url_to_clipboard": "Copy URL to clipboard", - "com_ui_agent_url_copied": "Agent URL copied to clipboard", - "com_ui_search_people_placeholder": "Search for people or groups by name or email", - "com_ui_permission_level": "Permission Level", - "com_ui_grant_access": "Grant Access", - "com_ui_granting": "Granting...", - "com_ui_search_users_groups": "Search Users and Groups", - "com_ui_search_default_placeholder": "Search by name or email (min 2 chars)", - "com_ui_user": "User", - "com_ui_group": "Group", - "com_ui_search_above_to_add": "Search above to add users or groups", - "com_ui_azure_ad": "Entra ID", - "com_ui_remove_user": "Remove {{0}}", - "com_ui_select_options": "Select options...", - "com_ui_no_results_found": "No results found", - "com_ui_try_adjusting_search": "Try adjusting your search terms", - "com_ui_role_viewer": "Viewer", - "com_ui_role_editor": "Editor", - "com_ui_role_manager": "Manager", - "com_ui_role_owner": "Owner", - "com_ui_role_viewer_desc": "Can view and use the agent but cannot modify it", - "com_ui_role_editor_desc": "Can view and modify the agent", - "com_ui_role_manager_desc": "Can view, modify, and delete the agent", - "com_ui_role_owner_desc": "Has full control over the agent including sharing it", - "com_ui_permissions_failed_load": "Failed to load permissions. Please try again.", - "com_ui_permissions_updated_success": "Permissions updated successfully", - "com_ui_permissions_failed_update": "Failed to update permissions. Please try again.", - "com_ui_manage_permissions_for": "Manage Permissions for", - "com_ui_current_access": "Current Access", - "com_ui_no_users_groups_access": "No users or groups have access", - "com_ui_shared_with_count": "Shared with {{0}} {{1}}{{2}}", - "com_ui_person": "person", - "com_ui_people": "people", - "com_ui_and_public": " and public", - "com_ui_revoke_all": "Revoke All", - "com_ui_loading_permissions": "Loading permissions...", - "com_ui_user_group_permissions": "User & Group Permissions", - "com_ui_no_individual_access": "No individual users or groups have access to this agent", - "com_ui_public_access": "Public Access", - "com_ui_saving": "Saving...", - "com_ui_save_changes": "Save Changes", - "com_ui_unsaved_changes": "You have unsaved changes", - "com_ui_share_with_everyone": "Share with everyone", - "com_ui_make_agent_available_all_users": "Make this agent available to all LibreChat users", - "com_ui_public_access_level": "Public access level", "com_ui_agent_name_is_required": "Agent name is required", "com_agents_missing_name": "Please type in a name before creating an agent." }