feat: expand Russian localization

This commit is contained in:
Chebotov Nickolay
2026-02-06 12:26:46 +03:00
parent ad1387d076
commit ad6a3bd732
6 changed files with 906 additions and 910 deletions

View File

@@ -1090,7 +1090,8 @@
"language": {
"switch": "Language",
"chinese": "中文",
"english": "English"
"english": "English",
"russian": "Русский"
},
"theme": {
"switch": "Theme",

File diff suppressed because it is too large Load Diff

View File

@@ -1090,7 +1090,8 @@
"language": {
"switch": "语言",
"chinese": "中文",
"english": "English"
"english": "English",
"russian": "Русский"
},
"theme": {
"switch": "主题",

View File

@@ -7,7 +7,7 @@ import { IconEye, IconEyeOff } from '@/components/ui/icons';
import { useAuthStore, useLanguageStore, useNotificationStore } from '@/stores';
import { detectApiBaseFromLocation, normalizeApiBase } from '@/utils/connection';
import { INLINE_LOGO_JPEG } from '@/assets/logoInline';
import type { ApiError } from '@/types';
import type { ApiError, Language } from '@/types';
import styles from './LoginPage.module.scss';
/**
@@ -78,7 +78,14 @@ export function LoginPage() {
const [error, setError] = useState('');
const detectedBase = useMemo(() => detectApiBaseFromLocation(), []);
const nextLanguageLabel = language === 'zh-CN' ? t('language.english') : t('language.chinese');
const nextLanguage: Language = language === 'zh-CN' ? 'en' : language === 'en' ? 'ru' : 'zh-CN';
const nextLanguageLabel = t(
nextLanguage === 'zh-CN'
? 'language.chinese'
: nextLanguage === 'en'
? 'language.english'
: 'language.russian'
);
useEffect(() => {
const init = async () => {

View File

@@ -29,8 +29,10 @@ export const useLanguageStore = create<LanguageState>()(
toggleLanguage: () => {
const { language, setLanguage } = get();
const newLanguage: Language = language === 'zh-CN' ? 'en' : 'zh-CN';
setLanguage(newLanguage);
const order: Language[] = ['zh-CN', 'en', 'ru'];
const currentIndex = order.indexOf(language);
const nextLanguage = order[(currentIndex + 1) % order.length];
setLanguage(nextLanguage);
}
}),
{