🔄 chore: Enforce 18next Language Keys (#5803)

* chore: enforcing language keys to adhere to the new standard.

* chore: enforcing i18n forbids to write plain text in JSX markup

* chore: enforcing i18n forbids to write plain text in JSX markup

* fix: ci with checkbox for unused keys :)

* refactor: removed all the unused `i18n` keys
This commit is contained in:
Ruben Talstra 2025-02-12 21:48:13 +01:00 committed by GitHub
parent 2a506df443
commit 7f48030452
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 200 additions and 219 deletions

View file

@ -17,10 +17,10 @@ import {
} from '~/components/ui';
import { useLocalize, useCustomLink, useAuthContext } from '~/hooks';
import AdvancedSwitch from '~/components/Prompts/AdvancedSwitch';
import { RightPanel } from '../../components/Prompts/RightPanel';
// import { RightPanel } from '../../components/Prompts/RightPanel';
import AdminSettings from '~/components/Prompts/AdminSettings';
import { useDashboardContext } from '~/Providers';
import { PromptsEditorMode } from '~/common';
// import { PromptsEditorMode } from '~/common';
import store from '~/store';
const promptsPathPattern = /prompts\/(?!new(?:\/|$)).*$/;

View file

@ -3,9 +3,9 @@ import { Outlet, useNavigate, useLocation } from 'react-router-dom';
import type { TStartupConfig } from 'librechat-data-provider';
import { useGetStartupConfig } from '~/data-provider';
import AuthLayout from '~/components/Auth/AuthLayout';
import { useLocalize } from '~/hooks';
import { TranslationKeys, useLocalize } from '~/hooks';
const headerMap = {
const headerMap: Record<string, TranslationKeys> = {
'/login': 'com_auth_welcome_back',
'/register': 'com_auth_create_account',
'/forgot-password': 'com_auth_reset_password',
@ -13,8 +13,8 @@ const headerMap = {
};
export default function StartupLayout({ isAuthenticated }: { isAuthenticated?: boolean }) {
const [error, setError] = useState<string | null>(null);
const [headerText, setHeaderText] = useState<string | null>(null);
const [error, setError] = useState<TranslationKeys | null>(null);
const [headerText, setHeaderText] = useState<TranslationKeys | null>(null);
const [startupConfig, setStartupConfig] = useState<TStartupConfig | null>(null);
const {
data,