feat(stammbaum): add i18n keys (de/en/es) + mirror error codes
In each of de/en/es: - nav_stammbaum - 9 relation_<type>_of keys for the stored relation types - 17 relation_inferred_<label> keys covering everything LABEL_MAP emits (parent/child/spouse/sibling, grand*, great-grand*, uncle/aunt, niece/nephew, in-laws, cousin, distant) - doc_details_field_relationship — badge label "Verwandtschaft" - stammbaum_empty_*, stammbaum_panel_*, stammbaum_zoom_*, stammbaum_generations - relation_error_* (inline form errors), relation_year_error_*, relation_label_*, relation_btn_* - person_relationships_heading + person_relationships_empty - error_relationship_not_found / error_circular_relationship / error_duplicate_relationship for the centralised error mapper frontend/src/lib/errors.ts mirrors the backend's three new ErrorCodes and routes them through getErrorMessage(). Refs #358. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -38,6 +38,9 @@ export type ErrorCode =
|
||||
| 'TAG_NOT_FOUND'
|
||||
| 'TAG_MERGE_SELF'
|
||||
| 'TAG_MERGE_INVALID_TARGET'
|
||||
| 'RELATIONSHIP_NOT_FOUND'
|
||||
| 'CIRCULAR_RELATIONSHIP'
|
||||
| 'DUPLICATE_RELATIONSHIP'
|
||||
| 'MISSING_CREDENTIALS'
|
||||
| 'UNAUTHORIZED'
|
||||
| 'FORBIDDEN'
|
||||
@@ -136,6 +139,12 @@ export function getErrorMessage(code: ErrorCode | string | undefined): string {
|
||||
return m.error_tag_merge_self();
|
||||
case 'TAG_MERGE_INVALID_TARGET':
|
||||
return m.error_tag_merge_invalid_target();
|
||||
case 'RELATIONSHIP_NOT_FOUND':
|
||||
return m.error_relationship_not_found();
|
||||
case 'CIRCULAR_RELATIONSHIP':
|
||||
return m.error_circular_relationship();
|
||||
case 'DUPLICATE_RELATIONSHIP':
|
||||
return m.error_duplicate_relationship();
|
||||
case 'MISSING_CREDENTIALS':
|
||||
return m.login_error_missing_credentials();
|
||||
case 'UNAUTHORIZED':
|
||||
|
||||
Reference in New Issue
Block a user