chore(settings): remove orphaned i18n keys, fix import order and review notes

- Drop the i18n keys left unused after the refactor (old Commands/Balance/
  Personalization tab labels, the Speech simple/advanced labels, and the
  former About section headings)
- Sort imports in the rebased files the lint-staged hook never touched
- Guard the language fallback against an empty navigator.languages
- Import the RefObject type instead of leaning on the React namespace
This commit is contained in:
Marco Beretta 2026-06-13 16:27:13 +02:00
parent 5b48a064d5
commit 5937e1e625
No known key found for this signature in database
GPG key ID: D918033D8E74CC11
5 changed files with 7 additions and 22 deletions

View file

@ -1,5 +1,5 @@
import { SettingsDialog } from './Settings/index';
import type { TDialogProps } from '~/common';
import { SettingsDialog } from './Settings/index';
export default function Settings(props: TDialogProps) {
return <SettingsDialog {...props} />;

View file

@ -4,8 +4,8 @@ import { useRecoilState } from 'recoil';
import { ThemeContext } from '@librechat/client';
import type { ComponentType } from 'react';
import type { TranslationKeys } from '~/hooks';
import ToggleSwitch from '../SettingsTabs/ToggleSwitch';
import { ThemeSelector, LangSelector } from '../SettingsTabs/General/Selectors';
import ToggleSwitch from '../SettingsTabs/ToggleSwitch';
import store from '~/store';
export function toggleControl(opts: {
@ -36,7 +36,8 @@ export function LangSetting() {
const [langcode, setLangcode] = useRecoilState(store.lang);
const onChange = useCallback(
(value: string) => {
const userLang = value === 'auto' ? navigator.language || navigator.languages[0] : value;
const userLang =
value === 'auto' ? navigator.language || navigator.languages?.[0] || 'en-US' : value;
requestAnimationFrame(() => {
document.documentElement.lang = userLang;
});

View file

@ -1,4 +1,5 @@
import { OGDialog, OGDialogContent, OGDialogHeader, OGDialogTitle } from '@librechat/client';
import type { RefObject } from 'react';
import ArchivedChatsTable from './ArchivedChatsTable';
import { useLocalize } from '~/hooks';
@ -9,7 +10,7 @@ export function ArchivedChatsModal({
}: {
open: boolean;
onOpenChange: (open: boolean) => void;
triggerRef?: React.RefObject<HTMLButtonElement | HTMLDivElement | null>;
triggerRef?: RefObject<HTMLButtonElement | HTMLDivElement | null>;
}) {
const localize = useLocalize();

View file

@ -1,11 +1,10 @@
// ThemeSelector.spec.tsx
import 'test/matchMedia.mock';
import React from 'react';
import { render, fireEvent, waitFor } from '@testing-library/react';
import '@testing-library/jest-dom/extend-expect';
import { ThemeSelector } from './Selectors';
import { RecoilRoot } from 'recoil';
import { ThemeSelector } from './Selectors';
describe('ThemeSelector', () => {
let mockOnChange;

View file

@ -411,9 +411,7 @@
"com_nav_about_diagnostics_copied": "Copied",
"com_nav_about_diagnostics_copy": "Copy diagnostics",
"com_nav_about_diagnostics_description": "Copy this block when opening a support issue so maintainers can identify the exact build you're running.",
"com_nav_about_diagnostics_heading": "Diagnostics",
"com_nav_about_version": "Version",
"com_nav_about_version_heading": "Build information",
"com_nav_account_settings": "Account Settings",
"com_nav_advanced_prompts": "Advanced prompts editor",
"com_nav_advanced_prompts_desc": "Enable versioning and production control for prompts",
@ -457,8 +455,6 @@
"com_nav_browser": "Browser",
"com_nav_center_chat_input": "Center Chat Input on Welcome Screen",
"com_nav_change_picture": "Change picture",
"com_nav_chat_commands": "Chat Commands",
"com_nav_chat_commands_info": "These commands are activated by typing specific characters at the beginning of your message. Each command is triggered by its designated prefix. You can disable them if you frequently use these characters to start messages.",
"com_nav_chat_direction": "Chat direction",
"com_nav_chat_direction_selected": "Chat direction: {{direction}}",
"com_nav_clear_all_chats": "Clear all chats",
@ -466,7 +462,6 @@
"com_nav_clear_conversation": "Clear conversations",
"com_nav_clear_conversation_confirm_message": "Are you sure you want to clear all conversations? This is irreversible.",
"com_nav_close_sidebar": "Close sidebar",
"com_nav_commands": "Commands",
"com_nav_confirm_clear": "Confirm Clear",
"com_nav_control_panel": "Control Panel",
"com_nav_conversation_mode": "Conversation Mode",
@ -594,13 +589,10 @@
"com_nav_send_message": "Send message",
"com_nav_setting_about": "About",
"com_nav_setting_account": "Account",
"com_nav_setting_balance": "Balance",
"com_nav_setting_chat": "Chat",
"com_nav_setting_data": "Data controls",
"com_nav_setting_delay": "Delay (s)",
"com_nav_setting_general": "General",
"com_nav_setting_mcp": "MCP Settings",
"com_nav_setting_personalization": "Personalization",
"com_nav_setting_speech": "Speech",
"com_nav_settings": "Settings",
"com_nav_shared_links": "Shared links",
@ -1294,7 +1286,6 @@
"com_ui_no_memories": "No memories. Create them manually or prompt the AI to remember something",
"com_ui_no_memories_match": "No memories match your search",
"com_ui_no_memories_title": "No memories yet",
"com_ui_no_personalization_available": "No personalization options are currently available",
"com_ui_no_project_chats": "No chats yet",
"com_ui_no_projects": "No projects yet",
"com_ui_no_prompts_title": "No prompts yet",
@ -1511,7 +1502,6 @@
"com_ui_set": "Set",
"com_ui_settings_label_2fa": "Two-factor authentication",
"com_ui_settings_label_agent_api_keys": "Agent API keys",
"com_ui_settings_label_archived": "Archived chats",
"com_ui_settings_label_auto_refill": "Auto-refill",
"com_ui_settings_label_avatar": "Avatar",
"com_ui_settings_label_backup_codes": "Backup codes",
@ -1533,7 +1523,6 @@
"com_ui_settings_results_aria": "Search results",
"com_ui_settings_search_placeholder": "Search settings",
"com_ui_settings_section_accessibility": "Accessibility",
"com_ui_settings_section_advanced": "Advanced",
"com_ui_settings_section_api_keys": "API keys",
"com_ui_settings_section_appearance": "Appearance",
"com_ui_settings_section_billing": "Billing",
@ -1541,17 +1530,13 @@
"com_ui_settings_section_conversations": "Conversations",
"com_ui_settings_section_danger_zone": "Danger zone",
"com_ui_settings_section_data": "Your data",
"com_ui_settings_section_history": "History",
"com_ui_settings_section_input": "Input",
"com_ui_settings_section_layout": "Layout",
"com_ui_settings_section_memory": "Memory",
"com_ui_settings_section_messages": "Messages",
"com_ui_settings_section_profile": "Profile",
"com_ui_settings_section_prompts": "Prompts",
"com_ui_settings_section_rendering": "Rendering",
"com_ui_settings_section_security": "Security",
"com_ui_settings_section_sending": "Sending",
"com_ui_settings_section_shared": "Shared links",
"com_ui_settings_section_stt": "Speech to text",
"com_ui_settings_section_tts": "Text to speech",
"com_ui_settings_tab_data": "Data & Privacy",
@ -1580,7 +1565,6 @@
"com_ui_show_n_files": "Show {{0}} files",
"com_ui_show_qr": "Show QR Code",
"com_ui_sign_in_to_domain": "Sign-in to {{0}}",
"com_ui_simple": "Simple",
"com_ui_size": "Size",
"com_ui_size_sort": "Sort by Size",
"com_ui_skill": "Skill",