diff --git a/apps/studio/components/interfaces/SQLEditor/DownloadSnippetModal.tsx b/apps/studio/components/interfaces/SQLEditor/DownloadSnippetModal.tsx index 5a9c33317dea1..de71ff372a619 100644 --- a/apps/studio/components/interfaces/SQLEditor/DownloadSnippetModal.tsx +++ b/apps/studio/components/interfaces/SQLEditor/DownloadSnippetModal.tsx @@ -35,7 +35,7 @@ const DownloadSnippetModal = ({ id, ...props }: DownloadSnippetModalProps) => { id: 'migration', label: '迁移文件', title: '下载为迁移文件', - description: `将代码片段下载到一个新的迁移文件,文件名为 \`${migrationName}\``, + description: `将代码段下载到一个新的迁移文件,文件名为 \`${migrationName}\``, cli: generateMigrationCliCommand(id, migrationName), npm: generateMigrationCliCommand(id, migrationName, true), }, @@ -44,7 +44,7 @@ const DownloadSnippetModal = ({ id, ...props }: DownloadSnippetModalProps) => { label: '种子文件', title: '下载为种子文件', description: - '如果你的查询包含示例数据,将代码片段追加到 `supabase/seed.sql` 的末尾', + '如果你的查询包含示例数据,将代码段追加到 `supabase/seed.sql` 的末尾', cli: generateSeedCliCommand(id), npm: generateSeedCliCommand(id, true), }, @@ -52,7 +52,7 @@ const DownloadSnippetModal = ({ id, ...props }: DownloadSnippetModalProps) => { id: 'sql', label: 'SQL 文件', title: '下载为 SQL 文件', - description: `直接将代码片段下载到一个新的 SQL 文件中,文件名为 \`${migrationName}.sql\``, + description: `直接将代码段下载到一个新的 SQL 文件中,文件名为 \`${migrationName}.sql\``, cli: generateFileCliCommand(id, migrationName), npm: generateFileCliCommand(id, migrationName, true), }, @@ -63,7 +63,7 @@ const DownloadSnippetModal = ({ id, ...props }: DownloadSnippetModalProps) => { hideFooter showCloseButton size="xlarge" - header={

通过 Supabase CLI 将代码片段下载到本地迁移文件。

} + header={

通过 Supabase CLI 将代码段下载到本地迁移文件。

} {...props} >
diff --git a/apps/studio/components/interfaces/SQLEditor/MoveQueryModal.tsx b/apps/studio/components/interfaces/SQLEditor/MoveQueryModal.tsx index 3c69500ce7e0a..213427575624f 100644 --- a/apps/studio/components/interfaces/SQLEditor/MoveQueryModal.tsx +++ b/apps/studio/components/interfaces/SQLEditor/MoveQueryModal.tsx @@ -117,7 +117,7 @@ export const MoveQueryModal = ({ visible, snippets = [], onClose }: MoveQueryMod } if (snippetContent === undefined) { - return toast.error('保存代码片段失败:无法获取代码片段的内容') + return toast.error('保存代码段失败:无法获取代码段的内容') } else { moveSnippetAsync({ projectRef: ref, @@ -138,7 +138,7 @@ export const MoveQueryModal = ({ visible, snippets = [], onClose }: MoveQueryMod ) toast.success( - `成功移动了 ${snippets.length === 1 ? `"${snippets[0].name}"` : `${snippets.length} 个代码片段`}到${selectedId === 'root' ? '编辑器的根目录' : selectedFolder}` + `成功移动了 ${snippets.length === 1 ? `"${snippets[0].name}"` : `${snippets.length} 个代码段`}到${selectedId === 'root' ? '编辑器的根目录' : selectedFolder}` ) snippets.forEach((snippet) => { snapV2.updateSnippet({ diff --git a/apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.ts b/apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.ts index 9436bfdcf66d1..717cc9c4da65f 100644 --- a/apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.ts +++ b/apps/studio/components/interfaces/SQLEditor/SQLEditor.utils.ts @@ -75,7 +75,7 @@ export function getDiffTypeButtonLabel(diffType: DiffType) { case DiffType.Addition: return '接受新增' case DiffType.NewSnippet: - return '创建新代码片段' + return '创建新代码段' default: throw new Error(`未知的 diff 类型 '${diffType}'`) } @@ -88,7 +88,7 @@ export function getDiffTypeDropdownLabel(diffType: DiffType) { case DiffType.Addition: return '对比为新增' case DiffType.NewSnippet: - return '对比为新代码片段' + return '对比为新代码段' default: throw new Error(`未知的 diff 类型 '${diffType}'`) } diff --git a/apps/studio/components/layouts/SQLEditorLayout/QueryItem.tsx b/apps/studio/components/layouts/SQLEditorLayout/QueryItem.tsx index c3957f42d4629..ac587ad48fa7a 100644 --- a/apps/studio/components/layouts/SQLEditorLayout/QueryItem.tsx +++ b/apps/studio/components/layouts/SQLEditorLayout/QueryItem.tsx @@ -72,7 +72,7 @@ const QueryItem = ({ const onConfirmDelete = async () => { if (!ref) return console.error('未找到项目号') - if (!id) return console.error('未找到代码片段 ID') + if (!id) return console.error('未找到代码段 ID') deleteContent({ projectRef: ref, ids: [id] }) } @@ -193,7 +193,7 @@ const QueryItem = ({ alert={ visibility === 'project' ? { - title: '此 SQL 代码片段会永远丢失', + title: '此 SQL 代码段会永远丢失', description: '删除查询也会从项目团队的所有成员中移除此查询。', } @@ -222,7 +222,7 @@ const QueryItem = ({
  • - 任何人都可以将它复制到个人代码片段收藏中。 + 任何人都可以将它复制到个人代码段收藏中。
  • diff --git a/apps/studio/components/layouts/SQLEditorLayout/QueryItemActions.tsx b/apps/studio/components/layouts/SQLEditorLayout/QueryItemActions.tsx index e15c76697c003..6e571067d91f5 100644 --- a/apps/studio/components/layouts/SQLEditorLayout/QueryItemActions.tsx +++ b/apps/studio/components/layouts/SQLEditorLayout/QueryItemActions.tsx @@ -78,7 +78,7 @@ export const QueryItemActions = ({ const createPersonalCopy = async () => { if (!ref) return console.error('未找到项目号') - if (!id) return console.error('未找到代码片段 ID') + if (!id) return console.error('未找到代码段 ID') try { const snippet = createSqlSnippetSkeleton({ id: uuidv4(), diff --git a/apps/studio/components/layouts/SQLEditorLayout/SQLEditorMenu.tsx b/apps/studio/components/layouts/SQLEditorLayout/SQLEditorMenu.tsx index f696b79b177ce..6c325a46b75d6 100644 --- a/apps/studio/components/layouts/SQLEditorLayout/SQLEditorMenu.tsx +++ b/apps/studio/components/layouts/SQLEditorLayout/SQLEditorMenu.tsx @@ -168,7 +168,7 @@ export const SQLEditorMenu = ({ onViewOngoingQueries }: { onViewOngoingQueries: handleNewQuery()}> - 创建新的代码片段 + 创建新的代码段 createNewFolder()}> @@ -240,7 +240,7 @@ export const SQLEditorMenu = ({ onViewOngoingQueries }: { onViewOngoingQueries: variant={'destructive'} alert={{ title: '本操作无法被撤销', - description: '一旦删除了选中的 SQL 代码片段将不能再恢复', + description: '一旦删除了选中的 SQL 代码段将不能再恢复', }} >

    diff --git a/apps/studio/components/layouts/SQLEditorLayout/SQLEditorNavV1.tsx b/apps/studio/components/layouts/SQLEditorLayout/SQLEditorNavV1.tsx index e3ae659f1f929..5eaf1f6d31777 100644 --- a/apps/studio/components/layouts/SQLEditorLayout/SQLEditorNavV1.tsx +++ b/apps/studio/components/layouts/SQLEditorLayout/SQLEditorNavV1.tsx @@ -158,7 +158,7 @@ export const SQLEditorNavV1 = ({ {isError && (

    - +
    )} diff --git a/apps/studio/components/layouts/SQLEditorLayout/SQLEditorNavV2/SQLEditorNav.tsx b/apps/studio/components/layouts/SQLEditorLayout/SQLEditorNavV2/SQLEditorNav.tsx index a67ec9dda5ca0..bac59d62f455d 100644 --- a/apps/studio/components/layouts/SQLEditorLayout/SQLEditorNavV2/SQLEditorNav.tsx +++ b/apps/studio/components/layouts/SQLEditorLayout/SQLEditorNavV2/SQLEditorNav.tsx @@ -184,14 +184,14 @@ export const SQLEditorNav = ({ searchText: _searchText }: SQLEditorNavProps) => } const onConfirmShare = () => { - if (!selectedSnippetToShare) return console.error('未找到代码片段 ID') + if (!selectedSnippetToShare) return console.error('未找到代码段 ID') snapV2.shareSnippet(selectedSnippetToShare.id, 'project') setSelectedSnippetToShare(undefined) setShowSharedSnippets(true) } const onConfirmUnshare = () => { - if (!selectedSnippetToUnshare) return console.error('未找到代码片段 ID') + if (!selectedSnippetToUnshare) return console.error('未找到代码段 ID') snapV2.shareSnippet(selectedSnippetToUnshare.id, 'user') setSelectedSnippetToUnshare(undefined) setShowPrivateSnippets(true) @@ -201,7 +201,7 @@ export const SQLEditorNav = ({ searchText: _searchText }: SQLEditorNavProps) => if (!profile) return console.error('未找到用户资料') if (!project) return console.error('未找到项目') if (!projectRef) return console.error('未找到项目号') - if (!id) return console.error('未找到代码片段 ID') + if (!id) return console.error('未找到代码段 ID') let sql: string = '' if (!('content' in snippet)) { @@ -542,7 +542,7 @@ export const SQLEditorNav = ({ searchText: _searchText }: SQLEditorNavProps) =>
  • - 任何人都可以将它复制到他们的个人代码片段收藏中。 + 任何人都可以将它复制到他们的个人代码段收藏中。
  • @@ -584,7 +584,7 @@ export const SQLEditorNav = ({ searchText: _searchText }: SQLEditorNavProps) => alert={ (selectedSnippets[0]?.visibility as unknown as string) === 'project' ? { - title: '此 SQL 代码片段将永远丢失', + title: '此 SQL 代码段将永远丢失', description: '删除此查询也将从项目团队的所有成员中移除。', } @@ -612,7 +612,7 @@ export const SQLEditorNav = ({ searchText: _searchText }: SQLEditorNavProps) => alert={{ title: '此操作无法撤销', description: - '此文件夹中的所有 SQL 代码片段也讲会被久删除,无法恢复。', + '此文件夹中的所有 SQL 代码段也讲会被久删除,无法恢复。', }} >

    diff --git a/apps/studio/components/layouts/SQLEditorLayout/SQLEditorNavV2/SQLEditorTreeViewItem.tsx b/apps/studio/components/layouts/SQLEditorLayout/SQLEditorNavV2/SQLEditorTreeViewItem.tsx index 781e06db88423..e07e211317284 100644 --- a/apps/studio/components/layouts/SQLEditorLayout/SQLEditorNavV2/SQLEditorTreeViewItem.tsx +++ b/apps/studio/components/layouts/SQLEditorLayout/SQLEditorNavV2/SQLEditorTreeViewItem.tsx @@ -141,7 +141,7 @@ export const SQLEditorTreeViewItem = ({ onFocusCapture={(e) => e.stopPropagation()} > - 创建新的代码片段 + 创建新的代码段 )} {onSelectRename !== undefined && isOwner && ( diff --git a/apps/studio/pages/project/[ref]/logs/explorer/recent.tsx b/apps/studio/pages/project/[ref]/logs/explorer/recent.tsx index 54b5c8e8f73eb..a1bd5707d356d 100644 --- a/apps/studio/pages/project/[ref]/logs/explorer/recent.tsx +++ b/apps/studio/pages/project/[ref]/logs/explorer/recent.tsx @@ -25,7 +25,7 @@ export const LogsSavedPage: NextPageWithLayout = () => { - 代码片段 + 代码段