diff options
Diffstat (limited to 'lib/swp/table/swp-upload-validation-dialog.tsx')
| -rw-r--r-- | lib/swp/table/swp-upload-validation-dialog.tsx | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/lib/swp/table/swp-upload-validation-dialog.tsx b/lib/swp/table/swp-upload-validation-dialog.tsx index 803b1564..3357ec7a 100644 --- a/lib/swp/table/swp-upload-validation-dialog.tsx +++ b/lib/swp/table/swp-upload-validation-dialog.tsx @@ -69,7 +69,7 @@ export function validateFileName( if (lastDotIndex === -1) { return { valid: false, - error: "파일 확장자가 없습니다", + error: "File extension missing", }; } @@ -83,7 +83,7 @@ export function validateFileName( if (parts.length < 3) { return { valid: false, - error: `언더스코어(_)가 최소 2개 있어야 합니다 (현재: ${parts.length - 1}개). 형식: [OWN_DOC_NO]_[REV_NO]_[STAGE].[확장자]`, + error: `Must have at least 2 underscores (_) (Current: ${parts.length - 1}). Format: [OWN_DOC_NO]_[REV_NO]_[STAGE].[Extension]`, }; } @@ -99,21 +99,21 @@ export function validateFileName( if (!ownDocNo || ownDocNo.trim() === "") { return { valid: false, - error: "문서번호(OWN_DOC_NO)가 비어있습니다", + error: "Document Number (OWN_DOC_NO) is empty", }; } if (!revNo || revNo.trim() === "") { return { valid: false, - error: "리비전 번호(REV_NO)가 비어있습니다", + error: "Revision Number (REV_NO) is empty", }; } if (!stage || stage.trim() === "") { return { valid: false, - error: "스테이지(STAGE)가 비어있습니다", + error: "Stage (STAGE) is empty", }; } @@ -127,7 +127,7 @@ export function validateFileName( if (!availableDocNos || availableDocNos.length === 0) { return { valid: false, - error: "할당된 문서가 없거나 문서 목록 로드에 실패했습니다. 페이지를 새로고침하거나 관리자에게 문의하세요.", + error: "No assigned documents or failed to load document list. Please refresh the page or contact administrator.", }; } @@ -135,7 +135,7 @@ export function validateFileName( if (!availableDocNos.includes(trimmedDocNo)) { return { valid: false, - error: `문서번호 '${trimmedDocNo}'는 업로드 권한이 없습니다. 할당된 문서번호를 확인해주세요.`, + error: `Document number '${trimmedDocNo}' does not have upload permission. Please check assigned document numbers.`, }; } } @@ -152,7 +152,7 @@ export function validateFileName( // 문서가 EVCP DB에 등록되지 않음 return { valid: false, - error: `문서번호 '${trimmedDocNo}'는 문서 리스트에 등록되지 않았습니다. 먼저 문서 리스트를 제출해주세요.`, + error: `Document number '${trimmedDocNo}' is not registered in the document list. Please submit the document list first.`, }; } @@ -163,7 +163,7 @@ export function validateFileName( // Document Class에 Stage가 설정되지 않음 return { valid: false, - error: `문서 '${trimmedDocNo}'의 Document Class '${docCls}'에 Stage가 설정되지 않았습니다. 관리자에게 문의하세요.`, + error: `Stage is not set for Document Class '${docCls}' of document '${trimmedDocNo}'. Please contact administrator.`, }; } @@ -171,7 +171,7 @@ export function validateFileName( if (!allowedStages.includes(trimmedStage)) { return { valid: false, - error: `문서 '${trimmedDocNo}'의 Document Class '${docCls}'에서 Stage '${trimmedStage}'는 허용되지 않습니다. 허용된 Stage: ${allowedStages.join(", ")}`, + error: `Stage '${trimmedStage}' is not allowed for Document Class '${docCls}' of document '${trimmedDocNo}'. Allowed Stages: ${allowedStages.join(", ")}`, }; } @@ -181,7 +181,7 @@ export function validateFileName( console.log(`[validateFileName] 검증 정보가 없음 → 업로드 차단`); return { valid: false, - error: "문서 정보를 가져올 수 없습니다. 페이지를 새로고침하거나 프로젝트를 다시 선택해주세요.", + error: "Cannot retrieve document info. Please refresh the page or re-select the project.", }; } @@ -198,7 +198,7 @@ export function validateFileName( } catch (error) { return { valid: false, - error: error instanceof Error ? error.message : "알 수 없는 오류", + error: error instanceof Error ? error.message : "Unknown error", }; } } @@ -234,9 +234,9 @@ export function SwpUploadValidationDialog({ <Dialog open={open} onOpenChange={onOpenChange}> <DialogContent className="max-w-3xl max-h-[80vh] flex flex-col"> <DialogHeader className="flex-shrink-0"> - <DialogTitle>파일 업로드 검증</DialogTitle> + <DialogTitle>File Upload Validation</DialogTitle> <DialogDescription> - 선택한 파일의 파일명 형식을 검증합니다 + Validating file name format of selected files </DialogDescription> </DialogHeader> @@ -244,17 +244,17 @@ export function SwpUploadValidationDialog({ {/* 요약 통계 */} <div className="grid grid-cols-3 gap-4"> <div className="rounded-lg border p-3"> - <div className="text-sm text-muted-foreground">전체 파일</div> + <div className="text-sm text-muted-foreground">Total Files</div> <div className="text-2xl font-bold">{validationResults.length}</div> </div> <div className="rounded-lg border p-3 bg-green-50 dark:bg-green-950/30"> - <div className="text-sm text-green-600 dark:text-green-400">검증 성공</div> + <div className="text-sm text-green-600 dark:text-green-400">Validation Success</div> <div className="text-2xl font-bold text-green-600 dark:text-green-400"> {validFiles.length} </div> </div> <div className="rounded-lg border p-3 bg-red-50 dark:bg-red-950/30"> - <div className="text-sm text-red-600 dark:text-red-400">검증 실패</div> + <div className="text-sm text-red-600 dark:text-red-400">Validation Failed</div> <div className="text-2xl font-bold text-red-600 dark:text-red-400"> {invalidFiles.length} </div> @@ -266,8 +266,8 @@ export function SwpUploadValidationDialog({ <Alert variant="destructive"> <AlertCircle className="h-4 w-4" /> <AlertDescription> - {invalidFiles.length}개 파일의 파일명 형식이 올바르지 않습니다. - 검증에 성공한 {validFiles.length}개 파일만 업로드됩니다. + {invalidFiles.length} files have incorrect file name format. + Only {validFiles.length} successfully validated files will be uploaded. </AlertDescription> </Alert> )} @@ -276,7 +276,7 @@ export function SwpUploadValidationDialog({ <Alert variant="destructive"> <XCircle className="h-4 w-4" /> <AlertDescription> - 업로드 가능한 파일이 없습니다. 파일명 형식을 확인해주세요. + No uploadable files. Please check file name format. </AlertDescription> </Alert> )} @@ -289,7 +289,7 @@ export function SwpUploadValidationDialog({ <div className="space-y-2"> <h4 className="text-sm font-semibold text-green-600 dark:text-green-400 flex items-center gap-2"> <CheckCircle2 className="h-4 w-4" /> - 검증 성공 ({validFiles.length}개) + Validation Success ({validFiles.length}) </h4> {validFiles.map((result, index) => ( <div @@ -304,7 +304,7 @@ export function SwpUploadValidationDialog({ {result.parsed && ( <div className="flex flex-wrap gap-1 mt-2"> <Badge variant="outline" className="text-xs"> - 문서: {result.parsed.ownDocNo} + Doc: {result.parsed.ownDocNo} </Badge> <Badge variant="outline" className="text-xs"> Rev: {result.parsed.revNo} @@ -314,11 +314,11 @@ export function SwpUploadValidationDialog({ </Badge> {result.parsed.fileName && ( <Badge variant="outline" className="text-xs"> - 파일명: {result.parsed.fileName} + FileName: {result.parsed.fileName} </Badge> )} <Badge variant="outline" className="text-xs"> - 확장자: .{result.parsed.extension} + Ext: .{result.parsed.extension} </Badge> </div> )} @@ -335,7 +335,7 @@ export function SwpUploadValidationDialog({ <div className="space-y-2 mt-4"> <h4 className="text-sm font-semibold text-red-600 dark:text-red-400 flex items-center gap-2"> <XCircle className="h-4 w-4" /> - 검증 실패 ({invalidFiles.length}개) + Validation Failed ({invalidFiles.length}) </h4> {invalidFiles.map((result, index) => ( <div @@ -365,31 +365,31 @@ export function SwpUploadValidationDialog({ {/* 형식 안내 */} <div className="rounded-lg bg-blue-50 dark:bg-blue-950/30 border border-blue-200 dark:border-blue-800 p-3"> <div className="text-sm font-medium text-blue-900 dark:text-blue-100 mb-1"> - 📋 올바른 파일명 형식 + 📋 Correct File Name Format </div> <code className="text-xs text-blue-700 dark:text-blue-300"> - [OWN_DOC_NO]_[REV_NO]_[STAGE].[확장자] + [OWN_DOC_NO]_[REV_NO]_[STAGE].[Extension] </code> <div className="text-xs text-blue-600 dark:text-blue-400 mt-1"> - 예: VD-DOC-001_01_IFA.pdf + Ex: VD-DOC-001_01_IFA.pdf </div> <div className="text-xs text-blue-600 dark:text-blue-400 mt-1"> - ※ 선택사항: [OWN_DOC_NO]_[REV_NO]_[STAGE]_[파일명].[확장자] (파일명 추가 가능) + ※ Optional: [OWN_DOC_NO]_[REV_NO]_[STAGE]_[FileName].[Extension] (FileName can be added) </div> <div className="text-xs text-blue-600 dark:text-blue-400 mt-1"> - ※ 파일명에는 언더스코어(_)가 포함될 수 있습니다. + ※ File name can contain underscores (_). </div> {isVendorMode && ( <> <div className="text-xs text-blue-600 dark:text-blue-400 mt-2 pt-2 border-t border-blue-200 dark:border-blue-800"> {availableDocNos.length > 0 ? ( - <>ℹ️ 업로드 가능한 문서: {availableDocNos.length}개</> + <>ℹ️ Uploadable Documents: {availableDocNos.length}</> ) : ( - <>⚠️ 할당된 문서가 없습니다</> + <>⚠️ No assigned documents</> )} </div> <div className="text-xs text-blue-600 dark:text-blue-400 mt-1"> - ⚠️ 각 문서의 Document Class에 정의된 Stage만 사용할 수 있습니다. + ⚠️ Only Stages defined in each document's Document Class can be used. </div> </> )} @@ -402,7 +402,7 @@ export function SwpUploadValidationDialog({ onClick={handleCancel} disabled={isUploading} > - 취소 + Cancel </Button> <Button onClick={handleUpload} @@ -411,12 +411,12 @@ export function SwpUploadValidationDialog({ {isUploading ? ( <> <div className="animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2" /> - 업로드 중... + Uploading... </> ) : ( <> <Upload className="h-4 w-4 mr-2" /> - 업로드 ({validFiles.length}개) + Upload ({validFiles.length}) </> )} </Button> |
