chore: update localization for agent detail component and clean up imports

This commit is contained in:
Danny Avila 2025-06-26 22:44:15 -04:00
parent 1b9f155fb8
commit 451e426e4c
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
2 changed files with 7 additions and 54 deletions

View file

@ -12,12 +12,12 @@ interface AgentWithSupport extends t.Agent {
support_contact?: SupportContact; 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 { 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 { interface AgentDetailProps {
agent: AgentWithSupport; // The agent data to display agent: AgentWithSupport; // The agent data to display
@ -81,7 +81,7 @@ const AgentDetail: React.FC<AgentDetailProps> = ({ agent, isOpen, onClose }) =>
.writeText(chatUrl) .writeText(chatUrl)
.then(() => { .then(() => {
showToast({ showToast({
message: 'Link copied', message: localize('com_agents_link_copied'),
}); });
}) })
.catch(() => { .catch(() => {
@ -131,7 +131,7 @@ const AgentDetail: React.FC<AgentDetailProps> = ({ agent, isOpen, onClose }) =>
variant="ghost" variant="ghost"
size="icon" 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" 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-expanded={dropdownOpen}
aria-haspopup="menu" aria-haspopup="menu"
onClick={(e) => { onClick={(e) => {

View file

@ -1132,9 +1132,7 @@
"com_agents_link_copied": "Link copied", "com_agents_link_copied": "Link copied",
"com_agents_link_copy_failed": "Failed to copy link", "com_agents_link_copy_failed": "Failed to copy link",
"com_agents_more_options": "More options", "com_agents_more_options": "More options",
"com_agents_close": "Close",
"com_agents_loading": "Loading...", "com_agents_loading": "Loading...",
"com_agents_loading_description": "Loading agent description...",
"com_agents_error_loading": "Error loading agents", "com_agents_error_loading": "Error loading agents",
"com_agents_error_searching": "Error searching agents", "com_agents_error_searching": "Error searching agents",
"com_agents_error_title": "Something went wrong", "com_agents_error_title": "Something went wrong",
@ -1174,51 +1172,6 @@
"com_agents_results_for": "Results for '{{query}}'", "com_agents_results_for": "Results for '{{query}}'",
"com_nav_agents_marketplace": "Agent Marketplace", "com_nav_agents_marketplace": "Agent Marketplace",
"com_agents_marketplace_subtitle": "Discover and use powerful AI agents to enhance your workflows and productivity", "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_ui_agent_name_is_required": "Agent name is required",
"com_agents_missing_name": "Please type in a name before creating an agent." "com_agents_missing_name": "Please type in a name before creating an agent."
} }