chore: replace all cn comments of fe to en version by volc api (#320)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* stylelint-disable declaration-no-important -- 历史代码,为避免引入新BUG暂不修复 */
|
||||
/* Stylelint-disable declaration-no-important -- historical code, not fixed to avoid introducing new bugs */
|
||||
.wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
@@ -30,7 +30,7 @@ import { useSpaceStore, useSpaceApp } from '@coze-foundation/space-store';
|
||||
|
||||
import s from './index.module.less';
|
||||
|
||||
// i18n 的配置,对齐 starling 文案后再替换
|
||||
// The configuration of i18n, align the starling copy and then replace it.
|
||||
export const GlobalError: FC = () => {
|
||||
const navigate = useNavigate();
|
||||
const spaceApp = useSpaceApp();
|
||||
@@ -87,7 +87,7 @@ export const GlobalError: FC = () => {
|
||||
const spaceId =
|
||||
id ??
|
||||
getPersonalSpaceID() ??
|
||||
// 企业下无个人空间,缺省跳转到第一个空间
|
||||
// There is no personal space under the enterprise, so jump to the first space by default.
|
||||
useSpaceStore.getState().spaceList[0]?.id;
|
||||
url = spaceId ? `/space/${spaceId}/${spaceApp}` : '/space';
|
||||
} else if (base && base in BaseEnum) {
|
||||
|
||||
@@ -65,7 +65,7 @@ export const GlobalLayoutActionBtn: FC<LayoutButtonItem> = ({
|
||||
data-testid={dataTestId}
|
||||
/>
|
||||
);
|
||||
// 如果 tooltip 为空,则不显示 tooltip
|
||||
// If tooltip is empty, tooltip is not displayed
|
||||
return (
|
||||
<>
|
||||
{tooltip ? (
|
||||
|
||||
@@ -41,7 +41,7 @@ export const GLobalLayoutMenuItem: FC<LayoutMenuItem> = ({
|
||||
|
||||
let isActive = false;
|
||||
let newPath = '';
|
||||
// 如果 path 是数组,则取第一个匹配的路径
|
||||
// If path is an array, take the first matching path
|
||||
if (Array.isArray(path)) {
|
||||
isActive = path.some(p => location.pathname.startsWith(p));
|
||||
newPath = path.find(p => location.pathname.startsWith(p)) || path[0];
|
||||
|
||||
@@ -53,7 +53,7 @@ export const GlobalLayoutSider: FC<Omit<LayoutProps, 'hasSider'>> = ({
|
||||
return (
|
||||
<div className="pl-8px py-8px h-full">
|
||||
<div className={siderStyle}>
|
||||
{/* 主导航 */}
|
||||
{/* main navigation */}
|
||||
<div
|
||||
className={classNames(
|
||||
mainMenuStyle,
|
||||
@@ -83,7 +83,7 @@ export const GlobalLayoutSider: FC<Omit<LayoutProps, 'hasSider'>> = ({
|
||||
{footer}
|
||||
</Space>
|
||||
</div>
|
||||
{/* 二级导航 */}
|
||||
{/* secondary navigation */}
|
||||
<SubMenu />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -38,7 +38,7 @@ export const useLayoutResponsive = () => {
|
||||
useEffect(() => {
|
||||
if (config.showMobileTips) {
|
||||
if (!mobileTips && isMobile()) {
|
||||
openMobileTipsModal(); // 不适配移动端弹窗提示
|
||||
openMobileTipsModal(); // Not suitable for mobile end pop-up window prompt
|
||||
setMobileTips(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import { IconSideFoldOutlined } from '@coze-arch/bot-icons';
|
||||
|
||||
import { useOpenGlobalLayoutSideSheet } from './global-layout/hooks';
|
||||
|
||||
// 用于在移动端模式开启侧边栏
|
||||
// Use to open sidebar in mobile end mode
|
||||
export const SideSheetMenu = () => {
|
||||
const open = useOpenGlobalLayoutSideSheet();
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/** 布局框架 */
|
||||
/** layout framework */
|
||||
export { SideSheetMenu } from './components/side-sheet-menu';
|
||||
export { GlobalError } from './components/global-error';
|
||||
export { BackButton } from './components/back-button';
|
||||
|
||||
@@ -18,7 +18,7 @@ import { devtools } from 'zustand/middleware';
|
||||
import { create } from 'zustand';
|
||||
|
||||
interface SignMobileStore {
|
||||
/** 标识有没有弹出过提示 */
|
||||
/** Has the logo ever popped up? */
|
||||
mobileTips: boolean;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user