refactor: reorganize project structure and improve type definitions

- Split types into separate modules for better organization
- Move data files to dedicated directories with proper documentation
- Enhance i18n utilities with better type safety and performance
- Maintain backward compatibility with legacy imports
This commit is contained in:
joyzhao
2025-06-21 09:18:39 +08:00
parent e38ec6b12f
commit ea01dc6dd8
14 changed files with 784 additions and 523 deletions

36
src/types/i18n.ts Normal file
View File

@@ -0,0 +1,36 @@
/**
* Internationalization types module
* Contains type definitions for i18n functionality
*/
import { languages } from '@/i18n/translations';
/**
* Language type definition
*/
export type Lang = keyof typeof languages;
/**
* UI translation keys type
*/
export type UiKeys = string;
/**
* Language switcher component props
*/
export interface LanguageSwitcherProps {
lang: Lang;
}
/**
* Glass header component props
*/
export interface GlassHeaderProps {
lang: Lang;
}
/**
* Footer component props
*/
export interface FooterProps {
lang?: Lang;
}