feat(#221): add i18n keys and error codes for tag hierarchy errors
Adds INVALID_TAG_COLOR and TAG_CYCLE_DETECTED to the frontend ErrorCode type and getErrorMessage() switch. German, English, and Spanish translations added for both codes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -27,6 +27,8 @@ export type ErrorCode =
|
||||
| 'OCR_DOCUMENT_NOT_UPLOADED'
|
||||
| 'OCR_PROCESSING_FAILED'
|
||||
| 'TRAINING_ALREADY_RUNNING'
|
||||
| 'INVALID_TAG_COLOR'
|
||||
| 'TAG_CYCLE_DETECTED'
|
||||
| 'UNAUTHORIZED'
|
||||
| 'FORBIDDEN'
|
||||
| 'VALIDATION_ERROR'
|
||||
@@ -100,6 +102,10 @@ export function getErrorMessage(code: ErrorCode | string | undefined): string {
|
||||
return m.error_ocr_processing_failed();
|
||||
case 'TRAINING_ALREADY_RUNNING':
|
||||
return m.error_training_already_running();
|
||||
case 'INVALID_TAG_COLOR':
|
||||
return m.error_invalid_tag_color();
|
||||
case 'TAG_CYCLE_DETECTED':
|
||||
return m.error_tag_cycle_detected();
|
||||
case 'UNAUTHORIZED':
|
||||
return m.error_unauthorized();
|
||||
case 'FORBIDDEN':
|
||||
|
||||
Reference in New Issue
Block a user