chore: replace all cn comments of fe to en version by volc api (#320)

This commit is contained in:
tecvan
2025-07-31 10:32:15 +08:00
committed by GitHub
parent 716ec0cba8
commit 71f6245a01
2960 changed files with 15545 additions and 15545 deletions

View File

@@ -26,14 +26,14 @@ export const useHasSider = () => {
const queryParams = new URLSearchParams(location.search);
const pageMode = queryParams.get('page_mode');
// 优先使用 page_mode 参数判断是否为全屏模式
// Priority is given to using page_mode parameters to determine whether it is full screen mode
if (config.pageModeByQuery && pageMode === 'modal') {
return false;
}
const notCheckLoginPage =
(config.requireAuth && config.requireAuthOptional) || !config.requireAuth;
// 未登录时也可访问的页面
// Pages that can be accessed without logging in
if (config.hasSider && notCheckLoginPage && !isLogined) {
return false;
}

View File

@@ -38,7 +38,7 @@ export const GlobalLayout: FC = () => {
const update = useUpdate();
const currentLocale = userInfo?.locale ?? navigator.language ?? 'en-US';
// 历史原因en-US 需要被转换为 en
// For historical reasons, en-US needs to be converted to en.
const transformedCurrentLocale =
currentLocale === 'en-US' ? 'en' : currentLocale;
@@ -46,7 +46,7 @@ export const GlobalLayout: FC = () => {
if (userInfo && I18n.language !== transformedCurrentLocale) {
localStorage.setItem('i18next', transformedCurrentLocale);
I18n.setLang(transformedCurrentLocale);
// 强制更新,否则切换语言不生效
// Force an update, otherwise the language switch will not take effect
update();
}
}, [userInfo, transformedCurrentLocale, update]);

View File

@@ -31,8 +31,8 @@ import { useResetStoreOnLogout } from './use-reset-store-on-logout';
import { useInitCommonConfig } from './use-init-common-config';
/**
* 所有初始化的逻辑收敛到这里
* 注意登录态需要自行处理
* All initialization logic converges here
* Note that the login status needs to be handled by yourself.
*/
export const useAppInit = () => {
const { requireAuth, requireAuthOptional, loginFallbackPath } =

View File

@@ -15,7 +15,7 @@
*/
/**
* @file 开源版暂不支持后台配置,用于未来拓展
* @File open source version does not support background configuration for future expansion
*/
import { useEffect } from 'react';