refactory(i18n): Added architecture import function translation for the "About" page
- Added translation items related to schema import in English, Chinese, and type definition files - Replaced hard-coded text with new translation items in the AboutSystem component
This commit is contained in:
@@ -411,9 +411,9 @@ export const AboutSystem: React.FC = () => {
|
|||||||
? 'text-green-700 dark:text-green-300'
|
? 'text-green-700 dark:text-green-300'
|
||||||
: 'text-red-700 dark:text-red-300'
|
: 'text-red-700 dark:text-red-300'
|
||||||
}`}>
|
}`}>
|
||||||
{importResult.created > 0 && `${importResult.created} collections created`}
|
{importResult.created > 0 && t('collectionsCreatedCount').replace('{count}', String(importResult.created))}
|
||||||
{importResult.updated > 0 && (importResult.created > 0 ? ', ' : '') + `${importResult.updated} collections updated`}
|
{importResult.updated > 0 && (importResult.created > 0 ? ', ' : '') + t('collectionsUpdatedCount').replace('{count}', String(importResult.updated))}
|
||||||
{importResult.skipped > 0 && ((importResult.created > 0 || importResult.updated > 0) ? ', ' : '') + `${importResult.skipped} collections skipped`}
|
{importResult.skipped > 0 && ((importResult.created > 0 || importResult.updated > 0) ? ', ' : '') + t('collectionsSkippedCount').replace('{count}', String(importResult.skipped))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -23,8 +23,12 @@ export const aboutTranslations: AboutTranslations = {
|
|||||||
clickToUpdateSchema: "Click to update Schema",
|
clickToUpdateSchema: "Click to update Schema",
|
||||||
importSuccessful: "Import Successful",
|
importSuccessful: "Import Successful",
|
||||||
importFailed: "Import Failed",
|
importFailed: "Import Failed",
|
||||||
|
instructions: "Instructions",
|
||||||
mergeFields: "Merge fields",
|
mergeFields: "Merge fields",
|
||||||
instructionsMergeFields: "Safely add new fields to existing collections, preserves all data",
|
instructionsMergeFields: "Safely add new fields to existing collections, preserves all data",
|
||||||
instructionsCollections: "System collections (starting with _) and users collection will be skipped automatically",
|
instructionsCollections: "System collections (starting with _) and users collection will be skipped automatically",
|
||||||
instructionsImportAuth: "Only authenticated admins can perform schema imports",
|
instructionsImportAuth: "Only authenticated admins can perform schema imports",
|
||||||
|
collectionsUpdatedCount: "{count} collections updated",
|
||||||
|
collectionsCreatedCount: "{count} collections created",
|
||||||
|
collectionsSkippedCount: "{count} collections created",
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,4 +26,7 @@ export interface AboutTranslations {
|
|||||||
instructionsMergeFields: string;
|
instructionsMergeFields: string;
|
||||||
instructionsCollections: string;
|
instructionsCollections: string;
|
||||||
instructionsImportAuth: string;
|
instructionsImportAuth: string;
|
||||||
|
collectionsUpdatedCount: string;
|
||||||
|
collectionsCreatedCount: string;
|
||||||
|
collectionsSkippedCount: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,4 +28,7 @@ export const aboutTranslations: AboutTranslations = {
|
|||||||
instructionsMergeFields: "安全地向现有集合添加新字段,保留所有数据",
|
instructionsMergeFields: "安全地向现有集合添加新字段,保留所有数据",
|
||||||
instructionsCollections: "系统集合(以_开头的)和用户集合将被自动跳过",
|
instructionsCollections: "系统集合(以_开头的)和用户集合将被自动跳过",
|
||||||
instructionsImportAuth: "只有经过身份验证的管理员才能执行架构导入",
|
instructionsImportAuth: "只有经过身份验证的管理员才能执行架构导入",
|
||||||
|
collectionsUpdatedCount: "已更新 {count} 个集合",
|
||||||
|
collectionsCreatedCount: "已创建 {count} 个集合",
|
||||||
|
collectionsSkippedCount: "已跳过 {count} 个集合",
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user