- Added useI18n hook to Sidebar and TitleBar components for translation support. - Updated sidebar navigation items to use translation keys instead of hardcoded labels. - Enhanced TitleBar buttons with localized titles for minimize, maximize, and close actions. - Expanded i18n constants to include new namespaces for sidebar and login. - Implemented translation messages for sidebar, settings, and login components in English, Chinese, and Japanese. - Refactored Knowledge and Skills pages to utilize useLocale for locale management. - Updated Login page to display localized text for form labels, placeholders, and error messages. - Enhanced Account and General settings panels with localized titles and descriptions. - Modified SettingMenu to use translation keys for menu items.
20 lines
385 B
TypeScript
20 lines
385 B
TypeScript
import { useEffect } from 'react';
|
|
import { HashRouter } from 'react-router-dom';
|
|
import { useLocale } from './i18n';
|
|
import { AppRouter } from './router';
|
|
import { initSettingsStore } from './stores';
|
|
|
|
export default function App() {
|
|
useLocale();
|
|
|
|
useEffect(() => {
|
|
void initSettingsStore();
|
|
}, []);
|
|
|
|
return (
|
|
<HashRouter>
|
|
<AppRouter />
|
|
</HashRouter>
|
|
);
|
|
}
|